Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Asu

macrumors member
Original poster
Apr 28, 2006
69
7
Simple question: how to tell Opera in AppleScript to load an URL?

Thanks
 
The usual strategy is to open the target application's scripting dictionary in Script Editor.app, which should be in your /Applications/Utilities folder. This will show you all the scriptable actions (commands) and classes (types of objects).

With the dictionary open, I suggest doing a search for the word "URL" (without the quotes) and see what it finds.

If you want to see how the above works on a browser that I'm sure is scriptable, then open Safari's scripting dictionary and search for URL.


There's also a nifty command you can use in a Terminal window or a shell script. Paste this into a Terminal window:
Code:
open -a Safari https://forums.macrumors.com/threads/2193071/
It should open a Safari window that shows this very thread.

You should be able to ask the 'open' command to give a summary of its options:
Code:
open -?
The option -? is invalid, and open's usual response is to summarize its valid options.

You can also read open's man page:
Code:
man open
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.