Re: New FireFox 1.5 browser -- applescript implementation
Re: New FireFox 1.5 browser -- applescript implementation
- Subject: Re: New FireFox 1.5 browser -- applescript implementation
- From: "Gary (Lists)" <email@hidden>
- Date: Tue, 08 Nov 2005 22:50:22 -0500
"email@hidden" wrote:
>>> You can already do some basic things with AppleScript and Firefox. Eg: Get
>>> URL "javascript:void(alert(document.location.href));"
>
> So how would you use this ability to create a javascript variable and return
> its value? : Get URL "javascript: var a ; a=2+3; return (a);" ? I can't get
> this to work or to return any javascript expression result.
Well, if you use an approach like that, with 'Get URL', you can put some
evaluated JS results _into_ a FireFox window. I couldn't specifically set a
variable to the result, however (perhaps JJ's idea to populate the 'title'
window attribute could work, I don't know.)
Here's building your simple example of adding:
-- Tested: FireFox 1.0.5
--
set jsVar_a to 2
set jsVar_b to 3
set jsEvalString to "javascript:eval(" & jsVar_a & " + " & jsVar_b & ");"
tell application "Firefox_105" to Get URL jsEvalString
--
--> FF window displays '5'
8-|
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden