Results 1 to 7 of 7
  1. #1
    Gratin's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    182
    Reputation
    21
    Thanks
    501
    My Mood
    Inspired

    [AHK] Simple Crosshair

    This is a very simple crosshair. It works on all fps games, on all resolutions. Creates a cross of green vertically and horizontally across the screen. I had trouble finding a script that worked, so I thought I might share it. I DO NOT TAKE CREDIT FOR THIS SCRIPT. I found it on an ahk forum thread somewhere which I can't find.

    How to use:
    Download autohotkey
    Save this script in a file named "crosshair.ahk" (can put whatever you want before .ahk)
    Double click that file
    press ctrl + 0/ins on the num pad
    when ingame and crosshair is centered press ctrl + . / del on the numpad to lock the crosshair

    look for ";HOWTO: Change color" in the script to change the color"

    Code:
    ; This script can make crosshairs appear on your screen.
    ; You may lock their position.
    ;
    ; Start script => nothing will happen (unless you change start-up behaviour)
    ; Use Ctrl-Numeric0         to toggle display of crosshairs
    ; Use Ctrl-NumericDot       to lock/unlock position of crosshairs
    ; Use Numeric0 & NumericDot to quit program
    
    
    ; === Start-up stuff
    #NoEnv
    
    SetWinDelay 0
    Coordmode Mouse, Screen
    Restart:
    Selecting := False
    OldX := -1, OldY := -1
    Locked  := False
    Visible := False			;<= determine start-up behaviour
    
    ; use VirtualScreen here to support multiple monitors
    SysGet, VirtualScreenWidth, 78
    SysGet, VirtualScreenHeight, 79
    ID1 := Box(2,1,VirtualScreenHeight*2)
    ID2 := Box(3,VirtualScreenWidth*2,1)
    
    SetTimer Ruler, 10
    if (Visible == False) {
        WinHide ahk_id %ID1%,, 
        WinHide ahk_id %ID2%,, 
    }
    Return
    
    
    ; === Toggle lock of crosshairs
    ;KeyWait, RButton, D
    ^NumpadDot::
    ;RButton::             ;using hotkey instead of waiting for a key keeps the right click from calling other behavior during script
    if (Visible == False) {
        WinShow ahk_id %ID1%,, 
        WinShow ahk_id %ID2%,, 
    	Visible := True 
    }
    if (Locked == False) {
    	SetTimer Ruler, Off
    	Locked := True 
    	}
    else {
    	SetTimer Ruler, 10
    	Locked := False 
    	}
    Return
    
    
    ; === Toggle display of crosshairs
    ^Numpad0::
    if (Visible == True) {
        WinHide ahk_id %ID1%,, 
        WinHide ahk_id %ID2%,, 
        Visible := False
    	}
    else {
        WinShow ahk_id %ID1%,,
        WinShow ahk_id %ID2%,,
        Visible := True
    }
    Return
    
    
    ; === Terminate program
    Numpad0::Send {Blind}{Numpad0}	; necessary to make Numpad0 work normally
    Numpad0 & NumpadDot::
    ;Escape::
    OutOfHere:
    ExitApp
    
    
    
    
    ; === Subroutines
    Ruler:
       MouseGetPos RulerX, RulerY
       ;RulerX := RulerX - 5  ;enable to offset the mouse pointer a bit
       ;RulerY := RulerY - 5
       If (OldX <> RulerX)
         OldX := RulerX
       If (OldY <> RulerY)
          OldY := RulerY
       WinMove ahk_id %ID1%,, %RulerX%, % RulerY-VirtualScreenHeight    ;create crosshair by moving 1/2 length of segment
       WinMove ahk_id %ID2%,, % RulerX-VirtualScreenWidth, %RulerY%
       ;ToolTip (Ctrl-0 to anchor)
    Return
    
    Box(n,wide,high)
    {
       Gui %n%:Color, 00FF00,0                 ; HOWTO: Change Color : Look for the color code you want (google html color codes). Replace 00FF00 with your color code
       Gui %n%:-Caption +ToolWindow +E0x20 ; No title bar, No taskbar button, Transparent for clicks
       Gui %n%: Show, Center W%wide% H%high%      ; Show it0
       WinGet ID, ID, A                    ; ...with HWND/handle ID
       Winset AlwaysOnTop,ON,ahk_id %ID%   ; Keep it always on the top
       WinSet Transparent,255,ahk_id %ID%  ; Opaque
       Return ID
    }
     

    Quote Originally Posted by RyanFalterJr View Post
    Vouch for Gratin, he went first, i gave him the items. Easy trader trustworthy

  2. The Following User Says Thank You to Gratin For This Useful Post:

    Gragas57 (12-10-2015)

  3. #2
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817
    Quote Originally Posted by Gratin View Post
    This is a very simple crosshair. It works on all fps games, on all resolutions. Creates a cross of green vertically and horizontally across the screen. I had trouble finding a script that worked, so I thought I might share it. I DO NOT TAKE CREDIT FOR THIS SCRIPT. I found it on an ahk forum thread somewhere which I can't find.

    How to use:
    Download autohotkey
    Save this script in a file named "crosshair.ahk" (can put whatever you want before .ahk)
    Double click that file
    press ctrl + 0/ins on the num pad
    when ingame and crosshair is centered press ctrl + . / del on the numpad to lock the crosshair

    look for ";HOWTO: Change color" in the script to change the color"

    Code:
    ; This script can make crosshairs appear on your screen.
    ; You may lock their position.
    ;
    ; Start script => nothing will happen (unless you change start-up behaviour)
    ; Use Ctrl-Numeric0         to toggle display of crosshairs
    ; Use Ctrl-NumericDot       to lock/unlock position of crosshairs
    ; Use Numeric0 & NumericDot to quit program
    
    
    ; === Start-up stuff
    #NoEnv
    
    SetWinDelay 0
    Coordmode Mouse, Screen
    Restart:
    Selecting := False
    OldX := -1, OldY := -1
    Locked  := False
    Visible := False			;<= determine start-up behaviour
    
    ; use VirtualScreen here to support multiple monitors
    SysGet, VirtualScreenWidth, 78
    SysGet, VirtualScreenHeight, 79
    ID1 := Box(2,1,VirtualScreenHeight*2)
    ID2 := Box(3,VirtualScreenWidth*2,1)
    
    SetTimer Ruler, 10
    if (Visible == False) {
        WinHide ahk_id %ID1%,, 
        WinHide ahk_id %ID2%,, 
    }
    Return
    
    
    ; === Toggle lock of crosshairs
    ;KeyWait, RButton, D
    ^NumpadDot::
    ;RButton::             ;using hotkey instead of waiting for a key keeps the right click from calling other behavior during script
    if (Visible == False) {
        WinShow ahk_id %ID1%,, 
        WinShow ahk_id %ID2%,, 
    	Visible := True 
    }
    if (Locked == False) {
    	SetTimer Ruler, Off
    	Locked := True 
    	}
    else {
    	SetTimer Ruler, 10
    	Locked := False 
    	}
    Return
    
    
    ; === Toggle display of crosshairs
    ^Numpad0::
    if (Visible == True) {
        WinHide ahk_id %ID1%,, 
        WinHide ahk_id %ID2%,, 
        Visible := False
    	}
    else {
        WinShow ahk_id %ID1%,,
        WinShow ahk_id %ID2%,,
        Visible := True
    }
    Return
    
    
    ; === Terminate program
    Numpad0::Send {Blind}{Numpad0}	; necessary to make Numpad0 work normally
    Numpad0 & NumpadDot::
    ;Escape::
    OutOfHere:
    ExitApp
    
    
    
    
    ; === Subroutines
    Ruler:
       MouseGetPos RulerX, RulerY
       ;RulerX := RulerX - 5  ;enable to offset the mouse pointer a bit
       ;RulerY := RulerY - 5
       If (OldX <> RulerX)
         OldX := RulerX
       If (OldY <> RulerY)
          OldY := RulerY
       WinMove ahk_id %ID1%,, %RulerX%, % RulerY-VirtualScreenHeight    ;create crosshair by moving 1/2 length of segment
       WinMove ahk_id %ID2%,, % RulerX-VirtualScreenWidth, %RulerY%
       ;ToolTip (Ctrl-0 to anchor)
    Return
    
    Box(n,wide,high)
    {
       Gui %n%:Color, 00FF00,0                 ; HOWTO: Change Color : Look for the color code you want (google html color codes). Replace 00FF00 with your color code
       Gui %n%:-Caption +ToolWindow +E0x20 ; No title bar, No taskbar button, Transparent for clicks
       Gui %n%: Show, Center W%wide% H%high%      ; Show it0
       WinGet ID, ID, A                    ; ...with HWND/handle ID
       Winset AlwaysOnTop,ON,ahk_id %ID%   ; Keep it always on the top
       WinSet Transparent,255,ahk_id %ID%  ; Opaque
       Return ID
    }
    This 1 will draw a crosshair all over the screen.


    I made 1 witch wich you van design tour own crosshair or just use .png files, will upload tonight

  4. #3
    Shmegory's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    Aᴍsᴛᴇʀᴅᴀᴍ
    Posts
    360
    Reputation
    10
    Thanks
    2,001
    My Mood
    Innocent
    As a side notice to users using STEAM, when using this you are eligeable for a VAC ban upon your STEAM account. So be aware.


  5. #4
    Gratin's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    182
    Reputation
    21
    Thanks
    501
    My Mood
    Inspired
    Quote Originally Posted by Shmegory View Post
    As a side notice to users using STEAM, when using this you are eligeable for a VAC ban upon your STEAM account. So be aware.
    I highly doubt this. I doubt that vac detects and bans for use of ahk, without knowing that it was specifically used to cheat. And i know it doesn't do that because it would be invasive just like reading your emails to detect if you are committing crimes. There would be a shitstorm in the p.c. community.

    AHK Scripts are generally undetectable unless the script is obvious through input in the game such as anti-recoil showing nonhuman patterns of input. However this script has no sort of input on the game so I believe it IS UNDETECTABLE.

    However, if you can prove me wrong I would appreciate it because I don't want to get banned.
     

    Quote Originally Posted by RyanFalterJr View Post
    Vouch for Gratin, he went first, i gave him the items. Easy trader trustworthy

  6. #5
    NomadNope's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    14
    Reputation
    10
    Thanks
    2
    Quote Originally Posted by dhxrt View Post
    Just get an asus monitor, they have them built in.
    Most people would rather use this program that's free rather than buy a new monitor.

  7. #6
    GangstaHampsta's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    13
    My Mood
    Daring
    Quote Originally Posted by Shmegory View Post
    As a side notice to users using STEAM, when using this you are eligeable for a VAC ban upon your STEAM account. So be aware.
    Valve clarified that you aren't.

  8. The Following User Says Thank You to GangstaHampsta For This Useful Post:

    tinke (05-26-2020)

  9. #7
    Prime75's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    144
    Reputation
    10
    Thanks
    11
    My Mood
    Amused
    Quote Originally Posted by Shmegory View Post
    As a side notice to users using STEAM, when using this you are eligeable for a VAC ban upon your STEAM account. So be aware.
    You don't get a vac ban for using AHK.

Similar Threads

  1. [Release] A Simple Crosshair For Crossfire
    By MOD-Ady in forum CrossFire Hacks & Cheats
    Replies: 60
    Last Post: 04-22-2010, 11:13 AM
  2. [Release] Simple crosshair
    By rob7601 in forum CrossFire Hacks & Cheats
    Replies: 72
    Last Post: 03-12-2010, 08:08 PM
  3. simple crosshair
    By gilakillyou in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 01-21-2010, 02:28 PM
  4. Simple Crosshair Hack
    By Reproduce in forum Battlefield Heroes Hacks
    Replies: 13
    Last Post: 10-29-2009, 12:45 PM
  5. Simple Crosshair
    By hackme4sure in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 6
    Last Post: 10-21-2009, 03:05 PM