Jump to content

ImageSearch Problem :(


Recommended Posts

Hello guys,

I have a problem with my ImageSearch...  In my Folder is the ImageSearch dll and the searched pictures but, They give me a error; $Search = _ImageSearch('Level.bmp , 0, $X, $Y, 0) Error; Unterminated string. -

In my code i have a While and 3 Funcs for other functions

and on all lines with _imagesearch came the error :o

Func Start()
        $Search = _ImageSearch('Level.bmp , 0, $X, $Y, 0)                         --((just only move to the object))
        If Search = 1 Then

   

$X = 0
$Y = 0
 

i hope a guy can help me here =)

thx buddy and yea happy new year all =)

Edited by Alagosul
Link to comment
Share on other sites

your missing a ' in Level.bmp to start off. i would check that before doing anything else.

Thx alot, only a mistake, but now hmmm, now not better work =(

I post the Code, HotkeySet dont work, why? and the rest is that correct? thx man =) and other question; is that correct, imagesearch // Func Level/Essen/Schwert, search always any time for this 3 pictures? Or does this separately in the While with a command, that search always?

#include <ImageSearch.au3>

    HotKeySet("F8", "Start")

    HotKeySet("F9", "Stop")

$X = 0

$Y = 0

    Func Start()

       While 1   

WEnd

    EndFunc

    Func Stop()

    Exit

    EndFunc

Func Level()

   $y = 0

   $x = 0

        $Search = _ImageSearch('Level.bmp', 0, $x, $y, 0

        If $Search = Level Then

        EndIf

EndFunc

        Func Schwert()

   $y = 0

   $x = 0

        $Search = _ImageSearch('Schwert.bmp', 0, $X, $Y, 0)

        If $Search = 1 Then

    EndIf

EndFunc

    Func Essen()

   $y = 0

   $x = 0

        $Search = _ImageSearch('Essen.bmp', 0, $X, $Y, 0)

        If $Search = 1 Then

    EndIf

EndFunc

Edited by Alagosul
Link to comment
Share on other sites

  • Moderators

Alagosul,

Welcome to the AutoIt forum - and a glückliches neues Jahr to you. :)

Much as I hate starting a new year by donning my Mod hat, looking at the items for which you are searching (sword, chest, book, food) makes me think that you are trying to automate a game. Please read the Forum rules (there is also a link at bottom right of each page) before you post again - we do not help with game-bots here. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Alagosul,

And as I see you have been back online and have not bothered replying, I am assuming my guess was correct. Thread locked. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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