mrbond007 Posted January 31, 2007 Posted January 31, 2007 (edited) i've rewritten the code and add a new slider. Enjoy QuiK_PleyA.au3 Edited February 8, 2007 by mrbond007 Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight
sandman Posted February 2, 2007 Posted February 2, 2007 It doesn't work. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
Achilles Posted February 2, 2007 Posted February 2, 2007 (edited) It doesn't work. (Just a little organization...) expandcollapse popup#include <GUIConstants.au3> #include <Sound.au3> Opt("GUIOnEventMode", 1) Opt("TrayIconHide", 1) $message = "Choose zee song" $LAB1 = HotKeySet("{F2}", "Choose") $LAB2 = HotKeySet("{F3}", "Play") $LAB3 = HotKeySet("{F4}", "Stop") $LAB4 = HotKeySet("{ESC}", "Kill") $lee = GUICreate("QuiK Pleya", 200, 125, 190, 100) GUICtrlCreateLabel("****Press Esc to Quit****", 40, 10) GUICtrlSetColor(-1, 0x006CD9) GUICtrlCreateLabel("****Press F2 to Choose****", 40, 40) GUICtrlSetColor(-1, 0x006CD9) GUICtrlCreateLabel("****Press F3 to Play****", 40, 70) GUICtrlSetColor(-1, 0x006CD9) GUICtrlCreateLabel("****Press F4 to Stop****", 40, 100) GUICtrlSetColor(-1, 0x006CD9) GUISetState(@SW_SHOW) GUICtrlSetOnEvent($LAB2, "Play") GUICtrlSetOnEvent($LAB3, "Stop") GUICtrlSetOnEvent($LAB4, "Kill") GUISetOnEvent($GUI_EVENT_CLOSE, "Kill") $file = FileOpenDialog($message, "", "Songs (*.mp3;*.mid;*.wav)", 1) If @error Then MsgBox(4096,"","No File is chosen") Exit EndIf $op = _SoundOpen ($file) $pl = _SoundPlay ($op) _SoundStop ($op) While 1 Sleep(50) WEnd Func Choose() $pl = False _SoundStop ($op) _SoundClose ($op) $file = FileOpenDialog($message, "", "Songs (*.mp3;*.mid;*.wav)", 1) If @error Then MsgBox(4096,"","No File is chosen") Exit EndIf $op = _SoundOpen ($file) EndFunc Func Play() _SoundPlay ($op) $pl = True Sleep(200) ; REmMOVE iF YOU HAVE A FAST MACHiNE While $pl = True $alfa = Random(0, 2, 1) If $alfa = 0 Then Send("{NUMLOCK toggle}") ElseIf $alfa = 1 Then Send("{CAPSLOCK toggle}") ElseIf $alfa = 2 Then Send("{SCROLLLOCK toggle}") EndIf If _SoundPos($op, 2) = _SoundLength($op, 2) Then ExitLoop Sleep(25) ; or Sleep(Random(10, 30, 1) WEnd EndFunc Func Stop() $pl = False _SoundStop ($op) EndFunc Func Kill() _SoundClose ($op) Send("{NUMLOCK off}") Send("{CAPSLOCK off}") Send("{SCROLLLOCK off}") Exit EndFunc EDIT: Nice disco lights, very original! Edited February 2, 2007 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
sandman Posted February 2, 2007 Posted February 2, 2007 Wow, that's a pretty good idea. Thank you Piano Man for the cleanup. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
mrbond007 Posted February 2, 2007 Author Posted February 2, 2007 I don't know what is wrong with this forum, i try to edit the post in a normal way but the preview shows all lines are messed up. Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight
NELyon Posted February 2, 2007 Posted February 2, 2007 i like it, but it you are typing, sometimes the text comes oUT strange.
mrbond007 Posted February 8, 2007 Author Posted February 8, 2007 well i'm done with typing instead i uploaded the file. Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight
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