• 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
Help with UI scripting of Mission Control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with UI scripting of Mission Control


  • Subject: Help with UI scripting of Mission Control
  • From: Robert Poland <email@hidden>
  • Date: Sun, 24 Nov 2013 17:10:45 -0700

Hi,

There must be an error somewhere in this script, errors at UI elements - Expected “,” but found identifier.

Seems to check out with UI Browser.

Is this another Mavericks thing or am I still blind?

tell application "System Events" to key code 18 using {control down} -- Mission Control Desktop 1
delay 1

-- Find out how many spaces/desktops you have (this doesn't work on Lion?):
tell application "System Preferences"
	reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"
	tell application "System Events"
		tell application "System Preferences"
			tell window 1 -- "Keyboard"
				 set numSpaces to count (UI elements of rows of outline 1 of scroll area 2 of splitter group 1 of tab group 1 whose name begins with "Switch to Desktop")
			end tell
		end tell
	end tell
	quit
end tell
log numSpaces

beep 2

TIA,

Robert Poland - Fort Collins, CO




 _______________________________________________
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: Help with UI scripting of Mission Control
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Mail - Extract Links
  • Next by Date: Re: Mail - Extract Links
  • Previous by thread: Re: Mail - Extract Links
  • Next by thread: Re: Help with UI scripting of Mission Control
  • Index(es):
    • Date
    • Thread