Jump to content

Script sends error - why ?


Recommended Posts

Hey guys i am working on this scripts now for more than 2 hours and I dont know what i am doing wrong.

#include <ImageSearch.au3>
GUICreate("Test"  ,200,150 )  
GUICtrlCreateLabel ("Versuche:",  1, 30, 50)  
GUISetState (@SW_SHOW)

HotKeySet("{NUMPAD3}","starten")
HotKeySet("{NUMPAD6}","beenden")

$x1 = 0
$y1 = 0

$Versuche = GUICtrlCreateLabel ("0",  50, 30, 50)
While 1
   Sleep(1)
   WEnd

Func starten()
   $result = _ImageSearch("CritDmg.bmp"), 1, $x1, $y1, 0)
If $result = True Then
MouseClick("left")
MouseClick("left")
   EndIf
EndFunc

If $result = False Then
   Send("{F2 down}")
   Sleep(50)
   Send("{F2 up}")
   GUICtrlSetData($Versuche, GUICtrlRead($Versuche) + 1)
   EndIf

Func beenden()
   Exit
   EndFunc

I want that it presses "F2" if the image wasnt found , then check again if the image was found and again and again.

ALSO it sends me this error back :

$result = _ImageSearch("CritDmg.bmp"),1, $x1, $y1, 0)

§result = ^ ERROR

ERROR: Incorrect number of parameters in function call.

BTW: This is not going to be a bot because an other Forum deleted my Topic because they thought it would be one.

Edited by InStinct
Link to comment
Share on other sites

  • Moderators

InStinct,

This is the 3rd thread you have started on this subject - how many more do you want? :huh:

And CritDmg.bmp does look suspicious - so how about telling us why you are looking for it and what the app is in which you are searching for it? ;)

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

Its for a Picture Filter me and my friends are working on a small project for shool which filters pictures automaticly if these contain something they shouldnt contain.

CritDmg actually is French for croit damage ( I dont know how to translate this in English ) (And thats why my English isnt very good , I live in French)

The Programm should press F2 to "delete" the pictures and double click them to save them.

Link to comment
Share on other sites

  • Moderators

InStinct,

I speak French fluently and "CritDmg" does not sound like an abbreviation for "croit damage" to me - and indeed "croit damage" does not sound like any French I have ever heard. I think you are not telling me the truth and hoping to get away with looking for a "Critical Damage" image in a game - so I am going to do what the other forum did. Thread closed. :naughty:

M23

P.S. And I am deleting your post in the UDF thread as well - do not repost it. :naughty:

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