vlcek
Joined: 19 Feb 2007 Posts: 323 Location: Czech Republic
|
Posted: Sat Apr 12, 2008 5:25 pm Post subject: my_mp3_player can you rewrite some... |
|
|
Hello.
Can you rewrite listboxs to listviews and write filedelete function?
This is my mp3 player code:
| Code: |
#singleinstance, force
setworkingdir %A_ScriptDir%
if notexist mp3
filecreatedir mp3
if notexist voice
filecreatedir voice
menu, tray, NoStandard
Menu, tray,tip, Free Mp3 player...
Menu,tray,add,exit,ex
Menu,tray,add,stop,stop
Menu,tray,add,show,zp
Menu,tray,default,show
Gui, -sysmenu
random,timestring,1,984454
gui,add,button,gupdate,check for updates...
gui,add,tab,w100 h100,mp3|voice
gui,tab,mp3
Loop mp3\*.mp3
{
mp3list .= A_LoopFileName . "|"
}
StringTrimRight mp3list, mp3list, 1
Gui,Add, ListBox, w200 h300 vmp3Choice, %mp3List%
Gui,Add, Button, w100 xm+50 gPlay Default, play
gui,tab,voice
Loop voice\*.wav
{
voicelist .= A_LoopFileName . "|"
}
StringTrimRight voicelist, voicelist, 1
Gui,Add, ListBox, w200 h300 vvoiceChoice, %voiceList%
Gui,Add, Button, w100 xm+50 gPlay2, play
gui,add,button,w60 h60 grec,record
Gui, Show,, Free mp3 player
Menu,context,add,exit,ex
Menu,context,add,stop,stop
bitrate=16
time=6
channels=1
bitdepth=44100
file=rec_%timestring%_file.wav
Return
play:
Gui, Submit, Nohide
If (mp3Choice = "")
{
MsgBox 16, Error, No File Selected!
}
Else
{
soundplay, mp3\%mp3Choice%
}
Return
ex:
ExitApp
Return
zp:
Gui, show
Return
stop:
SoundPlay, nonexistent
gosub,zp
Return
guicontextmenu:
Menu,context,show
return
2play:
play2:
Gui, Submit, Nohide
If (voiceChoice = "")
{
MsgBox 16, Error, No File Selected!
}
Else
{
soundplay, voice\%voiceChoice%
}
Return
rec:
rec2:
soundplay, beep.wav, wait
runwait, cmd2wav.exe voice\%file% %time% %bitrate% %channels% %bitdepth%,,hide
gosub, s
return
s:
soundplay, beep.wav, wait
soundplay, beep.wav, wait
soundplay, beep.wav,wait
sleep, 800
reload
return
update:
;I'm working for this function.
return
|
I understand listview. _________________ Thanks. |
|