Shatteredhand Posted December 8, 2009 Posted December 8, 2009 (edited) After searching for how to draw things on-screen and finding a function someone wrote called get_drawing(), making references to dllcalls to gdi32.dll and user32.dll (which despite looking up the commands, I don't fully understand), I modified it in an attempt at a static reticle for games. The problem with this method is that it draws once, and if anything draws over it, it is lost. I remedied this in my script by having the draw code loop every 10 milliseconds, which works perfect on desktop, but inside a game the drawing blinks in and out. It works well enough, but I am curious if there is a better method for doing this that would achieve a permanent drawing and perhaps not require fast looping. Has anyone tackled this problem before? Edited June 4, 2010 by Shatteredhand
Asamoya Posted December 8, 2009 Posted December 8, 2009 After searching for how to draw things on-screen and finding a function someone wrote called get_drawing(), making references to dllcalls to gdi32.dll and user32.dll (which despite looking up the commands, I don't fully understand), I modified it in an attempt at a static reticle for Borderlands. The problem with this method is that it draws once, and if anything draws over it, it is lost. I remedied this in my script by having the draw code loop every 10 milliseconds, which works perfect on desktop, but inside a game the drawing blinks in and out. It works well enough, but I am curious if there is a better method for doing this that would achieve a permanent drawing and perhaps not require fast looping. Has anyone tackled this problem before?Kinda off topic, but back when I used to play Counter Strike, I used to zoom in with the awp and put a tiny dot of bluetack on my screen where the targetting reticle was, and then zoom out.This way I could get decent shots without having to zoom in dunno if you could do that here instead of trying to draw a static reticle.
rliiack Posted December 8, 2009 Posted December 8, 2009 Try putting the drawing on a transparent window so it can be permanent. My Projects:Smart Icons
Shatteredhand Posted June 2, 2010 Author Posted June 2, 2010 (edited) Try putting the drawing on a transparent window so it can be permanent.Been awhile since I made this topic. I didn't know how to make a transparent window so I put it off awhile. I finally did make a transparent window though and used a picture as my reticle. I used the gui style $WS_EX_TOPMOST, and it works for the desktop but not games. Is there another trick or style I could apply to get it on top of games? Edited June 4, 2010 by Shatteredhand
Shatteredhand Posted June 4, 2010 Author Posted June 4, 2010 (edited) This is what I have so far. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) picture() Func picture() Local $gui, $background, $pic, $reticle, $msg, $width, $height Local $sFile = "picture.gif" $width = @DesktopWidth / 2 $height = @DesktopHeight / 2 ; transparent MDI child window $pic = GUICreate("crosshair", 64, 64, $width, $height, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED)) ; transparent pic $reticle = GUICtrlCreatePic($sFile, 0, 0, 64, 64) GUISetState(@SW_SHOW) WinSetOnTop("crosshair", "", 1) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE EndFunc Edited June 4, 2010 by Shatteredhand
PartyPooper Posted June 4, 2010 Posted June 4, 2010 Borderlands is an online multiplayer game and since using a cross-hair hack is considered cheating, I refer you to Game Bots topic.
Shatteredhand Posted June 4, 2010 Author Posted June 4, 2010 (edited) Borderlands is an online multiplayer game and since using a cross-hair hack is considered cheating, I refer you to Game Bots topic.The game is not important at all, I edited out any references to it.The crux of my problem is I can't get a picture to always be on top. Several games overlay it, task manager overlays it. I just want to know why that's the case, and if anyone knows a solution. I've tried WinSetOnTop() function, and the $WS_EX_TOPMOST style, that is the extent of my knowledge. Edited June 4, 2010 by Shatteredhand
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