Sign in to follow this  
Followers 0
Guy_

Can't believe I need help for this...

3 posts in this topic

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 :mellow:

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Run(@ComSpec & " /c Start " & FileGetShortName($pathToFile), "", @SW_HIDE)

Wow, "heavy"... :) But it worked first time!

Many Thanks + 1, neogia! :mellow:

Share this post


Link to post
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
Sign in to follow this  
Followers 0