• 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: keystroke "I" using control down / command down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keystroke "I" using control down / command down


  • Subject: Re: keystroke "I" using control down / command down
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 15 Feb 2004 12:14:50 -0600

At 09:48 -0700 02/15/2004, Robert Poland wrought:

Now if can figure out how to test for existing windows.

I don't see any way to test for the tool palettes.

I wonder why the dictionary says "using control down / shift down" when they mean "using control down, shift down"?

'Cause someone didn't update the dictionary?

Try this:

----------------------------------------------------------------------
try
tell application "System Events"
tell process "GraphicConverter"
set frontmost to true
tell menu "Window" of menu bar item "Window" of menu bar 1
click menu item 3
if (get name of menu item 15) is "Show Information" then
click menu item 15
end if
if (get name of menu item 16) is "Show Toolbox" then
click menu item 16
end if
if (get name of menu item 18) is "Show Overview" then
click menu item 18
end if
if (get name of menu item 19) is "Show Detail" then
click menu item 19
end if
end tell
end tell
end tell
on error errMsg number errNum from errFrom partial result errResult to errTo
set msg to errMsg & return & return & "Number: " & errNum
beep
display dialog msg with icon 0 giving up after 60
end try
----------------------------------------------------------------------

The trick here is that once you run the script and close the tool palettes the menu doesn't register the change until you open it again.

OneClick used to have an update menus event - is there anything similar in System Events?

In the script above the "click menu item 3" (Bring All to Front) line simulates the update menu items function, but if there's a better way I'd sure like to know.

Boy, is System Events slooow...

I mourn the loss of OneClick on Mac OS X quite often but never so much as when I'm fooling with System Events.


Chris
_______________________________________________
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.

References: 
 >keystroke "I" using control down / command down (From: Robert Poland <email@hidden>)
 >Re: keystroke "I" using control down / command down (From: Rob Jorgensen <email@hidden>)
 >Re: keystroke "I" using control down / command down (From: Robert Poland <email@hidden>)

  • Prev by Date: Windows of hidden Applications
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: keystroke "I" using control down / command down
  • Next by thread: Create file alias on user desktop
  • Index(es):
    • Date
    • Thread