• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: New FireFox 1.5 browser -- applescript implementation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: New FireFox 1.5 browser -- applescript implementation (From: email@hidden)

  • Prev by Date: Re: Launching a shell script nested inside a bundle (Applescript-users Digest, Vol 2, Issue 746)
  • Next by Date: Re: New FireFox 1.5 browser -- applescript implementation
  • Previous by thread: Re: New FireFox 1.5 browser -- applescript implementation
  • Next by thread: Re: New FireFox 1.5 browser -- applescript implementation
  • Index(es):
    • Date
    • Thread