Applescript keystroke not working
I'm experimenting with Applescript for the first time, and am trying to
build a script to setup my default layout of applications for developing
at work. This involves placing applications across multiple Mission
Control spaces. My problem at hand is simply moving about the spaces. I
found in many posts similar to this that such action could be achieved
with
tell application "System Events"
tell process "Finder"
keystroke "1" using control down
end tell
end tell
if the appropriate key binding was in place. I made the Preferences change
so I could use control+1 to move to the first MC space. However, running
the script doesn't do anything. This is the event log output:
tell application "System Events"
keystroke "1" using control down
end tell
No errors that I can see, but again: new to Applescript. I've tried many
variations of this command including wrapping control down in curly braces
and wrapping the call to "System Events" inside a call to "Finder" like
this
tell application "Finder"
tell application "System Events"
keystroke "1" using control down
end tell
end tell
but the output is exactly the same with no shift in view. I think I'm
missing something here...
No comments:
Post a Comment