AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

list of files

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
vlcek



Joined: 19 Feb 2007
Posts: 321
Location: Czech Republic

PostPosted: Mon Apr 02, 2007 5:09 pm    Post subject: list of files Reply with quote

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
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Tue Apr 03, 2007 1:21 am    Post subject: Reply with quote

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
View user's profile Send private message
vlcek



Joined: 19 Feb 2007
Posts: 321
Location: Czech Republic

PostPosted: Tue Apr 03, 2007 4:14 pm    Post subject: Reply with quote

I need a code, which add mp3 files to a listbox. oI have got a ther codes.
Back to top
View user's profile Send private message
Helpy
Guest





PostPosted: Tue Apr 03, 2007 4:30 pm    Post subject: Reply with quote

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

PostPosted: Tue Apr 03, 2007 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group