• 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: email@hidden
  • Date: Tue, 8 Nov 2005 23:53:56 -0500

I agree. JJ's remarks are very creative about using the window to store information.

Any idea how to get getselection() working on the current window, since Get URL takes you to a new window or frame?


>> previously:

"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:
email@hidden


This email sent to email@hidden

_______________________________________________
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


  • Follow-Ups:
    • Re: New FireFox 1.5 browser -- applescript implementation
      • From: "Gary (Lists)" <email@hidden>
  • Prev by Date: Re: New FireFox 1.5 browser -- applescript implementation
  • Next by Date: Re: eppc: and crashes
  • 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