Jump to content

About ImageSearch


Recommended Posts

Hi, newbie on autoit here. I'm trying to make a simple script for running a boring job on firefox, but i am having trouble already in the beggining of this xD

So i know there is a script called FF.au3 to make it easy to work on ff.. but i had trouble to work on it so i tried this:
#include <ImageSearch.au3>

$TimeTolerance = 0
$FFOpenPath = [My Firefox.exe path]
$FFOpened = [An Image that has to mandatorily appear when ff starts]

ShellExecute($FFOpenPath)
Do
   $search = _ImageSearch($FFOpened, 1, $x, $y, 0)
   If $search = 1 Then
   MsgBox(0,"ImageSearch","It worked!")
   ExitLoop()
   EndIf
   If $search = 0 Then
      MsgBox(0,"ImageSearch","Can't find image!")
      Sleep(5000)
      $TimeTolerance = $TimeTolerance + 1
   EndIf
Until $TimeTolerance = 3

Aaaand... it's not working.. It opens firefox but none of the MsgBoxs shows up..

i'm not suprised for not working cause i'm kinda new to scripting language but i don't know what i did wrong :

Help would be apreciated :DD

Thanks! =)

 

Link to comment
Share on other sites

This one?

#Include <FF.au3>

 _FFStart("http://ff-au3-example.thorsten-willert.de/")

If _FFIsConnected() Then
    Sleep(2000)
    _FFAction("presentationmode",true)
    Sleep(2000)
    _FFOpenURL("http://www.google.com")
    Sleep(2000)
    _FFAction("back")
    _FFAction("presentationmode",false)
    Sleep(2000)
    _FFOpenURL("chrome:bookmarks")
    Sleep(2000)
    _FFAction("alert","Bye bye ...")
    _FFQuit()
EndIf

Yes, and the script just does nothing :|

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