Sign in to follow this  
Followers 0
Jasio

Loop While Program Is Running?

9 posts in this topic

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 )

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 )
EndFunc
This 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 :D

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

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 :D, that is what i originally wanted to do, but i just dont know how to stop it after its done

Share this post


Link to post
Share on other sites

"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 :D, that is what i originally wanted to do, but i just dont know how to stop it after its done

Read my edit.

[center]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.[/center]

Share this post


Link to post
Share on other sites

use corotine multithreading UDF


My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 :D

Edited by Jasio

Share this post


Link to post
Share on other sites

Ack.. If statement with this?

If (checksum changes? dont know how to script that :wacko: ) Then

Send("1")

Else

Do Nothing :D

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?

Share this post


Link to post
Share on other sites

Ack.. If statement with this?

If (checksum changes? dont know how to script that :wacko: ) Then

Send("1")

Else

Do Nothing :D

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

Thank you.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0