I googled for it but I didn't find the correct answer.
Is it possible to control TM via AppleScript à la
tell app "TextMate" activate end tell tell app "System Events" tell process "TextMate.app" tell menu bar 1 tell menu bar item "Help" tell menu "Help" click menu item "Release Notes" end tell end tell end tell end tell end tell
I tried several things but I couldn't find a solution and it seems to me that this is not possible.
Many thanks for every hint.
-Hans
tell application "TextMate" to activate tell application "System Events" tell process "TextMate" tell menu bar 1 tell menu bar item "Help" tell menu 1 tell menu item "Release Notes" perform action "AXPress" end tell end tell end tell end tell end tell end tell
On Dec 6, 2006, at 10:27 AM, Hans-Joerg Bibiko wrote:
tell app "TextMate" activate end tell tell app "System Events" tell process "TextMate.app" tell menu bar 1 tell menu bar item "Help" tell menu "Help" click menu item "Release Notes" end tell end tell end tell end tell end tell
Haris
Many thank,
but if I try to execute this as bash using osascript or with Script Editor I always get the error message:
195:228: execution error: System Events got an error: NSReceiverEvaluationScriptError: 4 (1)
TM will be activated but no further actions.
??
On 6 Dec 2006, at 16:47, Charilaos Skiadas wrote:
tell application "TextMate" to activate tell application "System Events" tell process "TextMate" tell menu bar 1 tell menu bar item "Help" tell menu 1 tell menu item "Release Notes" perform action "AXPress" end tell end tell end tell end tell end tell end tell
-Hans
I found the reason for this error. Arrrgh!
I had to set within System Preferences > Universal Access 'Enable access for assistive devices' to true.
Nevertheless many thanks!
-Hans
On 6 Dec 2006, at 16:57, Hans-Joerg Bibiko wrote:
Many thank,
but if I try to execute this as bash using osascript or with Script Editor I always get the error message:
195:228: execution error: System Events got an error: NSReceiverEvaluationScriptError: 4 (1)
TM will be activated but no further actions.
??
Hans-Joerg Bibiko wrote:
I googled for it but I didn't find the correct answer.
Is it possible to control TM via AppleScript à la
tell app "TextMate" activate end tell tell app "System Events" tell process "TextMate.app" tell menu bar 1 tell menu bar item "Help" tell menu "Help" click menu item "Release Notes"
[...]
Please take a look in the TextMate AppleScript bundle for the "Select Menu Item with UI Scripting" snippet, and take a look at [this][1] hint to macosxhints.com, before you write such gross looking scripts (note that this isn't your fault. The system wants the scripts to look gross like that, apparently).
[1]: http://www.macosxhints.com/article.php?story=20060921045743404
-Jacob