CoBJType Posted January 2, 2008 Posted January 2, 2008 (edited) Hi i am writing a bot for an online game "Dream Mirror Online" Basically it involves searching specific color pixels on the screen and click. I've tested my program outside the game and it does what I want. Once I am in the game (window mode), AutoIt returns the coord of the pixel found correctly, but fails to move the cursor to that coordinate and click. After a little bit of testing, I found AutoIt fails to do anything in the game, e.g. not even sending a key. Any ideas? Thanks in advance. Edited January 2, 2008 by CoBJType
DW1 Posted January 2, 2008 Posted January 2, 2008 Is this game protected by gameguard or anything of the sorts? AutoIt3 Online Help
CoBJType Posted January 2, 2008 Author Posted January 2, 2008 thanks for swift response no as I could send keys using other programs like quickmacro
DW1 Posted January 2, 2008 Posted January 2, 2008 Have you tried controlsend yet? AutoIt3 Online Help
CoBJType Posted January 2, 2008 Author Posted January 2, 2008 thanks again, just tried but no luck. the problem is that nothing really works inside the game beside the pixel checking. e.g. i ordered autoit to move the mouse and it doesnt work
DW1 Posted January 2, 2008 Posted January 2, 2008 is this game run in a browser or is it standalone exe? AutoIt3 Online Help
CoBJType Posted January 2, 2008 Author Posted January 2, 2008 is this game run in a browser or is it standalone exe?hey thanks for the swift response!it is a standalone exehttp://www.gametribe.com/gt/domo.do
DW1 Posted January 2, 2008 Posted January 2, 2008 Cool, I like the look of the game. What did you try with ControlSend and ControlClick... I really thought those would work. I cannot download the game for testing right now because I am at work, and they frown on downloading online games. AutoIt3 Online Help
CoBJType Posted January 2, 2008 Author Posted January 2, 2008 Cool, I like the look of the game. What did you try with ControlSend and ControlClick... I really thought those would work.I cannot download the game for testing right now because I am at work, and they frown on downloading online games.hehtried control click but i do not know what the ID should betried finding the id of the chat box inside the game but nth shown in the autoit window info toolI really wonder why autoit doesnt work while qmacro works
Xav Posted January 3, 2008 Posted January 3, 2008 Try:: $Coord = PixelSearch() i dont know if this will work but try
CoBJType Posted January 3, 2008 Author Posted January 3, 2008 Try::$Coord = PixelSearch() i dont know if this will work but try thankspixel search works fine its just that other inputing functions doesnt worke.g. moving the cursor, sending key strokes etc
AzKay Posted January 3, 2008 Posted January 3, 2008 See if hotkeys work, HotKeySet("{F3}", "Test") While 1 Sleep(10) WEnd Func Test() MsgBox(0, "", "") EndFunc # MY LOVE FOR YOU... IS LIKE A TRUCK- #
CoBJType Posted January 3, 2008 Author Posted January 3, 2008 See if hotkeys work, HotKeySet("{F3}", "Test") While 1 Sleep(10) WEnd Func Test() MsgBox(0, "", "") EndFunc hey thanks ur code does work while i am inside the game (i.e. a box popped up) i tried chaning the content of function 'test' to move the mouse / send a key nothing happened
Pithikos Posted January 3, 2008 Posted January 3, 2008 I am having the same problem with a game using GameGuard(The game is Flyff). You can pop boxes and stuff but not send keystrokes. Shouldn't it be allowed or so when it allows you to pop boxes? As I know GameGuard just checks the memory or something and checksums the files of the game.
CoBJType Posted January 3, 2008 Author Posted January 3, 2008 I am having the same problem with a game using GameGuard(The game is Flyff). You can pop boxes and stuff but not send keystrokes. Shouldn't it be allowed or so when it allows you to pop boxes? As I know GameGuard just checks the memory or something and checksums the files of the game.have u tried qmacro?it works with my game while autoit doesnt
crzftx Posted January 3, 2008 Posted January 3, 2008 maybe this will help, dug it up on google (turned out to be an AutoIt archive...) DllCall("user32.dll","none","mouse_event","long",1,"long",$xAmount,"long",$yAmount,"long",0,"long", 0)set the variables to different numbers to simulate relative mouse movement. May help though. Might be able to couple it with MouseGetPos() ?
nfwu Posted January 4, 2008 Posted January 4, 2008 (edited) Reply to crzftx: Func _user32_MouseMove($x, $y) $pos = MouseGetPos() $xAmount = $x- $pos[0] $yAmount = $y- $pos[1] DllCall("user32.dll","none","mouse_event","long",1,"long",$xAmount,"long",$yAmount,"long",0,"long", 0) EndFunc #) edit: was bored, and did it for the heck of it. Edited January 4, 2008 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
crzftx Posted January 4, 2008 Posted January 4, 2008 i dont really know anything about dll calls, but is it necessary to have a zero -type "long" ? couldn't that be "short" and save some time. it does work. $xAmount = 50 $yAmount = 50 DllCall("user32.dll","none","mouse_event","short",1,"short",$xAmount,"short",$yAmount,"short",0,"short",0)
CoBJType Posted January 4, 2008 Author Posted January 4, 2008 (edited) CODEHotKeySet("{F11}", "_user32_MouseMove") While 1 Sleep(10) WEnd Func _user32_MouseMove($x, $y) $pos = MouseGetPos() $xAmount = 50+ $pos[0] $yAmount = 50+ $pos[1] DllCall("user32.dll","none","mouse_event","long",1,"long",$xAmount,"long",$yAmount,"long",0,"long", 0) MsgBox(0, "", "") EndFunc added a line to test if the hotkey is detected. on desktop it should move your cursor and then pop up an empty dialogue. when in game (window mode still), the cursor didnt move but the empty dialogue popped up. i am confused..anway, thanks crzftx and nfwu Edited January 4, 2008 by CoBJType
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now