olzrobot.blogg.se

How to make a crosshair overlay
How to make a crosshair overlay





WinMove ahk_id %ID2%, % RulerX-VirtualScreenWidth, %RulerY%įirst of all, thank you all very much for these awesome crosshairs! They are way too cool and I must totally appropriate it for my own nefarious uses LOL. WinMove ahk_id %ID1%, %RulerX%, % RulerY-VirtualScreenHeight create crosshair by moving 1/2 length of segment Use Numeric0 & NumericDot to quit program Use Ctrl-NumericDot to lock/unlock position of crosshairs Use Ctrl-Numeric0 to toggle display of crosshairs Start script => nothing will happen (unless you change start-up behaviour) This script can make crosshairs appear on your screen. Here's a slight modification of Relayers crosshairs on screen: WinSet Transparent,255,ahk_id %ID% Opaque Winset AlwaysOnTop,ON,ahk_id %ID% Keep it always on the top Gui %n%: Show, Center W%wide% H%high% Show it Gui %n%:-Caption +ToolWindow +E0x20 No title bar, No taskbar button, Transparent for clicks WinMove ahk_id %ID2%, % RulerX-20, %RulerY% WinMove ahk_id %ID1%, %RulerX%, % RulerY-20 create crosshair by moving 1/2 length of segment RulerX := RulerX - 5 offset the mouse pointer a bit RButton:: using hotkey instead of waiting for a key keeps the right click from calling other behavior during script Here's a favorite of mine for painting a crosshair on the screen. IniWrite, %progclass%, %ScriptName%.ini, Main, progclass IniWrite, %PosX%, %ScriptName%.ini, Main, PosX IniWrite, %PosY%, %ScriptName%.ini, Main, PosY WinSet, TransColor, White, %A_ScriptName% Gui, Add, Picture, w%ch_x% h%ch_y% AltSubmit, ch.gif IniRead, progclass, %ScriptName%.ini, Main, progclass, %progclass% IniRead, PosY, %ScriptName%.ini, Main, PosY, %PosY% IniRead, PosX, %ScriptName%.ini, Main, PosX, %PosX% PosX and PosY hold offset of cursor within window (From centre) WinGetPos, winx, winy, winw, winh, ahk_class %progclass% exe from filename to get name for INI file DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING! Custom crosshairs can be used, edit ch.gif and edit size vars below This is NOT a hack, it merely creates a transparent window Settings saved to INI file so you only have to set up once Crosshair will ONLY appear while designated app is active 4) Use WIN+Arrow keys to move crosshair to right place 3) Crosshair will appear but probably in wrong place 2) Hit WIN+Insert to designate that as app to overlay to

how to make a crosshair overlay

1) Run app to overlay crosshair to and make it active Default size is 9x9 but you can use any size. You need a transparent GIF to use as the crosshair image. This will add a crosshair over a selected window







How to make a crosshair overlay