2018-02-11 10:20:30 +01:00
|
|
|
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"
|
2018-02-11 10:20:30 +01:00
|
|
|
activate
|
|
|
|
end tell
|
2018-08-29 07:18:24 +02:00
|
|
|
end activateNetNewsWire
|
2018-02-11 10:20:30 +01:00
|
|
|
|
|
|
|
to multipleKeyCodes(keycode, numberOfKeys)
|
|
|
|
tell application "System Events"
|
2018-08-29 07:18:24 +02:00
|
|
|
tell process "NetNewsWire"
|
2018-02-11 10:20:30 +01:00
|
|
|
repeat numberOfKeys times
|
|
|
|
key code keycode
|
|
|
|
end repeat
|
|
|
|
end tell
|
|
|
|
end tell
|
|
|
|
end multipleKeyCodes
|
|
|
|
|
|
|
|
to establishMainWindowStartingState()
|
2018-08-29 07:18:24 +02:00
|
|
|
activateNetNewsWire()
|
2018-02-11 10:20:30 +01:00
|
|
|
multipleKeyCodes(downarrowKeyCode, 2)
|
|
|
|
multipleKeyCodes(rightarrowKeyCode, 2)
|
|
|
|
multipleKeyCodes(leftarrowKeyCode, 2)
|
|
|
|
multipleKeyCodes(uparrowKeyCode, 50)
|
|
|
|
end establishMainWindowStartingState
|
|
|
|
|
|
|
|
try
|
|
|
|
establishMainWindowStartingState()
|
|
|
|
-- hit the down arrow a few times to get into the feeds
|
|
|
|
on error message
|
|
|
|
return {test_result:false, script_result:message}
|
|
|
|
end try
|
|
|
|
|
|
|
|
return {test_result:true, script_result:"established starting state"}
|