Brick Mania
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Apple Script: Menu example

Go down

Apple Script: Menu example Empty Apple Script: Menu example

Post  Raven Sat May 07, 2011 3:48 pm

Raven has more scripts up his sleeve
this code is a example of a HUD
Disclaimer:
DOES NOT WORK
ON WINDOWS
Code:
display dialog "" buttons {"Go to forums", "Finder Clean", "Open app"} default button 3
set the button_pressed to the button returned of the result
if the button_pressed is "finder clean" then
   tell application "Finder" to close every window
else if the button_pressed is "Go to forums" then
   tell application "Safari"
      activate
      do JavaScript "window.open('http://www.minecraftforum.net/')" in document 1
   end tell
else
   tell me
      activate
      set s to display dialog "Which appliation do you want to start?" default answer "blockland"
      do shell script "open -a \"" & text returned of s & "\""
   end tell
end if
Raven
Raven
Moderate Gamer
Moderate Gamer

Posts : 239

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum