Re: Scripting Internet Explorer 5.0's preferences
Re: Scripting Internet Explorer 5.0's preferences
- Subject: Re: Scripting Internet Explorer 5.0's preferences
- From: Phil Calvert <email@hidden>
- Date: Mon, 27 Aug 2001 21:07:51 -0700
on 8/26/01 10:08 AM, Andy Wylie <email@hidden> wrote:
>
on 26/8/01 6:07 PM, Christian Boyce at email@hidden wrote:
>
>
> I would like to be able to toggle "Enable scripting" (from the Web
>
> Content section of Explorer 5.0's preferences) via AppleScript. The
>
> dictionary doesn't say anything about setting (or getting) preferences.
>
> If you know how to do this please let me know.
>
>
>
I use Akua's interface suite in a script run from CMScript, I've hacked IE's
>
keystrokes but this should give you the idea...
>
-----------
>
on open (theSelection)
>
>
try
>
tell application "Internet Explorer" to Activate
>
set x to (pointer location of (input state))--get cursor position
>
input state {keys down:";", transient keys:"C"}--open prefs window
>
input state {pointer location:{191, 131}}--select 'web content'
>
input state {button down:false}
>
input state {pointer location:{317, 355}}--check 'enable scripting'
>
input state {button down:false}
>
input state {pointer location:{610, 424}}--OK
>
input state {button down:false}
>
input state {pointer location:{x}}--put cursor back
>
input state {keys down:"]", transient keys:"C"}--show favorites bar
>
input state {keys down:"r", transient keys:"C"}--reload page
>
on error m number n
>
end try
>
end open
When I saw this I thought "wow, it's like a poorman's Quickeys!" But for the
life of me I can't get Akua to "click" on anything. I can move the pointer
around anywhere I want but as for clicking--nothing happens. This is the
bit of AS I've been playing with.
tell application "Internet Explorer" to Activate
set x to (pointer location of (input state)) --get cursor position
input state {keys down:";", transient keys:"C"} --open prefs window
input state {pointer location:{300, 167}} --select 'web content'
input state {button down:false}
As you can see it's just a bit of the previous code except I've corrected
the x and y numbers for my ibook screen. Any hints on where I'm going wrong?
TIA, Phil