PDA

View Full Version : Applescript Launching Program Help




Campbell.Martin
Oct 9, 2010, 03:10 PM
so im trying to write a script that will open a new window in safari, seems simple enough but if the app is closed then it opens 2 windows at the launch.
is there a way to get round this?

by the way this is what i have now which causes the double window problem, im pretty new to applescripts so any help will be great

set inactive to false
tell application "Safari"
if inactive then activate
if not inactive then make new document
end tell



chown33
Oct 9, 2010, 03:40 PM
Ask Safari for all its open documents.
Only open a window if the list is empty.

Campbell.Martin
Oct 10, 2010, 04:37 AM
Ask Safari for all its open documents.
Only open a window if the list is empty.

how would i do that exactly?
sorry, but im new to applescripts.
thanks