BALA Posted February 25, 2007 Share Posted February 25, 2007 (edited) HotKeySet("{ESC}", "Close") HotKeySet("n", "nm") HotKeySet("c", "cv") HotKeySet("v", "vb") Func Close() Exit EndFunc Func nm() While 1 Send("n") Send("m") WEnd EndFunc Func cv() While 1 Send("c") Send("v") WEnd EndFunc Func vb() While 1 Send("v") Send("b") WEnd EndFunc While 1 sleep(10) WEndWhen I run this script and click "c," it gives me this error: C:\Documents and Settings\Ba-La\Desktop\New AutoIt v3 Script.au3 (28) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:Send("c") What is happening that gives out that error? Edited February 25, 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 Link to comment Share on other sites More sharing options...
xcal Posted February 25, 2007 Share Posted February 25, 2007 You're having the same function calling itself over and over. This creates a rift in the time-space continuum. You're basically threatening all life on earth as we know it. Unset the hotkey before calling it from within the same function, then reset it afterwards before leaving the function. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Helge Posted February 25, 2007 Share Posted February 25, 2007 ...which is also mentioned in the helpfile :To Send() a key combination which will trigger a HotKeySet() event, either use ControlSend()or unregister the HotKeySet() event, otherwise, the Send() event may trigger an infinite loop. 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