System Events 1.2 and Error messages
System Events 1.2 and Error messages
- Subject: System Events 1.2 and Error messages
- From: Barbara Mueller <email@hidden>
- Date: Thu, 26 Dec 2002 18:29:49 +0100
The following part of a script works fine, but if the menu item
"Select All" is not enabled, I don't get an error message. Is it
possible to get an error message somehow if a menu items is disabled?
try
tell application theApp to activate --theApp is frontmost
tell application "System Events"
tell process theApp
tell menu bar 1
click menu item "Select All" of menu "Edit"
say "I have selected everything"
end tell
end tell
end tell
on error
say "The menu item is disabled"
end try
end if
Barbara
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.