Posted on 09-12-2012 08:52 AM
I'm tinkering and trying to make life easier with scripts. One that would help is the ability to use SHIFT+COMMAND and a keystroke. For my COMMAND only scripts, I'm using something like this:
osascript -e 'tell application "System Events" to key code {13} using command down'
How can I incorporate the SHIFT key into this script?
Thanks--DVG
Solved! Go to Solution.
Posted on 09-12-2012 09:01 AM
osascript -e 'tell application "System Events" to key code {13} using command down, shift down'
This may help you out: http://dougscripts.com/itunes/itinfo/keycodes.php
Posted on 09-12-2012 09:01 AM
osascript -e 'tell application "System Events" to key code {13} using command down, shift down'
This may help you out: http://dougscripts.com/itunes/itinfo/keycodes.php
Posted on 09-12-2012 09:24 AM
using gui scripting is fragile. avoid.
Posted on 09-12-2012 09:40 AM
Yeah, I'd be interested in seeing the larger scale of what you're trying to do with this script. 90% of the time things can be done with bash or perl, etc. Using AS to press keys or click buttons and menus is crude and prone to break.
Posted on 09-13-2012 06:25 AM
Jared, I had to add curly braces to your code, but it worked. I appreciate it!
I'd love to get more in-depth with Perl/Bash, I just need to sit down with someone for a bit and test a few things out to get it straight in my head, then I can put it to good use.
Thanks for the replies! DVG
Posted on 09-13-2012 07:28 AM
If you've got questions on shell scripts (help with syntax and ideas etc) feel free to hit me off-list.