Sign in to follow this  
Followers 0
Avignale2

Quick refresh

9 posts in this topic

Hi i used to script in back in Auto IT v2,

last time i can remember using it though was over a year ago,

I have been looking at some tutorials and through the reference for the scripting language trying to piece it all back together but i get hung up over a simple pixel search.

while @error = 0

PixelSearch( 830, 300, 840, 310, 0x000000 )

sleep(200)

WEnd

this is what i have to find the color black, and it is supposed to loop until it no longer finds the color black and end the loop.

but I can't tell whats going on because once it gets to this part of the script it appears the lopp never ends as the rest of my script doesn't happen.

I honestly remember using a different method for checking pixels for a color in a loop but i can't remember, and I've formated my computer so many times I can't go back and look though my old scripts.

Share this post


Link to post
Share on other sites

This shud probably work

Global $Pixel
Do
    $Pixel = PixelSearch( 830, 300, 840, 310, 0xFFFFFF )
    Sleep(200)
Until Not IsArray($Pixel)

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Thank you very much, I really like this method. It actually solved another problem i could tell was going to come up later on too.

THank you for being such a nice fellow.

Share this post


Link to post
Share on other sites

I have an idea for a project but i am not sure if it is possible.

My employment agency that I am signed up with posts interviews and such that they have set up for me on my own page in their site.

www.jobsearch.gov.au

and since the page is html, i thought hey maybe auto it can continually check the page for me and open up an sms program to tell me the details that were posted on my employment page!!!

so 1st question does autoit have the ability to interact with a page without having to have a browser open? like can it interact in any meaningful way with an html page?

Share this post


Link to post
Share on other sites

Can i nest an If inside a Do Until?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Sure can

; Simple If...Then's can go on one line
$x = 0
Do
    ToolTip($x, 0 ,0)
    If $x = 5 Then ExitLoop
    Sleep (1000)
    $x += 1
Until $x = 10

; More complicated If...Then's have to go on three
$x = 0
Do
    ToolTip($x, 0 ,0)
    If $x = 4 Then
        ExitLoop
    EndIf
    Sleep (1000)
    $x += 1
Until $x = 10
Edited by exodius

Share this post


Link to post
Share on other sites

The ExitLoop in the example, that Exits the Do until loop altogether?

If so then that is pretty awesome

Share this post


Link to post
Share on other sites

Here's some links to help you out. Welcome to v3! And the Forum!

Keyword ExitLoop

AutoIt

AutoIt Wiki

"C:\Program Files\AutoIt3\AutoIt.chm"


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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