Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Click menu item with option key down



Except he doesn't need to Option-Type, he needs to Option-Click.  Unless I misunderstand your email, it looks like the command, option, shift, and control booleans are parameters to the type key command.  Hopefully I'm wrong and this will work.
 
Topher


From: Justin van Berckel [mailto:email@hidden]
Sent: Tuesday, April 26, 2005 6:54 PM
To: Christopher Hickman
Cc: email@hidden
Subject: Re: Click menu item with option key down

I think I have found a solution

There is another program that fills in the missing applescript events. Its called ExtraSuites, and it has the ability to do all sort of key-down events.
http://www.kanzu.com/

ES type keyv : simulate typing a key on the keyboard
ES type key string : the key to press. Special keys include "tab", "enter", etc. Refer info for full list
[command boolean] : hold down the command key
[option boolean] : hold down the option key
[shift boolean] : hold down the shift key
[control boolean] : hold down the control key


---=----=----=---

Justin van Berckel

QA Software Testing Engineer

Atimi Software


On 26-Apr-05, at 8:05 AM, Christopher Hickman wrote:

I've run out of ideas.  Sorry.  I think what is needed is for Apple to add a
"with modifiers" parameter to System Event's click command.  I don't imagine
that would be difficult (I'd think that it would just be a matter of setting
some bits in the event that it generates).  Perhaps in 10.5?

Good luck.  I'll poke around and see if I can think of something in
Objective-C that might do what you need.

Topher 

-----Original Message-----
From: applescript-studio-bounces+tophu=email@hidden
Of rfitz
Sent: Monday, April 25, 2005 9:25 PM
Subject: Fwd: Click menu item with option key down

--I am sending this to the list again because I have not yet seen it
come through--

How can I change the code below so that when the click action is
called, it sends a click with the option key down.

activate application "Printer Setup Utility"
tell application "System Events"
        tell process "Printer Setup Utility"
                click menu item "Add Printer." of menu "Printers" of
menu bar item
"Printers" of menu bar 1
        end tell
end tell

In order to get the advanced menu item to appear, you need to hold
down the option key and either click the Add button or hold the option
key and select Add Printer from the Printers menu.

Any suggestions would be appreciated.

Thanks,

-Rhon


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.