Infinitex0 Posted April 2, 2006 Posted April 2, 2006 #include <Misc.au3> HotKeySet("{F1}", "terminate") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SplashImageOn("", "C:\Documents and Settings\Owner\My Documents\My Pictures\desktop.JPG", 1023, 769, 0, 0, 1) If _IsPressed("01") Then $Pos0 = MouseGetPos() $wherepic = GUICtrlCreatePic("C:\Documents and Settings\Owner\My Documents\My Pictures\bullet hole.bmp", $Pos0[0], $Pos0[1]) GUICtrlSetData($Pos0[0], MouseGetPos(0)) GUICtrlSetData($Pos0[1], MouseGetPos(1)) EndIf sleep(2147483647) SplashOff() ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func terminate() SplashOff() Exit 0 EndFunc this is a program that is supposed to make a picture of my desktop appear and whenever I click make a bullet hole appear in the desktop picture. Problem is that whenever Iclick nothing happens. Any ideas? The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
greenmachine Posted April 2, 2006 Posted April 2, 2006 It only checks for the mouseclick on the first run-through, and then just sleeps... forever. You need to put the check in a loop.
Infinitex0 Posted April 2, 2006 Author Posted April 2, 2006 (edited) Okay this is what I have now. #include <Misc.au3> HotKeySet("{F1}", "terminate") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SplashImageOn("", "C:\Documents and Settings\Owner\My Documents\My Pictures\desktop.JPG", 1023, 769, 0, 0, 1) If _IsPressed("01") Then while 1 $Pos0 = MouseGetPos() $wherepic = GUICtrlCreatePic("C:\Documents and Settings\Owner\My Documents\My Pictures\bullet hole.bmp", $Pos0[0], $Pos0[1]) GUICtrlSetData($Pos0[0], MouseGetPos(0)) GUICtrlSetData($Pos0[1], MouseGetPos(1)) WEnd EndIf sleep(2147483647) SplashOff() ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func terminate() SplashOff() Exit 0 EndFunc But for some reason it is not working. Why? Edited April 2, 2006 by Infinitex0 The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
greenmachine Posted April 2, 2006 Posted April 2, 2006 The _IsPressed needs to be in the loop too.. otherwise you're still checking once, and if you happen to be clicking the mouse at the time, it will loop in that location forever.
Infinitex0 Posted April 2, 2006 Author Posted April 2, 2006 Okay this is what I have now #include <Misc.au3> HotKeySet("{F1}", "terminate") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SplashImageOn("", "C:\Documents and Settings\Owner\My Documents\My Pictures\desktop.JPG", 1023, 769, 0, 0, 1) While 1 If _IsPressed("01") Then $Pos0 = MouseGetPos() $wherepic = GUICtrlCreatePic("C:\Documents and Settings\Owner\My Documents\My Pictures\bullet hole.bmp", $Pos0[0], $Pos0[1]) GUICtrlSetData($Pos0[0], MouseGetPos(0)) GUICtrlSetData($Pos0[1], MouseGetPos(1)) EndIf WEnd sleep(2147483647) SplashOff() ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func terminate() SplashOff() Exit 0 EndFunc but it still doesn't work. Any ideas? The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
greenmachine Posted April 2, 2006 Posted April 2, 2006 Maybe because you're trying to use GUI functions on a SplashImage?
Infinitex0 Posted April 2, 2006 Author Posted April 2, 2006 (edited) I see, in that case what's that funtion used to set an image as a backround? (I'm realy out of it) Edited April 2, 2006 by Infinitex0 The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
ConsultingJoe Posted April 2, 2006 Posted April 2, 2006 this is what I did #include <Misc.au3> HotKeySet("{F1}", "terminate") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; While 1 If _IsPressed("01") Then $Pos0 = MouseGetPos() ;GUICreate("My GUI picture",350,300,-1,-1) SplashImageOn ( "", @ScriptDir & "\test.bmp", 48, 48,$Pos0[0], $Pos0[1], 1 ) ;$wherepic = GUICtrlCreatePic(@ScriptDir & "\test.bmp", $Pos0[0], $Pos0[1]) GUISetState () GUICtrlSetData($Pos0[0], MouseGetPos(0)) GUICtrlSetData($Pos0[1], MouseGetPos(1)) EndIf sleep(100) WEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func terminate() SplashOff() Exit 0 EndFunc Check out ConsultingJoe.com
RazerM Posted April 2, 2006 Posted April 2, 2006 @zerocool that works but you should change it to GUICtrlSetData($Pos0[0] - 24, MouseGetPos(0)) GUICtrlSetData($Pos0[1] - 24, MouseGetPos(1))to centre it My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
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