XxSunxX Posted January 30, 2007 Posted January 30, 2007 Its me again, I can't get the key macro to work. Could someone please give me a full example script instead of telling to look myself, I found the help file but its not what I want because the example is mixed up with a GUI window create, and isn't the kind of key press I want, its just a hotkey for pause script or something. So could someone please give me an example script that does the following:Press key "1" to activate the loop of Z.Key Z is looped (pressed over and over till otherwise..)Press key "1" a second time to stop the loop of Z
Moderators SmOke_N Posted January 30, 2007 Moderators Posted January 30, 2007 Its me again, I can't get the key macro to work. Could someone please give me a full example script instead of telling to look myself, I found the help file but its not what I want because the example is mixed up with a GUI window create, and isn't the kind of key press I want, its just a hotkey for pause script or something. So could someone please give me an example script that does the following:Press key "1" to activate the loop of Z.Key Z is looped (pressed over and over till otherwise..)Press key "1" a second time to stop the loop of Zhttp://www.autoitscript.com/autoit3/docs/f...s/HotKeySet.htmHas the only example you need. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Helge Posted January 30, 2007 Posted January 30, 2007 Its me again, I can't get the key macro to work. Could someone please give me a full example script instead of telling to look myself, I found the help file but its not what I want because the example is mixed up with a GUI window create, and isn't the kind of key press I want, its just a hotkey for pause script or something. So could someone please give me an example script that does the following:Press key "1" to activate the loop of Z.Key Z is looped (pressed over and over till otherwise..)Press key "1" a second time to stop the loop of Zhttp://www.autoitscript.com/forum/index.php?showtopic=40326Is the only topic you need for this subject.
XxSunxX Posted January 30, 2007 Author Posted January 30, 2007 .... ..... ...... ..........*Ignores the posts above seeming they didn't read*.... Can someone post an example script?
BALA Posted January 30, 2007 Posted January 30, 2007 (edited) .... ..... ...... ..........*Ignores the posts above seeming they didn't read*.... Can someone post an example script? Not to sound insulting but you only need to add two example scripts together that were provided in that previous thread. HotKeySet("1", "Main") Func Main() while 1 If _IsPressed(31) Then ; If 1 key is pressed ExitLoop ; Exit Loop EndIf send("z") Sleep(5) Wend EndFunc Edited January 30, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
XxSunxX Posted January 30, 2007 Author Posted January 30, 2007 Not to sound insulting but you only need to add two example scripts together that were provided in that previous thread. HotKeySet("1", "Main") Func Main() while 1 If _IsPressed(31) Then ; If 1 key is pressed ExitLoop ; Exit Loop EndIf send("z") Sleep(5) Wend EndFunc If_IsPressed(31)<-----How is that 1? Oh, and what would the keys be for numpad 1-9, insert, home, page up, delete, end, page down
BALA Posted January 30, 2007 Posted January 30, 2007 (edited) the 31 is a hexkey for the key "1" From help file under _IsPressed: 60 Numeric keypad 0 key 61 Numeric keypad 1 key 62 Numeric keypad 2 key 63 Numeric keypad 3 key 64 Numeric keypad 4 key 65 Numeric keypad 5 key 66 Numeric keypad 6 key 67 Numeric keypad 7 key 68 Numeric keypad 8 key 69 Numeric keypad 9 key Edited January 30, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Moderators SmOke_N Posted January 30, 2007 Moderators Posted January 30, 2007 .........................*Ignores the posts above seeming they didn't read*....Can someone post an example script?You resemble that remark. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
XxSunxX Posted January 30, 2007 Author Posted January 30, 2007 HotKeySet("1", "Main") Func Main() while 1 If _IsPressed(31) Then ; If 1 key is pressed ExitLoop ; Exit Loop EndIf send("z") Sleep(5) Wend EndFunc At the HotKeySet("1","Main" and at While 1, how would I go setting it as the numpad key I wish to use?
BALA Posted January 30, 2007 Posted January 30, 2007 (edited) the 31 is a hexkey for the key "1" From help file under _IsPressed: 60 Numeric keypad 0 key 61 Numeric keypad 1 key 62 Numeric keypad 2 key 63 Numeric keypad 3 key 64 Numeric keypad 4 key 65 Numeric keypad 5 key 66 Numeric keypad 6 key 67 Numeric keypad 7 key 68 Numeric keypad 8 key 69 Numeric keypad 9 key Did you even read my post.... If you want numerical 0 for example, you would replace 31 with 60. 61 if you want numerical 1, 62 for numerical 2, etc. Edited January 30, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Helge Posted January 30, 2007 Posted January 30, 2007 *Ignores the posts above seeming they didn't read*....Oh, damn...you're totally right. Me referring you to your previous topic makes it perfectly clear that I didn't read...Eehm, I don't see the logic in that. Also, please do explain how it's needed to create another topic one hour afterthe last post in your previous topic on the very same subject.
XxSunxX Posted January 30, 2007 Author Posted January 30, 2007 Did you even read my post? Re-read it...
_Kurt Posted January 30, 2007 Posted January 30, 2007 Did you even read my post? Re-read it... Stop getting people to work for you. All the necessary information has been given to you, they referred IsPressed and HotkeySet, which are the two functions you are looking for. Open up the damn helpfile, read the information, attempt a "test", experiment, then, if all fails, come back for a little more advice.Kurt Awaiting Diablo III..
Paulie Posted January 30, 2007 Posted January 30, 2007 (edited) Where do you think you get off? XxSunxX You reject the statements of 2 regulars(Smoke_N and Helge) on the forum without reading their posts? And then have the intestinal fortitude to actually accuse them of not reading? Do you have a brain defect? And why would you used "_IsPressed" for this script? This problem is much quicker and easier to solve with "Hotkeyset" as mentioned above. Copied straight from smokes link with minor alterations: ; Press Esc to terminate script Global $UnPaused HotKeySet("1", "TogglePause") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) ToolTip("Script is Paused",0,0) WEnd Func TogglePause() $UnPaused = NOT $UnPaused While $UnPaused ToolTip("Sending...",0,0) Send("z") WEnd EndFunc Func Terminate() Exit 0 EndFunc I wanna hear some apologies from you mouth. Edited January 30, 2007 by Paulie
somdcomputerguy Posted December 12, 2011 Posted December 12, 2011 Krankios, do you realize you posted in a 4 year old thread? - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
IanN1990 Posted December 12, 2011 Posted December 12, 2011 (edited) That explains why a topic with 15 posts, have 20,000 views ^^ I was scratching my head trying to figure it out lol Edited December 13, 2011 by IanN1990
Krankios Posted December 17, 2011 Posted December 17, 2011 Krankios, do you realize you posted in a 4 year old thread?Yeah i do and i must be pretty "interesting" to you considering you are watching what i post
somdcomputerguy Posted December 18, 2011 Posted December 18, 2011 Yeah i do and i must be pretty "interesting" to you considering you are watching what i post Well I do read most new posts, but when they're from you, I just can't click fast enough.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Developers Jos Posted December 18, 2011 Developers Posted December 18, 2011 Yeah i do and i must be pretty "interesting" to you considering you are watching what i post Not interesting and please don't do this unless there is a real use for it.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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