Matthy Posted February 22, 2008 Share Posted February 22, 2008 hi i want to make a hotkey function to calc something not done yet.. but anyway I tried these ones HotKeySet("+=", "calc_signplus") HotKeySet("{+}", "calc_signplus") HotKeySet("+", "calc_signplus") HotKeySet('+', "calc_signplus") func calc_signplus () $var = @HotKeyPressed HotKeySet($var) Send($var) HotKeySet($var, "calc_signplus") MsgBox(0,'',"+") EndFuncoÝ÷ ØÐVwhÂÇhzÉ赩e£azȦºVè~Ø^ªê- 4K´Ãº®¢×(¸§jب}ÒzwB¢iØÍêè~V Eë.ا§²¦·¬³}÷ßï¢Ø^éi~)^nëm+(ë0¢¹u¼¢)ඬjëh×6HotKeySet("+6", "calc_sign6") func calc_sign6 () $var = @HotKeyPressed HotKeySet($var) Send($var) HotKeySet($var, "calc_sign6") MsgBox(0,'',"^") EndFunc so that wasnt the problem does anyone know how to get the + sign because to calculate with a ^ sign isnt cuite cool Cheers Matthy Link to comment Share on other sites More sharing options...
Aassdd Posted February 22, 2008 Share Posted February 22, 2008 (edited) Helpfile:'+'This tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a".Maybe that's why it doesn't work.EDIT: Go to the help file > index and type Send Key list > scroll down to the table ({NUMPAD...}). Edited February 22, 2008 by Aassdd Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 22, 2008 Share Posted February 22, 2008 Your choices are Shift of "=", which is "+=", or "{NUMPADADD}" for the number entry pad "+" key. Working demo: HotKeySet("+=", "calc_signplus") HotKeySet("{NUMPADADD}", "calc_signplus") HotKeySet("{ESC}", "_Quit") While 1 Sleep(20) WEnd Func calc_signplus() $var = @HotKeyPressed ConsoleWrite("$var = " & $var & @LF) Switch $var Case "+=" MsgBox(64, 'Result', 'You pressed shift-of-equal ("+=").', 3) Case "{NUMPADADD}" MsgBox(64, 'Result', 'You pressed number-pad-plus ("{NUMPADADD}").', 3) Case Else MsgBox(16, 'Error', 'Unexpected hot key: ' & $var) EndSwitch EndFunc ;==>calc_signplus Func _Quit() Exit EndFunc Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Matthy Posted February 26, 2008 Author Share Posted February 26, 2008 thanks a lot but i am still asking myself whats the difference between this and HotKeySet("+=", "calc_signplus") func calc_signplus () $var = @HotKeyPressed HotKeySet($var) Send($var) HotKeySet($var, "calc_signplus") MsgBox(0,'',"+") EndFunc because you only use the switch fuction and the other does it all the time thanks for your help matthy Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 26, 2008 Share Posted February 26, 2008 thanks a lot but i am still asking myself whats the difference between this and HotKeySet("+=", "calc_signplus") func calc_signplus () $var = @HotKeyPressed HotKeySet($var) Send($var) HotKeySet($var, "calc_signplus") MsgBox(0,'',"+") EndFuncoÝ÷ Ù·jëʨ®±ëazÌ"µÈ_¹Ëb¢v§vØ^¢Ø^Ú²+Z[azئzØZK¢¼¨º¸^¶Ørþ«¨µãÉ·ßÙ¦Ë"¨ººh{S«p¢¹,~)Þ¦º/×ÊuÖ¥¢m¢G¦Ø^±Êâ¦Ö¥÷Ú^®©±¬ÊÚÆ+b¶X¤zØb±«¢+Ù!½Ñ-åMÐ ÅÕ½Ðì¬ôÅÕ½Ðì°ÅÕ½Ðí±}Í¥¹Á±ÕÌÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐííM ôÅÕ½Ðì°ÅÕ½Ðí}EÕ¥ÐÅÕ½Ðì¤()]¡¥±Ä(%M±À ÈÀ¤)]¹()Õ¹±}Í¥¹Á±ÕÌ ¤($ÀÌØíÙÈô!½Ñ-åAÉÍÍ(%!½Ñ-åMÐ ÀÌØíÙȤ(%M¹ ÀÌØíÙȤ(%!½Ñ-åMÐ ÀÌØíÙÈ°ÅÕ½Ðí±}Í¥¹Á±ÕÌÅÕ½Ðì¤((%5Í ½à À°ÌäìÌäì°ÅÕ½Ðì¬ÅÕ½Ðì¤)¹Õ¹ìôôÐí±}Í¥¹Á±ÕÌ()Õ¹}EեР¤(%á¥Ð)¹Õ¹ Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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