Kickassjoe Posted August 5, 2006 Share Posted August 5, 2006 ok... here it goes... i want to send the key that was pressed and then do the function... but it says recursion error every time i try to do this! here is some example code that doesnt work for me... plz dont make me code that i need beta for... im not at my house and my laptop cant connect to the internet... and doesnt have beta ver. heres teh code Hotkeyset("{insert}", "myfunc") While 1 Sleep(1000) WEnd Func myfunc() Send("{insert}") FileWriteLine("test.txt", "function started" EndFunc What goes around comes around... Payback's a bitch. Link to comment Share on other sites More sharing options...
Helge Posted August 5, 2006 Share Posted August 5, 2006 This is very logical. When you press insert "myfunc" is called. In "myfunc" insert is sent again which calls "myfunc" another time. And so it continues. To solve this you need to disable your hotkey before using Send, for then to re-enable it afterwards. There's also a missing paranthese in your script. Test this script instead : Hotkeyset("{insert}", "myfunc") While 1 Sleep(1000) WEnd Func myfunc() Hotkeyset("{insert}") Send("{insert}") Hotkeyset("{insert}", "myfunc") FileWriteLine("test.txt", "function started") EndFunc Link to comment Share on other sites More sharing options...
Kickassjoe Posted August 5, 2006 Author Share Posted August 5, 2006 (edited) wow... never knew that... thanks for the solution and fast reply! im gonna go test it right now! i will tell u if it works! thanks again EDIT: yea i just saw the missed parenthesis... the real script is on a dif comp. i just wrote that one up quick. Edited August 5, 2006 by Kickassjoe What goes around comes around... Payback's a bitch. Link to comment Share on other sites More sharing options...
Kickassjoe Posted August 5, 2006 Author Share Posted August 5, 2006 Thanks much man... i never would have figured that out! i thought it was sumthing complicated lol. What goes around comes around... Payback's a bitch. 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