Guy_ Posted March 14, 2006 Posted March 14, 2006 Hi all, it's been a few months without troubles I have to arrange for a PC to start up and open a random playlist for BSplayer. The simple(?) problem is: how do I "open" a file that makes its parent program run? I had managed this far, but the "Run" doesn't work. What do I use instead? Hope I'm overlooking something very obvious, but can't find a clue in the function catalog... It seems I can't run BSplayer with a playlist in the command line either, so I'm stuck. $playlist= Random (1 ,4, 1) ; generates integer between 1 and 4 If $playlist = 1 Then Run("c:\playlists\01.bsl") ; start BSplayer with playlist 1, I had hoped ElseIf $playlist = 2 Then Run("c:\playlists\02.bsl") ElseIf $playlist = 3 Then Run("c:\playlists\03.bsl") Else Run("c:\playlists\04.bsl") Endif Many thanks for your hints! GUy
neogia Posted March 14, 2006 Posted March 14, 2006 Yeah, I'm not sure it's mentioned in the helpfile, but it is mentioned here in the FAQ on the support forums. For any file that's not on the short list: ".exe, .bat, etc." i.e. executable files, you can use this: Run(@ComSpec & " /c Start " & FileGetShortName($pathToFile), "", @SW_HIDE) [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia
Guy_ Posted March 14, 2006 Author Posted March 14, 2006 Run(@ComSpec & " /c Start " & FileGetShortName($pathToFile), "", @SW_HIDE) Wow, "heavy"... But it worked first time! Many Thanks + 1, neogia!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now