Gui Posted April 2, 2010 Share Posted April 2, 2010 (edited) Is it possible to create an artificial mouse inside a GUI, that just interacts inside the GUI, so basically it can click things for you inside the GUI, so your main one doesn't have to? Thanks, just curious. GUI PS - An example would be those Runescape Bots from RsBots.net or something. Exemplified here : http://www.rsbots.net/videos/AutoFarmer-Pro/AutoFarmer-Pro.html In the video, it's all inside a GUI, and the orange thing is the artificial mouse that moves & clicks, without controlling your main mouse. Edited April 2, 2010 by Gui Link to comment Share on other sites More sharing options...
Zedna Posted April 2, 2010 Share Posted April 2, 2010 Search forum for Cursor API functions for example: http://www.autoitscript.com/forum/index.php?showtopic=45073&view=findpost&p=605612 http://www.autoitscript.com/forum/index.php?showtopic=52928&view=findpost&p=400332 ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
James Posted April 2, 2010 Share Posted April 2, 2010 expandcollapse popupGlobal Const $OCR_NORMAL = 0x32512 Global Const $OCR_IBEAM = 0x32513 Global Const $OCR_WAIT = 0x32514 $GUI = GUICreate("test") GUISetState() Local $hWaitCur $hWaitCur = _LoadCursor($OCR_WAIT) _SetSystemCursor($hWaitCur, $OCR_IBEAM) While 1 If GUIGetMsg() = -3 Then ExitLoop Sleep(10) WEnd _SetSystemCursor($hWaitCur, $OCR_NORMAL) $hWaitCur = 0 Func _LoadCursor($iCursor) Return SetError(@error, @extended, _API(DllCall("user32.dll", "int", "LoadCursorA", "hwnd", 0, "int", $iCursor))) EndFunc ;==>_LoadCursor Func _SetSystemCursor($hCursor, $iCursor) Return SetError(@error, @extended, _API(DllCall("user32.dll", "int", "SetSystemCursor", "int", $hCursor, "int", $iCursor))) EndFunc ;==>_SetSystemCursor Func _API($v_ret) Local $err = @error ConsoleWrite($err & @CRLF) Local $ext = @extended ConsoleWrite($ext & @CRLF) If Not $err Then If IsArray($v_ret) Then Return $v_ret[0] Else Return $v_ret EndIf EndIf Return SetError($err, $ext, 0) EndFunc ;==>_API Works better than the original example. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gui Posted April 2, 2010 Author Share Posted April 2, 2010 (edited) Sorry for the delay reply, but THANKS for replying guys! @ Zedna, thanks I'll check em' out. @ James, thanks but it doesn't work when I tested it. It says AU3 has stopped working : o. And EDIT : It's not just changing the icon. It's basically creating a second mouse, that moves on it's own when directed, maybe inside an IE Embedded, then clicks. If making a second mouse isn't possible, maybe a Cross Hair icon, that moves in a loop, I just don't understand how I would do that. Edited April 2, 2010 by Gui Link to comment Share on other sites More sharing options...
James Posted April 3, 2010 Share Posted April 3, 2010 Does the user really need to see the mouse? Won't ControlSend() and ControlClick() do it? James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gui Posted April 3, 2010 Author Share Posted April 3, 2010 Does the user really need to see the mouse? Won't ControlSend() and ControlClick() do it?JamesNot completely. They can do some, but a secondary mouse would be a great addition as well as make things a lot easier. I know it's possible in Java, hopyfully AutoIt too. I think I have you added on WindowsLive James, i'll talk there if you'd like. Link to comment Share on other sites More sharing options...
InjectionZ Posted April 7, 2010 Share Posted April 7, 2010 Not completely. They can do some, but a secondary mouse would be a great addition as well as make things a lot easier. I know it's possible in Java, hopyfully AutoIt too. I think I have you added on WindowsLive James, i'll talk there if you'd like.Hey Gui,Did you found a way to do it yet?Ive started 2 days agos, but im kinda good, Ive already worked with vb6/vb.net/c++. Link to comment Share on other sites More sharing options...
Gui Posted April 7, 2010 Author Share Posted April 7, 2010 Hey Gui,Did you found a way to do it yet?Ive started 2 days agos, but im kinda good, Ive already worked with vb6/vb.net/c++.No luck yet, sorry. Link to comment Share on other sites More sharing options...
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