marsL Posted February 4, 2011 Share Posted February 4, 2011 Hello, can you help me to creat a download tool for Avira with continuous playing of sound in following script expandcollapse popup#include <GUIConstants.au3> _Main() Func _Main() ; Window GUICreate("Window title",256,278,-1,-1,-1,1) ; BackGround GUISetBkColor(0xDE0007) ; Sound SoundPlay("Dogma.mp3",0) ; Buttons $Btn01=GuiCtrlCreateButton("Homepage of Avira",10,10,236,24) GUICtrlSetFont(-1,9,700,0) $Btn02=GuiCtrlCreateButton("Updates",10,58,236,24) GUICtrlSetFont(-1,9,700,0) $Btn03=GuiCtrlCreateButton("Downloads",10,106,236,24) GUICtrlSetFont(-1,9,700,0) GUISetState() ; While While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Btn01 ShellExecute("http://www.avira.com/en/for-home") Case $Btn02 ShellExecute("http://www.avira.com/en/support-vdf-update-info") Case $Btn03 ShellExecute("http://www.avira.com/en/support-download") EndSwitch WEnd GUIDelete() ; Close Exit ; End function EndFunc I just want a like as a keygen - with any sound Link to comment Share on other sites More sharing options...
jvanegmond Posted February 4, 2011 Share Posted February 4, 2011 I think this UDF can do it: github.com/jvanegmond Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 4, 2011 Share Posted February 4, 2011 If it's just an mp3 you could use the native Sound UDF, see "Sound Management" in the helpfile. You basically do: _SoundOpen() _SoundPlay() While 1 If _SoundStatus() = paused then _SoundPlay() Wend _SoundClose() No need for extra dll's unless you want to. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
jvanegmond Posted February 4, 2011 Share Posted February 4, 2011 (edited) If it's just an mp3 you could use the native Sound UDF, see "Sound Management" in the helpfile.You basically do:_SoundOpen()_SoundPlay()While 1If _SoundStatus() = paused then _SoundPlay()Wend_SoundClose()No need for extra dll's unless you want to.@OP, the above method has the unmentioned drawback of short gaps between stopping and starting the mp3. BASS library can do it without gaps. I didn't mentioned the _Sound UDf method because it is noob. Edited February 4, 2011 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 4, 2011 Share Posted February 4, 2011 And BASS is extra disc space. They both have their (dis)advantages. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
jvanegmond Posted February 7, 2011 Share Posted February 7, 2011 (edited) I wasn't saying that either of the methods are perfect. The cost of disk space when you use extra files is obvious, the annoying gap when you're trying to loop a sound does not become apparent until you have tried it. To save the OP a failed attempt, I pointed out what does not become immediately obvious. Such is the nature of providing assistance on these forums. You think ahead as far as possible and consider any decisions they are forced to take in the future. Sometimes the right decision is obvious, sometimes it needs to be explained. Edited February 7, 2011 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 7, 2011 Share Posted February 7, 2011 (edited) Tracker music would be great too, with the dll included in the script.Mods can loop, a mp3 file would have to be custom tailored for that, and it will still probably sound weird.It would also sound more like the "demo/keygen" sound.trancexx made an example of that <-- linkEdit:changed wording Edited February 7, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
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