Jump to content

Music Player Playlist Builder Help


Abaddon
 Share

Recommended Posts

Hi, I am currently working on a little music player. I am adding a playlist builder on to it. I know I could put this directly in the player script but I'm trying to figure out how to make it it's own app first. I am having trouble writing the filename of a song to the ini file. Here is the script.

#include <GUIConstants.au3>

GUICreate("SG Sounds v1.0 - Playlist Builder", 400, 400)

Opt("GUICoordMode",1)
$Button_1 = GUICtrlCreateButton ("Choose Song",  50, 30, 100)
GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
            $file = FileOpenDialog("Choose a Song NOW!", "", "Songs (*.mp3;*.mid;*.wav)", 1)
            $ini = FileOpen("sgsound.ini", 1)
            FileWriteLine($ini, "Line5")
            FileClose($ini)
    EndSelect
Wend

Thanks for your help.

Edited by Abaddon
Link to comment
Share on other sites

  • Moderators

FileWriteLine = File writing

IniWrite = Ini writing

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Yeah, you don't seem to be actually using an INI. I was going to use the IniWrite in my example, but I'm not sure how you would want the structure to go (an INI file involves sections, keys, and values...and you just have values in this program).

So, I just modified it to make a file which lists the songs.

The problem was

FileWriteLine($ini, "Line5")oÝ÷ Ûbr(ºW@-`K
âµê®¢ÒâîjºHi×^^½ªâi¹^v§vØZ·lÖ®¶­sdfÆUw&FTÆæRb33c¶æÂb33c¶fÆRoÝ÷ Øw«{l¶ºY¡×­ uæ{
-êÜ©àzÆÞq«¬x²¯x-¢®rî«­¢+Ø(¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì((ÀÌØí¥¹¤ô¥±=Á¸¡¥±MÙ¥±½ ÅÕ½Ðí
¡½½ÍÁ±å±¥Íйµ¸¸¸ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðì ¨¹¥¹¤¤ÅÕ½Ðì°È¤°Ä¤(ì%$©ÕÍе½ÙÑ¡½Á¹¥¹½Ñ¡Á±å±¥ÍÐ¥±Ñ¼Ñ¡Ñ½À¸Q¡Ý¡½±Á½¥¹Ð½$ì(ì%ÕÍ¥¹¥±=Á¸¥ÌѼÍÁÑ¡¥¹ÌÕÀ¥å½Ôɽ¥¹Ñ¼½¹Ñ¥¹Õ½Õͱä$$ì(ì%É¥¹½Ýɥѥ¹Ñ¡¥±¸M¼°¡Ù¥¹Ñ¡=Á¸½
±½Í½µµ¹Ì¥¹Í¥Ñ¡±½½À$ì(ì%¥ÌÝÍÑÕ°¸Q¡¥ÌÝä°ÉÑ¡ÈÑ¡¸½Á¹¥¹¹±½Í¥¹ÙÉäÑ¥µÑ¡Ðå½Ô$ì(ì%±¥¬Ñ¡ÕÑѽ¸°¥Ð¥Ì½¹±ä½¹½¹¸$$±Í¼¥±MÙ¥±½Í¼Ñ¡Ð$ì(ì%Ñ¡ÕÍȸ¡½½ÍÑ¡¹µ½Ñ¡Á±å±¥Íи$$$$$$$$$ì((ì%Q¡¥Ì¥ÍÑѵ¹Ð©ÕÍе­ÌÍÕÉÑ¡ÐÑ¡ÕÍȹÌÕÀÝ¥Ñ ¸¹¥¹¤¥±¡½Í¸¸)9½ÐMÑÉ¥¹%¹MÑÈ ÀÌØí¥¹¤°ÅÕ½Ðì¹¥¹¤ÅÕ½Ð줤Q¡¸($ÀÌØí¥¹¤ôÀÌØí¥¹¤µÀìÅÕ½Ðì¹¥¹¤ÅÕ½Ðì)±Í($)¹%(()U%
ÉÑ ÅÕ½ÐíMM½Õ¹ÌØĸÀ´A±å±¥ÍР   Õ¥±ÈÅÕ½Ðì°ÐÀÀ°ÐÀÀ¤()=ÁÐ ÅÕ½ÐíU%
½½É5½ÅÕ½Ðì°Ä¤(ÀÌØí  ÕÑѽ¹|ÄôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí
¡½½ÍM½¹ÅÕ½Ðì°ÔÀ°ÌÀ°ÄÀÀ¤)U%MÑMÑÑ ¤()]¡¥±Ä(ÀÌØíµÍôU%Ñ5Í ¤(M±Ð(
ÍÀÌØíµÍôÀÌØíU%}Y9Q}
1=M(á¥Ñ1½½À(
ÍÀÌØíµÍôÀÌØí    ÕÑѽ¹|Ä($$$ÀÌØí¥±ô¥±=Á¹¥±½ ÅÕ½Ðí
¡½½ÍM½¹9=ÌÌìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíM½¹Ì ¨¹µÀÌ쨹µ¥ì¨¹ÝؤÅÕ½Ðì°Ä¤(¥±]É¥Ñ1¥¹ ÀÌØí¥¹¤°ÀÌØí¥±¤($$$í
¡¹Ñ¡Ù±Õ¥¹ÝÉ¥ÑѸɽ´ÅÕ½Ðí1¥¹ÔÅÕ½ÐìѼÀÌØí¥±°å½Ô¡($$$í¹¼ÙÉ¥±Ñ¡É°Í¼¥ÐÌäíÝÉ¥Ñѡ͵ѡ¥¹ÙÉäÑ¥µ(¹M±Ð)]¹()¥±
±½Í ÀÌØí¥¹¤¤íµ¹Ñ¥½¹Ñ¡¥ÌÐѡѽÀ½µµ¹Ð(

"Everything is vague to a degree you do not realize till you have tried to make it precise." - Bertrand Russell [The Philosophy of Logical Atomism]

Link to comment
Share on other sites

Put this at the beginning of the file to tell the program to start at track 1:

Global $currentTrack = 1oÝ÷ Ù8^Ú ¢Ú-éÞÆÛ(¨º;¬¶×¥Ø^¦º ­©­¢·vØ^ìm)Þ¢¶®¶­sbb33c¶7W'&VçEG&6²Òb33c¶7W'&VçEG&6²²oÝ÷ ج¶Ø^±©¶(m§$Ê·õÛÉ«­¢+ØÀÌØíÕÉɹÑQɬôÀÌØíÕÉɹÑQɬ´ÄoÝ÷ Ù8^Ú)¬¢·*.ë-ç¶ÞiÖ®¶­se6÷VæEÆfÆU&VDÆæRgV÷CµtDUdU%õDUôdÄUô2gV÷C²Âb33c¶7W'&VçEG&6²·Æ2FR6öæröâFBÆæ
Edited by Creative

"Everything is vague to a degree you do not realize till you have tried to make it precise." - Bertrand Russell [The Philosophy of Logical Atomism]

Link to comment
Share on other sites

Thanks for all your help I'm almost done. There are 2 things I need to do though.

1. Apply hotkeys to all the buttons

2. Add text to the bottom of the gui

If any one would like to explain how to do it I would be happy :whistle: you can see that I learn fast.

Edited by Abaddon
Link to comment
Share on other sites

1. Apply hotkeys to all the buttons

HotKeySet(). Consequntly, you need to put the actions into function so that you can call them from HotKeySet()

2. Add text to the bottom of the gui

???

"Everything is vague to a degree you do not realize till you have tried to make it precise." - Bertrand Russell [The Philosophy of Logical Atomism]

Link to comment
Share on other sites

  • 2 weeks later...

Like, instead of inserting an image into the Gui, like at the bottom. I wanted a line of text that said created by me.

Edit: Nevermind I found GUICtrlCreateLabel sorry

Edited by Abaddon
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...