Jump to content

Loop While Program Is Running?


Recommended Posts

  • Moderators

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

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

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

Link to comment
Share on other sites

  • Moderators

"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.

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

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
Link to comment
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?

Link to comment
Share on other sites

  • Moderators

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...