I play Saga of Ryzom, an old MMo that's still awesome, but that's besides the point.
Have been working on a script that would allow me to change weapons using f5-f12 (4weapons, 4 magic amplifiers) and decided o use image search. i downloaded the dll and au3 files for it and have placed them everywhere ive read they needed to be, hoping somebody can help!
Since i can't post pictures yet -_- i'll explain how it works. you have to click on ur right hand to open a menu with all weapons in ur inventory(hence the first mouse commands) then this is where i need image search to work.
Here's the first step of the code.
--------------
#RequireAdmin
#include <ImageSearch.au3>
HotKeySet("{f5}", "sworddagger")
$X = 0
$Y = 0
Func sworddagger()
MouseMove(1155, 121, 2)
MouseClick("left", 1155, 121, 1, 2)
sleep(300)
$Search = _ImageSearch(@scriptdir&"\OP1hsword.bmp", 1, $X, $Y, 0)
If $Search = 1 Then
MouseMove($X, $Y, 2)
MouseClick("left",$X, $Y, 1, 2)
EndIf
EndFunc
while 1
sleep(100)
WEnd
I'm not getting any errors, the script just stops after its initial click to open the inventory menu. I've also tried putting both the dll and au3 file in the folder where i have the images and using #include "imagesearch.au3" and nothing. also have dropped all bmp and png files to the Include folder and nothing, im all out of ideas. Someone please help, and thank you!
Have been working on a script that would allow me to change weapons using f5-f12 (4weapons, 4 magic amplifiers) and decided o use image search. i downloaded the dll and au3 files for it and have placed them everywhere ive read they needed to be, hoping somebody can help!
Since i can't post pictures yet -_- i'll explain how it works. you have to click on ur right hand to open a menu with all weapons in ur inventory(hence the first mouse commands) then this is where i need image search to work.
Here's the first step of the code.
--------------
#RequireAdmin
#include <ImageSearch.au3>
HotKeySet("{f5}", "sworddagger")
$X = 0
$Y = 0
Func sworddagger()
MouseMove(1155, 121, 2)
MouseClick("left", 1155, 121, 1, 2)
sleep(300)
$Search = _ImageSearch(@scriptdir&"\OP1hsword.bmp", 1, $X, $Y, 0)
If $Search = 1 Then
MouseMove($X, $Y, 2)
MouseClick("left",$X, $Y, 1, 2)
EndIf
EndFunc
while 1
sleep(100)
WEnd
I'm not getting any errors, the script just stops after its initial click to open the inventory menu. I've also tried putting both the dll and au3 file in the folder where i have the images and using #include "imagesearch.au3" and nothing. also have dropped all bmp and png files to the Include folder and nothing, im all out of ideas. Someone please help, and thank you!