Dx3 Posted May 14, 2006 Posted May 14, 2006 Hi again everyone, I'm kinda just working on scraps on AutoIt. I have this script: HotKeySet("^{END}", "Stop") Func stop() Beep(50, 100) Beep(4000, 100) Sleep(2) EndFunc (sorry I'm really new to AutoIt, so this may be a "duh" or "noob" question) I run it in SciTe but it ends right when I start it. What it's supposed to do is beep an alarm sound when I press Ctrl+End. What's wrong?
Infinitex0 Posted May 14, 2006 Posted May 14, 2006 (edited) Maybe, HotKeySet("^{END}", "Stop") while 1 sleep(500) wend Func stop() Beep(50, 100) Beep(4000, 100) Sleep(2) EndFunc Not tested. By the way using Beep requires Beta. And welcome to autoit Edited May 14, 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]
Dx3 Posted May 14, 2006 Author Posted May 14, 2006 Thanks so much! I hope I can become very useful to the AutoIt community.
Paulie Posted May 15, 2006 Posted May 15, 2006 (edited) Thanks so much! I hope I can become very useful to the AutoIt community. Just to let you know, you may want to look into the "_ispressed" function, because HotKeySet has a tendency to steal the keys from othere uses Ex: Hotkeyset("a","example") Func example() Send("Script") Endfunc This(when ran in Notepad) sends "script" not "ascript" However If _ispressed(31) then While _ispressed(31) Send("Myscript") Wend EndIf Will constantly send "1Myscript1Myscript" as long as the button is held Which could be good for a Beep alarm Just a bit of info Note: "_IsPressed" requires the udf Edited May 15, 2006 by Paulie
Paulie Posted May 15, 2006 Posted May 15, 2006 Actually, this would be kinda funny form of parental controls. you make a list of site titles that you don't want you kids visiting, and the say While 1 if Winexists($Predifined_Window_Title) then Beep(3000,300) Beep(300,300) Endif Wend and beep can't be muted or turned off with volume controls You could make a list with GUI that you can add window names to and if any ever exist, then that alarm sounds till they are gone Thats would be cool or, better yet, it sounds that alarm then blocks input so the kid gets caught with that site open. That would be cool sorry that was off topic, but when you said alarm it got me thinking
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