 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
vlcek
Joined: 19 Feb 2007 Posts: 321 Location: Czech Republic
|
Posted: Mon Apr 02, 2007 5:09 pm Post subject: list of files |
|
|
want make a mp3 player. In mp3 is button open, and play and button add to list. I need a code, which create a list of files, which user submit.
Thanks.
Pleae write this code. |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Tue Apr 03, 2007 1:21 am Post subject: |
|
|
| You want to make an mp3 player? From what I'm seeing, it's more like you want someone to make an mp3 player for you. Why not just get Winamp or something? |
|
| Back to top |
|
 |
vlcek
Joined: 19 Feb 2007 Posts: 321 Location: Czech Republic
|
Posted: Tue Apr 03, 2007 4:14 pm Post subject: |
|
|
| I need a code, which add mp3 files to a listbox. oI have got a ther codes. |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Tue Apr 03, 2007 4:30 pm Post subject: |
|
|
To get you started:
| Code: | Loop %A_MyDocuments%\*.mp3
{
mp3List .= A_LoopFileName . "|"
}
StringTrimRight mp3List, mp3List, 1
Gui Add, ListBox, w200 h300 vmp3Choice, %mp3List%
Gui Add, Button, w100 xm+50 gPlay Default, Play MP3
Gui Show
Return
Play:
Gui Submit, NoHide
If (mp3Choice = "")
{
MsgBox 16, Error, No File Selected!
}
Else
{
MsgBox Now playing %mp3Choice%
}
Return
GuiClose:
GuiEscape:
ExitApp
|
|
|
| Back to top |
|
 |
vlcek
Joined: 19 Feb 2007 Posts: 321 Location: Czech Republic
|
Posted: Tue Apr 03, 2007 4:45 pm Post subject: |
|
|
In this code is any error.
| Code: | Gui, 7:+owner1
; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
Gui +Disabled
; Disable main window.
Loop %A_ScriptDir%\media\*.*
{
mp3List .= A_LoopFilename . "|"
}
StringTrimRight mp3List, mp3List, 1
Gui 7:Add, ListBox, w200 h300 vmp3Choice, %mp3List%
Gui 7:Add, Button, w100 xm+50 g7Play Default, hrej
Gui, 7:Show, w65, oblíbené
Return
7play:
Gui, 7:Submit, NoHide
If (mp3Choice = "")
{
MsgBox 16, chyba, nebyl vybrán žádný soubor!
}
Else
{
SoundPlay, %mp3Choice%
}
return
7GuiClose:
7GuiEscape:
Gui, 1:-Disabled
Gui Destroy |
Please write good code. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|