amokoura Posted January 7, 2009 Posted January 7, 2009 (edited) Keyboard Beep Prank:On every key press, PC beeps with a random frequency. I'll install this to my co-workers pc before I leave the company.The implementation feels quite poor, any improvement ideas?#NoTrayIcon #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 for $i=1 to 221 If _IsPressed(Hex($i, 2), $dll) Then beep(random(100,1000,1), 100) ExitLoop EndIf Next Sleep ( 100 ) WEnd DllClose($dll)EDIT: Changed the beep frequency to random instead of a calculation based on the key hex. Cooler effect. Edited January 7, 2009 by amokoura
FireFox Posted January 7, 2009 Posted January 7, 2009 Keyboard Beep Prank: Every time a key is pressed, PC beeps with a randomish sound. I'll install this to my co-workers pc before I leave the company. The implementation feels quite poor, any improvement ideas?You can use IsPressed_UDF with some functions and you will able to do some beeps for mouse keys or something else #NoTrayIcon #include <IsPressed_UDF.au3> __DLL("user32.dll", 1) While 1 If _IsAnyKeyPressed() Then Beep(Random(2, 15000, 1), 100) EndIf WEnd Func OnAutoItExit() __DLL("user32.dll", 0) EndFunc Cheers, FireFox.
amokoura Posted January 7, 2009 Author Posted January 7, 2009 You can use IsPressed_UDF with some functions and you will able to do some beeps for mouse keys or something else Thanks, it'll make the code cleaner. Apparently the actual implementation is similar, though.Anyways, the UDF look very nice. Don't have to remember the hex codes anymore. It should be attached to the official UDF collection!
FireFox Posted January 7, 2009 Posted January 7, 2009 Thanks, it'll make the code cleaner. Apparently the actual implementation is similar, though.Anyways, the UDF look very nice. Don't have to remember the hex codes anymore. It should be attached to the official UDF collection! Many thanks ! I know that my UDF is very usefull, however Ive only 50+ downloads per versions...I try to keep it up until no more functions would be available Cheers, FireFox.
FireFox Posted January 7, 2009 Posted January 7, 2009 (edited) or something else...Here I was thinking to an idea : if user press alpha keys so you can do beep(1000,100) ,if user press num keys then Beep(2000,100) , etc...With _IsPressed, you havnt whell key so you can add it with _IswhellKeyScroll()Good luck !Cheers, FireFox. Edited January 7, 2009 by FireFox
youknowwho4eva Posted January 7, 2009 Posted January 7, 2009 Be real cool if the beeps got higher in frequency every time, and maybe make the monitors get brighter or turn up the red. Be even better if there were an auto degauss. Don't think LCD's have that though. Giggity
sandin Posted January 7, 2009 Posted January 7, 2009 you can also make keyboard LEDs flash randomly Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
FireFox Posted January 7, 2009 Posted January 7, 2009 (edited) Be real cool if the beeps got higher in frequency every time, and maybe make the monitors get brighter or turn up the red. Be even better if there were an auto degauss. Don't think LCD's have that though. ... #Include <IsPressed_UDF.au3> $frequency = 2 While 1 If _IsAnyKeyPressed() Then If $frequency = 15000 then $frequency = 2 Beep($frequency, 100) $frequency = $frequency + 1 EndIf WEnd But for LCD brightness i dont know how to do Edit : @sandin Good idea ! I think all this things could make people crazy ! Cheers, FireFox. Edited January 7, 2009 by FireFox
Inyu Posted March 17, 2009 Posted March 17, 2009 Keyboard Beep Prank: On every key press, PC beeps with a random frequency. I'll install this to my co-workers pc before I leave the company. The implementation feels quite poor, any improvement ideas? #NoTrayIcon #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 for $i=1 to 221 If _IsPressed(Hex($i, 2), $dll) Then beep(random(100,1000,1), 100) ExitLoop EndIf Next Sleep ( 100 ) WEnd DllClose($dll) EDIT: Changed the beep frequency to random instead of a calculation based on the key hex. Cooler effect. Why not make the beep loud?[]I found the loudest beep frequency is 2000[atleast for me].
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