Le 25 sept. 2016 à 14:44, Robert Poland < email@hidden> a écrit :
Hi,
These commands NOW fail;
tell application "System Events" to key code 18 using Command down # Move to desktop 1
key code 124 using control down # ^→
tell application "System Events" to keystroke "1" using command down
Any NEW way to implement one of them?
Robert Poland
As I use a single desktop, I can't test the first command.
Here,
tell application "System Events" to tell process "Mail" set frontmost to true -- key code 18 using Command down # Move to desktop 1 key code 124 using {control down} # ^→ --keystroke "1" using {command down} end tell
behaves flawlessly.
tell application "System Events" to tell process "Mail" set frontmost to true -- key code 18 using Command down # Move to desktop 1 -- key code 124 using {control down} # ^→ keystroke "1" using {command down} end tell
issue a beep but don't move the cursor.
As the 1 is reached with the shift key on French keyboards, I tried :
tell application "System Events" to tell process "Mail" set frontmost to true -- key code 18 using Command down # Move to desktop 1 -- key code 124 using {control down} # ^→ keystroke "1" using {command down, shift down} end tell
but it beep too.
Yvan KOENIG running Sierra 10.12.0 in French (VALLAURIS, France) dimanche 25 septembre 2016 15:01:52
|