FireFox Posted November 17, 2008 Share Posted November 17, 2008 (edited) hello, I've found some script on the forum for crosshair ; some with winapi or transparent window , but the problem is that the crosshair isn't on top with the game : I don't see it. for that would work I have to inject process or not ? that is the question ! thanks for answers. Edited November 30, 2008 by FireFox Link to comment Share on other sites More sharing options...
Pain Posted November 17, 2008 Share Posted November 17, 2008 As you might already have found out in other topics, use OnTopMost for your GUI if you don't already does. Another verry simple way is _WinAPI_SetCursor() after you started your game. I assume the game will change/hide or something else with the cursor, that's why you have to run _WinAPI_SetCursor() after you started the game. Depending on the game other methods is possible but I can't tell for your game. Link to comment Share on other sites More sharing options...
FireFox Posted November 17, 2008 Author Share Posted November 17, 2008 As you might already have found out in other topics, use OnTopMost for your GUI if you don't already does.Another verry simple way is _WinAPI_SetCursor() after you started your game.I assume the game will change/hide or something else with the cursor, that's why you have to run _WinAPI_SetCursor() after you started the game.Depending on the game other methods is possible but I can't tell for your game.Thanks I will try it later! Link to comment Share on other sites More sharing options...
FireFox Posted November 18, 2008 Author Share Posted November 18, 2008 (edited) Thanks I will try it later! The crosshair is visible over all windows except all fps games... This is my script : expandcollapse popup#include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> $GUI=GUICreate("CROSSHAIR",@DesktopWidth,@DesktopHeight,0,0) WinSetTrans($GUI,"",0) GUISetState(@SW_HIDE,$GUI) $win=GUICreate("",@DesktopWidth,@DesktopHeight,0,0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_TOPMOST+$WS_EX_MDICHILD,$GUI) $CUR=GUICtrlCreatePic("Crosshair.bmp",350,350,35,35) GUISetBkColor(0x0000FF,$win) _Transparent($win,0x0000FF) GUISetState() Func _Transparent($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False) If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03 If Not $isColorRef Then $i_transcolor = Hex(String($i_transcolor), 6) $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2)) EndIf Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages) Select Case @error Return SetError(@error, 0, 0) Case Else Return 1 EndSelect EndFunc;==>_Transparent While 1 Sleep(50) WinSetOnTop($win,"",1) WEnd Anyone have idea for is would be visible all the time ? Edited November 30, 2008 by FireFox Link to comment Share on other sites More sharing options...
bluerein Posted November 19, 2008 Share Posted November 19, 2008 (edited) To be honest I dont think you'll do it .... I tried it with counter strike source , and as css is topmost already you'll struggle to win the fight ...The only way I could see of doing it was to somehow use the "GameOverlayRenderer.dll" ...But thats for css...if the dll works with all fps games I dont know....Heres the GameOverlayRenderer.dll if you wanna try it...it has 2 functions1, OverlayHookD3D32, SetNotificationPositionthe first one looks good thoughGameOverlayRenderer.dllheres what i could find on it:http://forum.gamedeception.net/showthread.php?p=91412 Edited November 19, 2008 by bluerein Link to comment Share on other sites More sharing options...
FireFox Posted November 19, 2008 Author Share Posted November 19, 2008 Thanks but how can i use this dll for autoit ?... *void __fastcall HookFunc_10007AC0(int iHookChainDepth, void *pOrgFunc, int pCallback) I don't know use dll call so anyone can translate this to autoit please ? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 19, 2008 Moderators Share Posted November 19, 2008 Most of these full screen games will minimize if they lose focus or realize they are not top most in the z-order.The only possible solution for something like this I can think of is to embed the window/crosshair as a child (like a control) on the game itself, and test various things to see what loses integrity that way.Things you may want to look at:SetWindowsLongGetWindowsLongAnd if you can get the source of AnyGUI.au3, you may see specifically how to do it with native code even. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
IKilledBambi Posted November 19, 2008 Share Posted November 19, 2008 And if your still having troubles and eventually give up you could do it the old fashioned way. Put a spitball in the middle of your screen. Link to comment Share on other sites More sharing options...
Szhlopp Posted November 19, 2008 Share Posted November 19, 2008 A friend of mine(Monoceres) was describing this to me yesterday. These fullscreen FPS games that use D3D aren't really fullscreen apps. They actually go to the video card. Thus the reason you can't 'overlay' them without a massive flicker. He can describe it a lot better than I can. It is possible. But you need to know some C++ and be able to create a custom DLL. And if I remember right he said a normal windows app won't show/work with it. You need to use D3D to create a custom window. If I find the code I had I'll post it(If I have it). I did get a normal window to overlay, however the flicker was still bad enough that it was hard to read. It will be good enough for a quick short notification. Szhlopp RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
FireFox Posted November 19, 2008 Author Share Posted November 19, 2008 A friend of mine(Monoceres) was describing this to me yesterday. These fullscreen FPS games that use D3D aren't really fullscreen apps. They actually go to the video card. Thus the reason you can't 'overlay' them without a massive flicker. He can describe it a lot better than I can.It is possible. But you need to know some C++ and be able to create a custom DLL. And if I remember right he said a normal windows app won't show/work with it. You need to use D3D to create a custom window. If I find the code I had I'll post it(If I have it). I did get a normal window to overlay, however the flicker was still bad enough that it was hard to read. It will be good enough for a quick short notification.SzhloppThanks Szhlopp Link to comment Share on other sites More sharing options...
BinaryBrother Posted November 19, 2008 Share Posted November 19, 2008 I don't mean to sound dumb, but I'm pretty sure I've seen this done in "Delta Force : Black Hawk Down". It was actually quite simplistic using WinAPI stuff to draw a cross-hair... I know it's an old game, but it utilized DX9.0c, so I can see where this is definitely possible... Just watch out for the new PunkBuster bull, I'm pretty sure a new version takes screenies, and a programmed Cross-hair could get you kicked... SIGNATURE_0X800007D NOT FOUND Link to comment Share on other sites More sharing options...
FireFox Posted November 19, 2008 Author Share Posted November 19, 2008 I don't mean to sound dumb, but I'm pretty sure I've seen this done in "Delta Force : Black Hawk Down". It was actually quite simplistic using WinAPI stuff to draw a cross-hair... I know it's an old game, but it utilized DX9.0c, so I can see where this is definitely possible... Just watch out for the new PunkBuster bull, I'm pretty sure a new version takes screenies, and a programmed Cross-hair could get you kicked... Yeah, i see some script in autoit with winapi but doesnt work so that's not what you seen...i hope that someone know crosshair working ! Link to comment Share on other sites More sharing options...
BrettF Posted November 20, 2008 Share Posted November 20, 2008 Only bump your post after 24 hours. Not less than 12... Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
bluerein Posted November 20, 2008 Share Posted November 20, 2008 this might interest youhttp://www.gameoverlay.com/which works on fps ....and theres a dll with it called gameoverlay.dll Link to comment Share on other sites More sharing options...
xroot Posted November 20, 2008 Share Posted November 20, 2008 FireFox,Check this site out, maybe this might help.http://www.mlin.net/CrossHair.shtmllol Link to comment Share on other sites More sharing options...
FireFox Posted November 20, 2008 Author Share Posted November 20, 2008 @xroot Thanks for crosshair but i appears 1millisec in game and hide away... Link to comment Share on other sites More sharing options...
Yiyas Posted November 23, 2008 Share Posted November 23, 2008 (edited) Hey there I've been having this little trouble myself... however I am a complete rookie at autoit lol I've been scrounging around the forums and I'm really close to getting what i want. I run css in a window because i have two screens so i have no problems with "on top". However, what i found applies a gif on top of the screen which is, unfortunately, clickable... is there any way to make something have a "click-through" feature? I also have no idea how to make this a center of a window instead of center of a monitor. Any help is much appreciated, thanks all. Yiyas #include <WindowsConstants.au3> $x = @DesktopWidth/2 - 68/2 $y = @DesktopHeight/2 - 68/2 GUICreate("", 68, 68, $x, $y, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreatePic("crosshair.gif",0,0,68,68) GUISetState() While 1 Sleep(25) WEnd Edited November 23, 2008 by Yiyas Link to comment Share on other sites More sharing options...
FireFox Posted November 23, 2008 Author Share Posted November 23, 2008 (edited) Hey there I've been having this little trouble myself... however I am a complete rookie at autoit lol I've been scrounging around the forums and I'm really close to getting what i want. I run css in a window because i have two screens so i have no problems with "on top". However, what i found applies a gif on top of the screen which is, unfortunately, clickable... is there any way to make something have a "click-through" feature? I also have no idea how to make this a center of a window instead of center of a monitor. Any help is much appreciated, thanks all. Yiyas #include <WindowsConstants.au3> $x = @DesktopWidth/2 - 68/2 $y = @DesktopHeight/2 - 68/2 GUICreate("", 68, 68, $x, $y, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreatePic("crosshair.gif",0,0,68,68) GUISetState() While 1 Sleep(25) WEnd Thanks but can you give us your gif ? Edited November 23, 2008 by FireFox Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 26, 2008 Share Posted November 26, 2008 I've seen other threads on this and so far the only way I've seen that works is to refresh the custom cursor (in this case the crosshair) at the same refresh rate as the game. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
FireFox Posted November 26, 2008 Author Share Posted November 26, 2008 @dbzfanatic perhaps this is what you mean for refresh the window While 1 GuiSetState(@SW_SHOW,$crosshair) Wend 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