Cant make this autoit script to work

08/15/2009 14:17 WingYn#1
Anyone can tell me why this doesn't work? My dragonica window will be active, but it just wont spam the x every second. I have tried messing around with the codes but no luck o.O

;HotKey for terminating the script

#include <file.au3>

Dim $aRecords
;Window title for dragonica should be changed after every patch
$WinTitle = "Dragonica (Client Ver : 0.908.1301)"

;Force focus on dragonica
WinActivate($WinTitle)

$i = 0 ;Creates an endless loop
While $i = 0
Do
ControlSend($WinTitle,'','','{x}')
Sleep(10); Sends the x key to the window
ControlSend($WinTitle,'','','{SPACE}')
Sleep(10); Sends the SPACE key to the window


Until $i = 1
WEnd
08/15/2009 19:37 DragonicaIt#2
Quote:
Originally Posted by WingYn View Post
Anyone can tell me why this doesn't work? My dragonica window will be active, but it just wont spam the x every second. I have tried messing around with the codes but no luck o.O

;HotKey for terminating the script

#include <file.au3>

Dim $aRecords
;Window title for dragonica should be changed after every patch
$WinTitle = "Dragonica (Client Ver : 0.908.1301)"

;Force focus on dragonica
WinActivate($WinTitle)

$i = 0 ;Creates an endless loop
While $i = 0
Do
ControlSend($WinTitle,'','','{x}')
Sleep(10); Sends the x key to the window
ControlSend($WinTitle,'','','{SPACE}')
Sleep(10); Sends the SPACE key to the window


Until $i = 1
WEnd
Code:
;Window title for dragonica should be changed after every patch
$WinTitle = "Dragonica (Client Ver : 0.908.1301)"	

;Force focus on dragonica
WinActivate($WinTitle)	

$i = 0            

;Creates an endless loop
While $i = 0
	ControlSend($WinTitle,'','','{x}')
	Sleep(10); Sends the x key to the window
	ControlSend($WinTitle,'','','{SPACE}')
	Sleep(10); Sends the SPACE key to the window
WEnd
This should work...
08/15/2009 19:48 WingYn#3
Yeah it should work... But it just wont o.O it only goes into the window, but it doesn't send the key.
08/15/2009 19:51 toontown#4
Quote:
Originally Posted by WingYn View Post
Yeah it should work... But it just wont o.O it only goes into the window, but it doesn't send the key.
This might seem obvious to some but.. are u playing the EU or the SEA version?
08/15/2009 20:03 WingYn#5
It's the EU version, I've also thought maybe autoit scripts wont work in the EU version. Can you anyone confirm that? :) ty