Run AppleScript in the background (hide window)
Run AppleScript in the background (hide window)
- Subject: Run AppleScript in the background (hide window)
- From: Mathieu Thouvenin <email@hidden>
- Date: Tue, 12 Feb 2008 18:26:32 -0800
Hi Guys,
I'm working on an AppleScript that change settings in the System
Preference window, and because I'm using this script from a Dashboard
Widget, I'd like to run the AppleScript in the background so I don't
see the System Preference window and it doesn't leave Dashboard while
running the script.
Here's the basic structure of my script:
activate application "System Preferences"
tell application "System Events"
tell process "System Preferences"
click menu item "Show All Preferences" of menu 1 of menu bar item
"View" of menu bar 1
click button "Network" of scroll area 1 of window "System Preferences"
--Stuff here
end tell
quit application "System Preferences"
end tell
I tried to put this line at the beginning of the script but it doesn't
work:
tell application "Finder" to set visible of every process whose name
is "System Preferences" to false
It's weird, because it used to work on Tiger if I remember well.
Can somebody help me?
Thanks a lot for your help!
Mathieu Thouvenin
http://www.mathieuthouvenin.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden