Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Design

how can I make a widget button send a hotkey ?

Author Message
tripdragon



Joined: 27 Mar 2005
Posts: 3

Posted: Sun May 15, 2005 - 5:58 pm    Post subject: how can I make a widget button send a hotkey ? Reply with quote

I want to make a simple button widget that can be given a hotkey and on press send that hotkey command. Cant get any simpler than that Very Happy

Please help I am not that adapt at code yet and have no clue if widgets can even do this, But I know the expose dot can do it soooo widgets should beable to...
View user's profile Send private message Widgets
ryand



Joined: 14 May 2005
Posts: 8
Location: Rochester

Posted: Mon May 16, 2005 - 12:06 am    Post subject: Reply with quote

what hotkey? Im not sure that widgets can create keyboard events, but Im pretty sure you could applescript or shell script your way there.
_________________
Thanks
RyanD
http://www.rit.edu/~rpd9803/showTime/
View user's profile Send private message Send e-mail AIM Address Widgets
tripdragon



Joined: 27 Mar 2005
Posts: 3

Posted: Mon May 16, 2005 - 12:18 am    Post subject: Reply with quote

well it can be any key, I would just press the i button to flip it and asign a different key combo. If it is applescript it would have to be fast like just a button. That is all I want it to do is act like a button. Please dont say this is impossible I really want this simple peasy app.
View user's profile Send private message Widgets
drdoe



Joined: 18 May 2005
Posts: 17
Location: Denmark

Posted: Wed May 18, 2005 - 6:13 pm    Post subject: Reply with quote

You'd have to script it outside of the widget, I think... You can't make javaScript throw key-commands... and if you could my guess it that they'd only pertain to the Dashboard, since that would be the active "window"...

I don't know if you can make AppleScript throw keys, nor do I know if you can a make a shell script do... the best way would be to make a Cocoa plug-in that does what you need, but I can't help you there I'm afraid

Anyway, nothing's impossible.. it just takes longer
View user's profile Send private message Send e-mail Visit poster's website Widgets
Mayhem



Joined: 18 May 2005
Posts: 63
Location: Stockholm, Sweden

Posted: Wed May 18, 2005 - 7:30 pm    Post subject: Reply with quote

AppleScript is probably the way to go, you can use the Keystroke and/or Key Code commands of System Events.
View user's profile Send private message Send e-mail Visit poster's website MSN MessengerWidgets
tripdragon



Joined: 27 Mar 2005
Posts: 3

Posted: Wed Jun 01, 2005 - 3:02 pm    Post subject: Reply with quote

Egh,,, but apple script is slow... Has no one ever seen the expose dot ? It just sends the Applications window expose command to the current and poof windows go flying, cant I make another one of these ???


http://www.macosxhints.com/article.php?story=20031010141631859

Cause I also want to use this when useing expose
sleep 5 && killall Dock

it lets me make all of my windows small and still useable. But I have to run a script to do it. I would like to use it by just holding down a keyand have the windows press f10 or f9. A dream way to use it would be to just hold down f9 or f10 for two seconds. Can this be done ??
View user's profile Send private message Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group