Jump to content

Any way to Do...Until two expressions are true? Instead of one?


Recommended Posts

It is possible .... just use And.

Post and example you tried that isn't working.

It's not that it's not working, it's just using @error is easier for what I'm doing, so is it possible to do a Do...Until Bla = Bla And Blu has an error, or doesn't have an error. How would you code that bit? Would it be Blu = @error? So Do...Until Blu has an error.

Link to comment
Share on other sites

It's not that it's not working, it's just using @error is easier for what I'm doing, so is it possible to do a Do...Until Bla = Bla And Blu has an error, or doesn't have an error. How would you code that bit? Would it be Blu = @error? So Do...Until Blu has an error.

An example would be much better for us. It's very easy for us to create an example and then for you to say it isn't what you meant. I have personnally wasted hours in these forums doing just that for people :)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

An example would be much better for us. It's very easy for us to create an example and then for you to say it isn't what you meant. I have personnally wasted hours in these forums doing just that for people :)

Instead of true and false, can you do @error or no @error? Nothing complex or anything, very basic, but I just need to know how you would word it.

If you really need an example:

Do 

Send ("1")

Until PixelSearch(0, 0, 1280, 1050, 8213822, 5) = @error And PixelSearch( 569, 31 , 707 , 85, 14099225, 10) = Not @error

Is that how you would put it?

Link to comment
Share on other sites

  • Developers

You either have to save de @error results at and test for those or test for a returned Array.

Does this work for you?

Do

Send ("1")

Until Not IsArray(PixelSearch(0, 0, 1280, 1050, 8213822, 5)) And IsArray(PixelSearch( 569, 31 , 707 , 85, 14099225, 10))

Or else maybe:

Do
    Send("1")
    PixelSearch(0, 0, 1280, 1050, 8213822, 5)
    $err1 = @error
    PixelSearch(569, 31, 707, 85, 14099225, 10)
    $err2 = @error
Until $err1 <> 0 And $err2 = 0
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

You either have to save de @error results at and test for those or test for a returned Array.

Does this work for you?

Do

Send ("1")

Until Not IsArray(PixelSearch(0, 0, 1280, 1050, 8213822, 5)) And IsArray(PixelSearch( 569, 31 , 707 , 85, 14099225, 10))

Or else maybe:

Do
    Send("1")
    PixelSearch(0, 0, 1280, 1050, 8213822, 5)
    $err1 = @error
    PixelSearch(569, 31, 707, 85, 14099225, 10)
    $err2 = @error
Until $err1 <> 0 And $err2 = 0
Could you explain what those 2 mean/do?
Link to comment
Share on other sites

  • Developers

First example checks if PixelSearch returns an Array. when an Array is returned the functions found the pixel

Second example performs the 2 pixelsearch functions save each @error returned.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

What's an array variable? What's ==?

See my answer above your last post and I advice you to spend some time first to learn the basics seeing this last question.

There are some nice tutorials available for that, just look at the stickies.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

well... i never use "==" is that a comparing statement? anyway i always use "=" or "<>" ect... but yeah WHAT IS "=="? im kinda curious... i googled it a while back and it says a comparing statement but whats the differece from the others?

EDIT

some typos :)

Edited by CodyBarrett
Link to comment
Share on other sites

hmmm oh ok ahaha.. its case sensitive and "=" isn't thanks

Link to comment
Share on other sites

well... i never use "==" is that a comparing statement? anyway i always use "=" or "<>" ect... but yeah WHAT IS "=="? im kinda curious... i googled it a while back and it says a comparing statement but whats the differece from the others?

EDIT

some typos :)

Actually I use == because its the comparing statement in C++. A=B means A is B and A==B means check if A is B.

Edited by Qousio
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...