Jump to content

image search more then 1 pictures


sejo4444
 Share

Recommended Posts

if I put a search for more images, say 5, if one praises the task, it is not completed, but the message falsefalsefalse........... appears  and so on indefinitely, how can I set it to go to the next one if it doesn't find the given image?

Link to comment
Share on other sites

  • Developers

Your not being very clear with your question.  Try explaining what exactly you want to accomplish and show us your current script that is giving issues.

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

ok if i have  a 10 pictures  1p,2p,3p,4p,5p...   if my autoit  not find  pictures 4  then  he not going on nex 5,6,7 pic.. i need autoit to keep looking for other images. thanks for replay man ❤️ 

Link to comment
Share on other sites

  • Developers

Not much clearer yet...sorry.
What program is this for ? 
Show your current script as asked!

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

#include <ImageSearch2015.au3>

$x1=0
$y1=0

Sleep(3000)
$pictures = "C:\Program Files\ImageSearch2015\Capture1.png"

do
$result = _ImageSearch($pictures,1,$x1,$y1,0,0)
;_ImageSearch($findImage,$resultPosition,ByRef $x,ByRef $y,$tolerance,$transparency = 0)


ConsoleWrite($result)
Until $result =1;

if $result=1 Then
    MouseMove($x1,$y1,50)


Else
    MsgBox(0,"MSG","End")
EndIf

#include <ImageSearch2015.au3>
#include <imagesearchpictures2.au3>

Sleep(2000)


#include <ImageSearch2015.au3>
#include <imagesearxhpictures3.au3>


 

Edited by Jos
added codebox
Link to comment
Share on other sites

if I can't find the image I'm looking for, I want the program to find other images it can.
if all 10 pictures are there, he will easily find each one, but if one is missing, he will write false,falsemfalse all the time to infinity 

 

I can explain to you privately what the program is intended for, I can explain to you privately on fb 

 

58 minutes ago, sejo4444 said:

I can explain to you privately what the program is intended for,

 

Link to comment
Share on other sites

  • Developers

Is there a fire somewhere? :) 

1 hour ago, sejo4444 said:

I can explain to you privately what the program is intended for, I can explain to you privately on fb 

FB ... as in FaceBook?    nah, just PM me in these forums when you can't share it publicly. ;)  

As to the posted script: What are all these #include<> statements intended for? 

1 hour ago, sejo4444 said:

if all 10 pictures are there, he will easily find each one, but if one is missing, he will write false,falsemfalse all the time to infinity 

There is only one picture, not 10 , so it will compare this one picture!

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

#include <ImageSearch2015.au3>

$x1=0
$y1=0

$pictures = "C:\Program Files\ImageSearch2015\Capture1.png"

do
$result = _ImageSearch($pictures,1,$x1,$y1,0,0)
;_ImageSearch($findImage,$resultPosition,ByRef $x,ByRef $y,$tolerance,$transparency = 0)


ConsoleWrite($result)
Until $result = 1;

if $result= 1 then
    MouseMove($x1,$y1,50)


Else
    MsgBox(0,0,0)
EndIf

#include <ImageSearch2015.au3>

$x1=0
$y1=0


$pictures = "C:\Program Files\ImageSearch2015\Capture2.png"

do
$result = _ImageSearch($pictures,1,$x1,$y1,0,0)
;_ImageSearch($findImage,$resultPosition,ByRef $x,ByRef $y,$tolerance,$transparency = 0)


ConsoleWrite($result)
Until $result =1;

if $result=1 Then
    MouseMove($x1,$y1,50)


Else
    MsgBox(0,"MSG","End")
    EndIf


#include <ImageSearch2015.au3>

$x1=0
$y1=0


$pictures = "C:\Program Files\ImageSearch2015\Capture3.png"

do
$result = _ImageSearch($pictures,1,$x1,$y1,0,0)
;_ImageSearch($findImage,$resultPosition,ByRef $x,ByRef $y,$tolerance,$transparency = 0)


ConsoleWrite($result)
Until $result =1;

if $result=1 Then
    MouseMove($x1,$y1,50)


Else
    MsgBox(0,"MSG","End")
    EndIf

Link to comment
Share on other sites

yes, you could do something like this

 

#include <ImageSearch2015.au3>

$x1 = 0
$y1 = 0

Local $tmp_folder, $tmp_fname, $tmp_ext, $pictures, $result
$tmp_folder = "C:\Program Files\ImageSearch2015\"
$tmp_fname = "Capture"
$tmp_ext = ".png"

For $loop = 0 To 10

    $pictures = $tmp_folder & $tmp_fname & $loop & $tmp_ext
    
    If FileExists($pictures) Then
        $result = _ImageSearch($pictures, 1, $x1, $y1, 0, 0)
        ;_ImageSearch($findImage,$resultPosition,ByRef $x,ByRef $y,$tolerance,$transparency = 0)
        ConsoleWrite($result)
    EndIf
Next

I can't test it, because i do not have the ImageSearch2015.au3

 

Edited by Dan_555

Some of my script sourcecode

Link to comment
Share on other sites

the problem is not too find multiple pictures i can find 10/20/40 but as some picture is missing hi does not continue the task, if I have 40 pictures if he does not find the first two he will not continue to look for the other 38

Link to comment
Share on other sites

Do the pictures have the same name ? Like capture0.png, capture10.png etc ?

 

If you place, fileexist, before processing the pictures, it will skip the nonexistant pictures.

 

Like in my post: (i'v changed the 10 into 10000:

For $loop = 0 To 10000

    $pictures = $tmp_folder & $tmp_fname & $loop & $tmp_ext
    
    If FileExists($pictures) Then

 

Edited by Dan_555

Some of my script sourcecode

Link to comment
Share on other sites

#include <ImageSearch2015.au3>

$x1 = 0
$y1 = 0

Local $tmp_folder, $tmp_fname, $tmp_ext, $pictures, $result
$tmp_folder = "C:\Program Files\ImageSearch2015\"
$tmp_fname = "Capture"
$tmp_ext = ".png"

For $loop = 0 To 10000

    $pictures = $tmp_folder & $tmp_fname & $loop & $tmp_ext
    
    If FileExists($pictures) Then
        $result = _ImageSearch($pictures, 1, $x1, $y1, 0, 0)
        ;_ImageSearch($findImage,$resultPosition,ByRef $x,ByRef $y,$tolerance,$transparency = 0)
        ConsoleWrite($result)
        if $result=1 Then
            MouseMove($x1,$y1,50)
            MsgBox(0,"ImageSearch","Click to continue",20)
            
        EndIf
    EndIf
Next

Kinda like this.

Some of my script sourcecode

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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