Sign in to follow this  
Followers 0
jaenster

Perm Crosshair

5 posts in this topic

#1 ·  Posted (edited)

#cs 
  * ---------------------------------------------------------------------------- 
  * "THE BEER-WARE LICENSE" (Revision 42): 
  * <mail@jaenster.net> wrote this file. As long as you retain this notice you 
  * can do whatever you want with this stuff. If we meet some day, and you think 
  * this stuff is worth it, you can buy me a beer in return. Jan "jaenster"
  * ---------------------------------------------------------------------------- 
 #ce 
 hotkeyset("!{f1}","set_on") 
 hotkeyset("!{f2}","set_off") 
 global $crosshair_on 
 set_off() 
 $x = @DesktopWidth/2 
 $y = @Desktopheight/2 
 While 1 
    pict($x,$y) 
    sleep(2) 
 WEnd 
 func set_on() 
    $crosshair_on = 1 
 endfunc 
 func set_off() 
    $crosshair_on = 0 
    while $crosshair_on = 0 
       sleep(100) 
    wend 
 endfunc 
 Func drawpix($dc,$x,$y,$color) 
    DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color) 
 EndFunc 
 Func pict($x,$y) 
    $dc= DllCall ("user32.dll", "int", "GetDC", "hwnd", "") 
    drawpix($dc,$x-4+1,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+1,$y-4+2,0x000000FF) 
    drawpix($dc,$x-4+1,$y-4+6,0x000000FF) 
    drawpix($dc,$x-4+1,$y-4+7,0x000000FF) 
    drawpix($dc,$x-4+2,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+2,$y-4+7,0x000000FF) 
    drawpix($dc,$x-4+3,$y-4+3,0x000000FF) 
    drawpix($dc,$x-4+3,$y-4+5,0x000000FF) 
    drawpix($dc,$x-4+4,$y-4+4,0x00000000) 
    drawpix($dc,$x-4+5,$y-4+3,0x000000FF) 
    drawpix($dc,$x-4+5,$y-4+5,0x000000FF) 
    drawpix($dc,$x-4+6,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+6,$y-4+7,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+2,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+6,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+7,0x000000FF) 
    DllCall ("user32.dll", "int", "ReleaseDC", "hwnd", 0,  "int", $dc[0]) 
 EndFunc

The drawpixel function isn't writen by me. I forgot the person who made it.

But without the person who made drawpix, it would never works so smooth

Note on script: You start it with alt + f1

Edit:

For the people that have no idea what this program do:

Posted Image

It simply sets in the middle of your screen a dot, that help you to aim in games like counter strike

Edited by jaenster

-jaenster

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Script works beautifully

However it flickers and lags when any full-screen DirectX application is opened on top of it.

I'm pretty sure the only way to display something over DirectX (without flcker) is through hooking API.

I would LOVE for someone to write a script that does that :)

Edited by Paulie

Share this post


Link to post
Share on other sites

Thanks for your crosshair, works nice :)

For autoitusers who don't like to change always crosshair parameters in the the script you will be able able to download fullcrosshair in this topic with a link...


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Thanks for your crosshair, works nice o:)

For autoitusers who don't like to change always crosshair parameters in the the script you will be able able to download fullcrosshair in this topic with a link...

well, yes but it is an old script, i only posted for you to show how i did it, so i dont really care about it :)

have fun with it :)


-jaenster

Share this post


Link to post
Share on other sites

Script works beautifully

However it flickers and lags when any full-screen DirectX application is opened on top of it.

I'm pretty sure the only way to display something over DirectX (without flcker) is through hooking API.

I would LOVE for someone to write a script that does that :)

http://www.gamedev.net/community/forums/to...topic_id=359319

http://www.gamedev.net/community/forums/to...topic_id=445141

worth a shot..

Just don't get yourself VAC banned. :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0