Jump to content

Help to open file in external program


ajit
 Share

Recommended Posts

Hi,

How can i open a new file in an external program such as Windows Media Player, which is already runnning and playing a file (without using send function). For eg. File A is playing and i want to open File B without closing Media Player and without using send function.

Any help would be appreciated.

Ajit

Link to comment
Share on other sites

I'm not certain, but I believe there is a WMP udf. Other options would be controlsend. that way it's only sent to wmp and not the active program.

Thanks very much but i was wondering if something like ShellExecute exists. I wanted to avoid controlsend.

In India it is already 2009 so HAPPY NEW YEAR

Ajit

Link to comment
Share on other sites

You can do that with ShellExecute. Depending on the version of WMP, DDE extensions will allow the call to go to the same instance of the running player. For example:

ShellExecute(Wmplayer.exe, $File1, '', 'open')
Sleep(10000)
ShellExecute(Wmplayer.exe, $File2, '', 'open')

Would open File2 10 seconds after opening File1, with only one process of wmplayer.exe showing up since you have used ShellExecute. Other programs may open a second instance depending on their settings

Link to comment
Share on other sites

You can do that with ShellExecute. Depending on the version of WMP, DDE extensions will allow the call to go to the same instance of the running player. For example:

ShellExecute(Wmplayer.exe, $File1, '', 'open')
Sleep(10000)
ShellExecute(Wmplayer.exe, $File2, '', 'open')

Would open File2 10 seconds after opening File1, with only one process of wmplayer.exe showing up since you have used ShellExecute. Other programs may open a second instance depending on their settings

@Varian

Thanks very much for your help and advice.

Ajit

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...