Mattraks Posted February 2, 2008 Share Posted February 2, 2008 (edited) Delete Edited October 21, 2008 by Mattraks Link to comment Share on other sites More sharing options...
panlatv Posted February 2, 2008 Share Posted February 2, 2008 "do sleep until" is not better? And call your fonction "in the function", look strage...never end? Link to comment Share on other sites More sharing options...
Uten Posted February 2, 2008 Share Posted February 2, 2008 This function does what is called a recursive call and $autoclickstatusnum has to change before all the calls will return. So basically you could end up in a situation where all your available memory are wasted. Us a loop instead. Func _Click() While $autoclickstatusnum = 1 MouseClick("Left") Sleep($autoclicksleep) WEnd EndFunc You should also explore Addlibenable and addlibdisable in the help file.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
panlatv Posted February 2, 2008 Share Posted February 2, 2008 Um... what? I cant understand you.Sorry i'm not englishif you want to do a function to check something (error for exemple) every x milliseconds, you can use AdlibEnable.But in your exemple, the function never stop. Can you explain what the function have to do? Link to comment Share on other sites More sharing options...
Uten Posted February 2, 2008 Share Posted February 2, 2008 It will stop the same way yours will stop. At the failing condition $autoclickstatusnum <> 1. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Squirrely1 Posted February 2, 2008 Share Posted February 2, 2008 (edited) If you are going to use the function "GUICtrlCreateInput" then you need something to trigger a "read" of that control, like a button push: #include <GUIConstantsEx.au3> GUICreate("My Proggy") $autoclicksleep = GUICtrlCreateInput("3", 11, 11, 51, 21) $button = GUICtrlCreateButton("Go", 73,11,40,23) GUISetState() While 1 Sleep(60) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button Going() $msg = 0 EndSelect WEnd Func Going() $Time = GUICtrlRead($autoclicksleep) $Time = $Time * 1000;convert to milliseconds for the AdlibEnable command _Click() AdlibEnable("_Click", $Time) EndFunc Func _Click() ; The something to do repeatedly, goes here ... TrayTip("My Proggy", "Squirrely business abounds", 5) ;MouseClick("Left") EndFunc ;==>_Click Edited February 2, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
GEOSoft Posted February 2, 2008 Share Posted February 2, 2008 $autoclicksleep = GUICtrlCreateInput("0", 160, 10, 50, 20) $autoclicksleep = $autoclicksleep * 1000;convert to milliseconds for the AdlibEnable command _Click() AdlibEnable("_Click", $autoclicksleep) While 1 Sleep(20) WEnd Func _Click() MouseClick("Left") EndFunc ;==>_ClickThat's going to fail at the second line. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Squirrely1 Posted February 2, 2008 Share Posted February 2, 2008 Try looking at my first post again. I updated it. Das Häschen benutzt Radar 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