NetNewsWire/Tests/NetNewsWireTests/ScriptingTests/scripts/selectAnArticle.applescript

32 lines
656 B
AppleScript
Raw Normal View History

property uparrowKeyCode : 126
property downarrowKeyCode : 125
property rightarrowKeyCode : 124
property leftarrowKeyCode : 123
2018-08-29 07:18:24 +02:00
to activateNetNewsWire()
tell application "NetNewsWire"
activate
end tell
2018-08-29 07:18:24 +02:00
end activateNetNewsWire
to multipleKeyCodes(keycode, numberOfKeys)
tell application "System Events"
2018-08-29 07:18:24 +02:00
tell process "NetNewsWire"
repeat numberOfKeys times
key code keycode
end repeat
end tell
end tell
end multipleKeyCodes
try
2018-08-29 07:18:24 +02:00
activateNetNewsWire()
multipleKeyCodes(rightarrowKeyCode, 1)
on error message
return {test_result:false, script_result:message}
end try
return {test_result:true, script_result:"selected an article"}