Jump to content

cant get script to work


Recommended Posts

i was gonna make a macro for the game "SAS: Zombie Assault"

and made a script with ImageSearch to auto-refill start weapon/auto-fix destroyed fenze..

the script is compiling fine/running without errors, but it wont..do..anything

(ofc it could be that the images im searching for are bad but ive tripple-checked, should work fine..)

have i done somthin wrong with the script?

problem with "ImageSearch" and Flash?

any ideas?

#include <ImageSearch.au3>
$x1=0
$y1=0

Func FixFenze()
$result = _ImageSearch("SasZombieFixFenzeF.bmp",1,$x1,$y1,0)
if $result=1 Then
;(
;   MouseMove($x1,$y1,3)
;)
Send("f")
Send("F")
Sleep(5)
EndIf
EndFunc

Func ReloadStartGun()
$result1 = _ImageSearch("SasZombieReloadR.bmp",1,$x1,$y1,0)
$result2 = _ImageSearch("SasZombieStartWeapon.bmp",1,$x1,$y1,0)

if $result2=1 And $result2=1 Then
;(
;   MouseMove($x1,$y1,3)
;)
Send("r")
Send("R")
Sleep(5)
EndIf
EndFunc


While 1
FixFenze()
ReloadStartGun()
sleep(100)
Wend
Link to comment
Share on other sites

Please include "ImageSearch.au3" in topic.

If is a library created by you put into the autoit intall folder->Include.

ImageSearch.au3 is in Example Scripts. Download it from there to save disk space.

If the library is created by you can put it in the includes folder or in your script directory. There is a difference between:

#include <lolwat.au3>

and

#include "lolwat.au3"

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