help with autoit script

07/04/2011 20:47 ikjahaa#1
Code:
Func stop ()
	Exit
EndFunc

HotKeySet("{F3}","stop")

while 1
	MouseClick("left" ,836,635 )
	Sleep (500)
	
	
WEnd
this works fine outside hero but when i activate hero then the bot doesn't work.

i need it to siple reveive me for exp selling

Thank you
07/05/2011 00:45 ax5#2
go to autoit support forum and then read the tutorials on the site
07/05/2011 01:31 ikjahaa#3
Quote:
Originally Posted by ax5 View Post
go to autoit support forum and then read the tutorials on the site
can you please update ur Chami bot.

the one for pvp ep selling ?
07/05/2011 15:59 ax5#4
Quote:
Originally Posted by ikjahaa View Post
can you please update ur Chami bot.

the one for pvp ep selling ?
when i have time i will
07/06/2011 03:06 karraksc#5
Quote:
Originally Posted by ikjahaa View Post
Code:
Func stop ()
	Exit
EndFunc

HotKeySet("{F3}","stop")

while 1
             MouseClick("left" ,836,635 )
	Sleep (500)
WEnd
this works fine outside hero but when i activate hero then the bot doesn't work.

i need it to siple reveive me for exp selling

Thank you
I noticed you don't tell it to make HERO.EXE active, like this:

WinActivate("Hero","")
While 1
MouseClick("left" ,836,635 )
Sleep (500)
Wend

This tells the app to focus on Hero game and then send the mouseclick to the Hero Game.
07/07/2011 01:22 ikjahaa#6
Quote:
Originally Posted by karraksc View Post
I noticed you don't tell it to make HERO.EXE active, like this:

WinActivate("Hero","")
While 1
MouseClick("left" ,836,635 )
Sleep (500)
Wend

This tells the app to focus on Hero game and then send the mouseclick to the Hero Game.
thx but , isn't this the same as clicking on hero online?
if i click on hero online while the script is running, then the mouse moves to the right spot but it doesn't click.
07/07/2011 07:36 karraksc#7
if the game is not the active window, the mouseclicks will be sent to whichever window is active. The WinActivate command tells the game to become the active window so the mouseclicks will go to it..

I think the problem for this might be in your mouseclick command line, not telling it how many clicks to use.

try this:
mouseclick("left",836,635,1) <--tells it to click once, 2 for double-click, etc
07/07/2011 11:59 ikjahaa#8
Quote:
Originally Posted by karraksc View Post
if the game is not the active window, the mouseclicks will be sent to whichever window is active. The WinActivate command tells the game to become the active window so the mouseclicks will go to it..

I think the problem for this might be in your mouseclick command line, not telling it how many clicks to use.

try this:
mouseclick("left",836,635,1) <--tells it to click once, 2 for double-click, etc
i have this now:
Code:
Func stop ()
	Exit
EndFunc

HotKeySet("{F3}","stop")
WinActivate("Hero","")
while 1
	MouseClick("left" ,836,635,1 )
	Sleep (500)
	
	
WEnd
still doesn't click, it does move the mouse but i think hero is protected for such "auto-clicks", you need to use pointers .

some1 help me
07/08/2011 03:50 karraksc#9
Quote:
Originally Posted by ikjahaa View Post
i have this now:
Code:
Func stop ()
	Exit
EndFunc

HotKeySet("{F3}","stop")
WinActivate("Hero","")
while 1
	MouseClick("left" ,836,635,1 )
	Sleep (500)
	
	
WEnd
still doesn't click, it does move the mouse but i think hero is protected for such "auto-clicks", you need to use pointers .

some1 help me
The code as-is works tho I do have one question that might afffect this. Is this mouseclick used for moving the char or for clicking on the revival menu?
07/08/2011 10:37 ikjahaa#10
Quote:
Originally Posted by karraksc View Post
The code as-is works tho I do have one question that might afffect this. Is this mouseclick used for moving the char or for clicking on the revival menu?
clicking on the reveive-menu.

it doesn't work with me, only moves the mouse doesn't click
07/08/2011 20:27 karraksc#11
Quote:
Originally Posted by ikjahaa View Post
clicking on the reveive-menu.

it doesn't work with me, only moves the mouse doesn't click
are you allowing for the 10-second delay that is now in the revive menu? None of the keys will work until the delay runs down. You might have to add in a delay into yours to sit and wait until the keys are active before clicking on the button.
07/08/2011 21:49 ikjahaa#12
Quote:
Originally Posted by karraksc View Post
are you allowing for the 10-second delay that is now in the revive menu? None of the keys will work until the delay runs down. You might have to add in a delay into yours to sit and wait until the keys are active before clicking on the button.
the bot clicks every 500ms right?
so if i just wait for it to count down 10sec. then it must be able to click.
clicking before 10 sec countdown = no bad right?
07/08/2011 23:08 karraksc#13
Quote:
Originally Posted by ikjahaa View Post
the bot clicks every 500ms right?
so if i just wait for it to count down 10sec. then it must be able to click.
clicking before 10 sec countdown = no bad right?
there ought to be a delay command you could use:

10 seconds = 10,000 milliseconds

in Delphi, it's SLEEP(milliseconds)
in autoIt, it's SLEEP(milliseconds)
in VB, it's SLEEP(milliseconds)
in Basic, it's DELAY(milliseconds)
in Pascal, it's WAIT(milliseconds)
in RPG3, it's HOLD(milliseconds)
07/08/2011 23:25 ikjahaa#14
Quote:
Originally Posted by karraksc View Post
there ought to be a delay command you could use:

10 seconds = 10,000 milliseconds

in Delphi, it's SLEEP(milliseconds)
in autoIt, it's SLEEP(milliseconds)
in VB, it's SLEEP(milliseconds)
in Basic, it's DELAY(milliseconds)
in Pascal, it's WAIT(milliseconds)
in RPG3, it's HOLD(milliseconds)

i know, i use
sleep(500)

but it works on all programs exept hero online.
on hero it only moves the mouse but doesn't click.
why doesn't it click on hero and does on other programs ?
07/08/2011 23:56 karraksc#15
Try it like this:

func Died()
WinActivate("Hero","")
sleep(10000) ;10 sec delay
MouseClick("left" ,836,635,1,1) ; add a 10ms delay to move mouse
endfunc

While 1
if HP=0 then died() ; use any method to find out if you are dead and handle it
Wend