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

Macman1993

macrumors 6502
Original poster
Nov 23, 2007
337
16
I've set hotkeys to execute scripts and they work but they only open the application but the application is hidden and to see it I have to click its icon in the dock which completely defeats the hotkeys purpose. Heres one of the scripts I have can someone tell me what I have to add into it so that the application opens and comes to the front of my screen when I hit the hotkey

tell application "safari"
open (yes I know a tab goes before "open" but this site wouldnt let me type it)
end tell
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
This seemed to work for me:

Code:
tell application "Safari"
	activate
end tell

Todd

(P.S. Use [code] and [/code] tags to wrap your code and preserve tabs)
 

Macman1993

macrumors 6502
Original poster
Nov 23, 2007
337
16
Thanks that worked and I have one more question what is the script to move an already open application to the front of my screen?
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
Thanks that worked and I have one more question what is the script to move an already open application to the front of my screen?

You mean bring all the windows forward? I guess you could use:

Code:
tell application "Safari"
    tell window 1 to activate
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.