Drew Posted May 31, 2008 Share Posted May 31, 2008 I'm trying to set my program to allow users to define their own hotkeys. I'm unsure as to how to go about this. Is there a UDF made or some way of going about this? Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2008 Share Posted May 31, 2008 ; Press Esc to terminate script, Pause/Break to "pause" $pausekey = "{PAUSE}" $exitkey = "{ESC}" $showmessagekey = "+!d" ;Shift-Alt-d Global $Paused HotKeySet($pausekey, "TogglePause") HotKeySet($exitkey, "Terminate") HotKeySet($showmessagekey, "ShowMessage") ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Have a look in example scripts too. I have seen a few floating about there.... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Drew Posted May 31, 2008 Author Share Posted May 31, 2008 I'm not sure how that works... I would still have to put the hotkey in the script. I need users to be able to set their own hotkey , WITHOUT being able to edit the source. I'm thinking , going by your example , $showmessagekey = input box blah blah.. but what about the users who don't understand what to enter there , therefore fudging the script all together... Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2008 Share Posted May 31, 2008 Did you check out example scripts? Does anyone try anything around here anymore, or does it always have to be served on a silver platter?http://www.autoitscript.com/forum/index.ph...5&hl=hotkey Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Drew Posted May 31, 2008 Author Share Posted May 31, 2008 (edited) Excuse me? I greatly appreciate your help, so please don't let this offend you...BUT... I have been pondering and trying things for the last 45 minutes. And Yes, I took your advice, and ever since I posted my last response I have been using the search tool searching the Example forum for anything with the word "hotkey" in it.So please... Do not make an opinion about me without knowing what I have and have not done.Does anyone try anything around here anymore,To answer your question, Yes. There are still a few of us who , yes need help, but also like to do things on our own when we can.Edit:Excuse my rant , I forgot to Thank you for the link. Thanks. Edited May 31, 2008 by Drew Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2008 Share Posted May 31, 2008 Hah... Excuse my rant as well. It seems the ammount of people that want a script or function here and now has increased tenfold lately. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ProgAndy Posted May 31, 2008 Share Posted May 31, 2008 I made one a week ago, but didn't post ot. Here it is: http://www.autoitscript.com/forum/index.php?showtopic=72588 *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now