Jump to content
sejo4444

image search more then 1 pictures

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?

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
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 ❤️ 

Share this post


Link to post
Share on other sites
Posted (edited)
#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

Share this post


Link to post
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,

 

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
Share on other sites

 

I don't know how to search multiple images in 1 program, so I make 3 folders and include them via one 

Share this post


Link to post
Share on other sites

The pasted script file is not very useful for debugging. It does not show us what you want to do. Neither does your description.

I would scan the folders for picture files, save the scan into the array, then process the array with your image search thingy.


~Dan~ :Emu.Zone now with Desktop Pets / DeskMates - (Bugfixed UniScrMate 4.1)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

sory for first script guy    

I want that if one 1 image is missing it automatically finds image number 2,if number 2 pictures mising find pictures number 3

 

Share this post


Link to post
Share on other sites
Posted (edited)

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

~Dan~ :Emu.Zone now with Desktop Pets / DeskMates - (Bugfixed UniScrMate 4.1)

Share this post


Link to post
Share on other sites

im new here and i dont know much but im thin you right,but dont andestand soo weel how thin funktions can you explain too me a litle bit 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

 

i want a random search for pictures if possible if i have 5 pictures and delete 4 i want him to find that one

Share this post


Link to post
Share on other sites
Posted (edited)

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

~Dan~ :Emu.Zone now with Desktop Pets / DeskMates - (Bugfixed UniScrMate 4.1)

Share this post


Link to post
Share on other sites

 

i took your script and ran the result is true tre true how do i set my mouse to go to those pictures.
if you can add that to your script I would be grateful to heaven ❤️ 

Share this post


Link to post
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.


~Dan~ :Emu.Zone now with Desktop Pets / DeskMates - (Bugfixed UniScrMate 4.1)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...