Jump to content

IF Image then click on it


Recommended Posts

Hello Guys

I love AutoIT, but i was only a user until now.

Since i need a script, i'm trying to create it with AutoIT, but i didn't had success yet.

What i want to do:
In Firefox:

If Image is on homepage, click on it

If Image is not on homepage, press F5

I'm aware of Imagesearch but i don't get how to make this if else operation above.

I would also pay for help :)

Thanks in advance

3.

Edited by 3min3m
Link to comment
Share on other sites

Ok what i found out till now:
 

#Include <FF.au3>
_FFSTART("thehomepageiwanttoclickonimage")
_FFImageClick("theimageiwanttoclick.jpg")

now i have to include a function which makes F5 when the image is not on the page.

Link to comment
Share on other sites

Thanks a lot for your help, i really appreciate it!

When i try this i get:
error5jq7i.png

my code:

#Include <FF.au3>
_FFSTART("homepagee....")
_FFImageClick("pic on homepage...")
If :@error Then
    Send("{F5}")
EndIf

Edited by 3min3m
Link to comment
Share on other sites

Ok now it works, but it only refreshs the page 1 time.

What i want to do it now:
refresh the page until the pic is on the page

ot: i have fun like a kid, this is the first script and it looks like i'll get it to work with you :))

Edited by 3min3m
Link to comment
Share on other sites

ok i tried this now:
 

#Include <FF.au3>
_FFSTART("homepagee....")
_FFImageClick("pic on homepage...")
If @error Then
    Send("{F5}")
EndIf

Do
     Send("{F5}")
Until _FFImageClick("thepicutre.jpg")

he now makes very fast f5 (have to add the sleep function i see) but wont click image

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