Jump to content

run windows media and open .avi file?


dbecker
 Share

Recommended Posts

I want to have a button in my gui run windows media player and open a specific .avi movie file. are there special rules to go with avi files or something? I can't tell what I'm doing wrong.

$avi = @ScriptDir & "\studentapptest.avi"
Run ("C:\Program Files\Windows Media Player\wmplayer.exe" & $avi)

this just doesn't seem to wanna go. If I just have it open windows media by itself it works fine, but when I try to add on the file it says that it can't find it. Anyone have any suggestions?

"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

Link to comment
Share on other sites

You don't have any space between wmpalyer.exe and the avi file name. You probably also need quotes in case the path contains spaces

$avi = @ScriptDir & "\studentapptest.avi"

Run ("C:\Program Files\Windows Media Player\wmplayer.exe " & """" $avi & """")

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

You don't have any space between wmpalyer.exe and the avi file name. You probably also need quotes in case the path contains spaces

$avi = @ScriptDir & "\studentapptest.avi"

Run ("C:\Program Files\Windows Media Player\wmplayer.exe " & """" $avi & """")

Hi,

maybe this works, too :lmao:

$avi = FileOpenDialog("", "", "Avi (*.avi)")
Run ("C:\Programme\Windows Media Player\wmplayer.exe" & ' "' & $avi & '"')

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

ok, this is just how i'd do it...

$avi = FileOpenDialog("", "", "Avi (*.avi)")
$avi = FileGetShortName($avi)
Run(@Comspec & " /c start " & $avi, '',@SW_HIDE)

--my two cents

~cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

ok, this is just how i'd do it...

$avi = FileOpenDialog("", "", "Avi (*.avi)")
$avi = FileGetShortName($avi)
Run(@Comspec & " /c start " & $avi, '',@SW_HIDE)

--my two cents

~cdkid

Hi cdkid,

nice version. ;)

But in (or at?) your version, it is not garanteed, that the movie is started with windows media player.

It starts with the associated programm to *avi.

I think you know that. But maybe some others not. :lmao:

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

You don't have any space between wmpalyer.exe and the avi file name. You probably also need quotes in case the path contains spaces

$avi = @ScriptDir & "\studentapptest.avi"

Run ("C:\Program Files\Windows Media Player\wmplayer.exe " & """" $avi & """")

this was really close, but I got it to work

$avi = @ScriptDir & "\Ubertor Patch\studentapptest.avi"
         Run ("C:\Program Files\Windows Media Player\wmplayer.exe " & """" & $avi & """")

thanks for the help :o

"I wish I could say something that was classy and inspirational, but that just wouldn't be our style. Pain heals. Chicks dig scars. Glory lasts forever." - Shane Falco, The Replacements

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