mIRC Home    About    Download    Register    News    Help

Topic Options
#239508 - 03/11/12 04:14 PM troubleshooting mp3 script
Jaillynian Offline
Ameglian cow

Registered: 09/01/12
Posts: 42
I have an mp3 script I've had for a long time.. it's gone through a lot of edits throughout the time since.. well it used to have more to it than it does now (I lost the original version long ago...)

I have a minor issue with the script since I have it set to a specific folder for my music.. which has subfolders.. and sometimes my script opens up on the 'last used folder' instead of the main folder, where I want it to open.

===


alias selectsong {
%File = $dir="Select a Media File" %Music
if (%file == $null) { halt }
else run %File
}


==

That is the part specifically giving me issues.

Top
#239556 - 07/11/12 05:02 PM Re: troubleshooting mp3 script [Re: Jaillynian]
Deega Offline
Vogon poet

Registered: 30/10/12
Posts: 164
Try using this
Code:
alias selectsong {
  var %dir = C:\Music\*.mp3
  run $$sfile(%dir,Select a file,Play)
}

Obviously, change C:\Music\*.mp3 to your own music folder

Top
#239578 - 09/11/12 03:13 AM Re: troubleshooting mp3 script [Re: Deega]
Jaillynian Offline
Ameglian cow

Registered: 09/01/12
Posts: 42
thanks. I didn't use what you posted 100%, but the $$file string fixed it!

Top
#240044 - 17/12/12 03:32 PM Re: troubleshooting mp3 script [Re: Jaillynian]
Jaillynian Offline
Ameglian cow

Registered: 09/01/12
Posts: 42
I called for celebration too soon. It seems to still be forgetting where the music folder is set.
Code:
alias selectsong {
  set %musdir %Music
  %File = $$sfile(%musdir,Select File,OK)
  if (%file == $null) { halt } 
  else { run %File | messagera | unset %File }
}

---

trying "var" did nothing for some reason.. so I tried to use set

now, the variable does set to my music folder, which is specified in %Music

but when I open my script it goes to where I last picked a folder (such as a subfolder)

I'm really puzzled why it's ignoring the music directory specified. If I unload and reload the script, it fixes the issue.. but only temporarily.

Edit: I Also tried making it where it unsets %file in case the old %file info was messing things up. seems to not be the case. I don't have any other script dealing with folders, really.. so I'm not sure why it's 'soft saving' a folder.

Edit 2: To clarify, %Music is C:\Users\jsd\Music\*.mp3


Edited by Jaillynian (17/12/12 03:36 PM)

Top
#240173 - 31/12/12 07:23 PM Re: troubleshooting mp3 script [Re: Jaillynian]
Jaillynian Offline
Ameglian cow

Registered: 09/01/12
Posts: 42
Ah well. Time to scrap it I guess!

Top
#240175 - 31/12/12 09:10 PM Re: troubleshooting mp3 script [Re: Jaillynian]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
What happens if you echo %Music from that alias? Just to make sure it's really what you think it is. My guess is that you're setting %Music somewhere to something else. By echoing the variable, you can see if it's something other than what you expect. If so, you need to look at a different part of the script because you're not setting %Music in this alias.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#240176 - 31/12/12 10:32 PM Re: troubleshooting mp3 script [Re: Riamus2]
Jaillynian Offline
Ameglian cow

Registered: 09/01/12
Posts: 42
It came back with the music folder I set when I //echo it.

and no, I'm not setting %music in that snippet there. I have a dialog box set for that, but that shouldn't be conflicting with calling up %Music at all.

the dialog box sets %music and the %musdir was an attempt to make it go 'oh right %music is set to so and so.

so far that's a fail. smirk it just forgets what I have set and it goes to the folder I last chose a song from (A subfolder, to be specific). it stops opening the proper folder entirely.

if I unload and reload the script, that fixes the issue.. but it shouldn't be doing that in the first place.


Edited by Jaillynian (31/12/12 10:33 PM)

Top