• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Run AppleScript in the background (hide window)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Run AppleScript in the background (hide window)
      • From: "John C. Welch" <email@hidden>
  • Prev by Date: Re: terminology conflicts, etc. [was: Re: A date IS a date]
  • Next by Date: Re: AppleScript-Users Digest, Vol 5, Issue 102
  • Previous by thread: Re: terminology conflicts, etc. [was: Re: A date IS a date]
  • Next by thread: Re: Run AppleScript in the background (hide window)
  • Index(es):
    • Date
    • Thread