• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: uh, that's so cool! AS 1.9.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: uh, that's so cool! AS 1.9.1


  • Subject: Re: uh, that's so cool! AS 1.9.1
  • From: Jaime Magiera <email@hidden>
  • Date: Fri, 20 Dec 2002 15:32:26 -0500

Very cool. This is something I've always wanted. Just think of all the cool possibilities! The first that comes to mind are Help scripts that actually physically demonstrate what menus to select, what buttons to push, etc. A visual demonstration of how to use an app.

Applescript is REALLY starting to come into it's own. Now, Apple needs to put more effort into marketing it.

Jaime

On Friday, December 20, 2002, at 12:46 PM, Paul Skinner wrote:

http://www.apple.com/applescript/GUI/


Scripters have often requested the ability to control, via AppleScript, applications which either do not have AppleScript support or are only partially scriptable. The new Developer Tools release contains a beta version of the System Events application incorporating support for scripting the GUI (Graphic User Interface) of > applications.

Using this version of the System Events application, AppleScript scripts can select menu items, push buttons, enter text into text fields, and generally control the GUI of most non-Classic > applications.

This software, which requires Mac OS X 10.2.3, is offered for testing and feedback and should not be used in mission critical environments. Please post your comments in these venues:

* Apple AppleScript Users List
* Apple Discussion Boards

The following script examples demonstrate a few possible uses of GUI scripting:
Selecting a Menu Item
(* EXECUTE MENU ITEM *)
-- replace with the target application name, the menu name, and the menu item name

if my do_menu("Finder", "Finder", "Hide Others") is false then error number -128
if my do_menu("Finder", "View", "Clean Up") is false then error number -128

on do_menu(app_name, menu_name, menu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
with timeout of 300 seconds -- 5 minutes
tell process app_name
tell menu bar 1
click menu item menu_item of menu menu_name
end tell
end tell
end timeout
end tell
return true
on error error_message
return false
end try
end do_menu


...
--
Paul Skinner
_______________________________________________
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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: uh, that's so cool! AS 1.9.1
      • From: Gary Lists <email@hidden>
References: 
 >uh, that's so cool! AS 1.9.1 (From: Paul Skinner <email@hidden>)

  • Prev by Date: RE: Monitor Folder For Changes
  • Next by Date: Get disk size from choosing a folder .... OSX
  • Previous by thread: uh, that's so cool! AS 1.9.1
  • Next by thread: Re: uh, that's so cool! AS 1.9.1
  • Index(es):
    • Date
    • Thread