Jasio Posted July 21, 2006 Share Posted July 21, 2006 I need to have a pixel checksum loop while my program is running. So how do i do this =/ Checksum: Sleep(500) PixelChecksum( 729, 570, 731, 573 ) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 21, 2006 Moderators Share Posted July 21, 2006 (edited) Run 2 scripts and put the pixelchecksum in a loop? Edit: Actually, I've been using alot of AdlibEnable() Global $PixCheckSum AdlibEnable('_CheckSum', 500) Hotkeyset ; etc.... rest of script Func _CheckSum() $PixCheckSum = PixelChecksum( 729, 570, 731, 573 ) EndFuncThis will always give $PixCheckSum the value of the PixelCheckSum() Edit2: Ooop, you wanted to check it every 500 ms, I had you checking every 5 seconds Edited July 21, 2006 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Jasio Posted July 21, 2006 Author Share Posted July 21, 2006 Run 2 scripts and put the pixelchecksum in a loop?"If" i run Prog 1 as the script, and Prog 2 as the Checksum, when prog 1 is finished, what is the code to end prog 2?.. Thanks , that is what i originally wanted to do, but i just dont know how to stop it after its done Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 21, 2006 Moderators Share Posted July 21, 2006 "If" i run Prog 1 as the script, and Prog 2 as the Checksum, when prog 1 is finished, what is the code to end prog 2?.. Thanks , that is what i originally wanted to do, but i just dont know how to stop it after its doneRead my edit. 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. Link to comment Share on other sites More sharing options...
Busti Posted July 21, 2006 Share Posted July 21, 2006 use corotine multithreading UDF My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
Jasio Posted July 21, 2006 Author Share Posted July 21, 2006 (edited) Ok thanks smoke =) seems to work, if i have a problem i'll reply =/ And yea, every 5 seconds = character dies -.-.. I just figured you put it as an example, thanks again Edited July 21, 2006 by Jasio Link to comment Share on other sites More sharing options...
Jasio Posted July 21, 2006 Author Share Posted July 21, 2006 Ack.. If statement with this? If (checksum changes? dont know how to script that ) Then Send("1") Else Do Nothing EndIf.. And i need that to loop throughout the entire script to.. So would this involve a second program? or can it still be done using the adlib? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 21, 2006 Moderators Share Posted July 21, 2006 Ack.. If statement with this? If (checksum changes? dont know how to script that ) Then Send("1") Else Do Nothing EndIf.. And i need that to loop throughout the entire script to.. So would this involve a second program? or can it still be done using the adlib?Global $PixCheckSum, $PixCheckSumCompare AdlibEnable('_CheckSum', 500) Hotkeyset ; etc.... rest of script Func _CheckSum() $PixCheckSum = PixelChecksum(729, 570, 731, 573) If $PixCheckSum <> $PixCheckSumCompare Then Send('1') $PixCheckSumCompare = $PixCheckSum EndIf EndFunc 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. Link to comment Share on other sites More sharing options...
Jasio Posted July 21, 2006 Author Share Posted July 21, 2006 Thank you. 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