Sign in to follow this  
Followers 0
ajit

Help to open file in external program

7 posts in this topic

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

Share this post


Link to post
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.


Giggity

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

@ajit

Little documentation about Command Line Paramters

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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

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