Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Location
    USA
    Posts
    14

    CommandLineArgs to Video Player Help

    I am trying to do something I thought would be simple, not.

    I would like to send AMS7 a command line argument to open a video, like: C:>videoplayer 1video.wmv

    Open a window and play the video from the path sent from command line.

    code:

    address= _CommandLineArgs[1]; -- Is this correct?

    Dialog.Message("Notice", address); -- test

    File.Run("autorun.exe", "Page1|"..address, "", SW_SHOWNORMAL, false); -- open a pop- up player window and play the video in venerable in address.

    This crates a loop opening the program and I must KILL it.

    I am asking for help to just open a video from a command line args like the path and name of the file. Ex "C:\testvideos\1video.wmv" and send that to the video player window. I do not like to use Windows Media Player and need to have my own design with logo on the frame of the player window. I need a custom player that works with the command like, anyone have an idea on how to do this?

  2. #2
    Join Date
    May 2005
    Location
    USA
    Posts
    14
    I found one solution and the code is not to good but it works.
    I am looking for a better way

    Most of the code came from TJ Tigger's old posts. Thanks TJ.

    sName = " ";
    if _CommandLineArgs then --check that the table exists
    for i,v in _CommandLineArgs do -- use a for loop to step through
    if String.Left(v, 3) ~= "SFX" then -- check to see if SFXSOURCE

    sName = v;

    end
    end

    Dialog.Message("The file path", sName); -- show path to me


    Plugin.SetVisible(this, true);
    MediaPlayer.Load("plgMSMediaPlayer", sName); -- load it up
    MovieLoaded = true; -- test for the other code not listed
    Plugin.SetVisible(this, true); -- may not be needed
    --Dialog.Message("After", sName); -- test removed
    MediaPlayer.Stop("plgMSMediaPlayer"); -- loads a wmv only.

    I have a Video window embedded to play the video on a frame window. I can't get the player to play MPG or MOV.

    Anyone know how to load other codac's or have Media Player Classic load in AMS ?

  3. #3
    Join Date
    May 2005
    Location
    USA
    Posts
    14
    Media Player with email.
    This is a simple video player kind of an example for beginners. The code is not grate and if someone with some time could tweak it, I would be happy.

    The player requires the media player plug-in. You should have Media Player Classic installed because the player should open the external player if it can't play it. You also need Outlook 2K3 or you needd to change the code to work with your email program like Outlook Express.

    It is really setup to work with command line, so it can be called from command line as "MP".

    If you test it you need to place the program MP.exe in drive c:\ and call the video you would like to play like this: c:\MP c:\sample\video1.wmv
    and it should open in the player.

    Click the EMAIL VIDEO and it should open Outlook with the video attached. I have a warning to display if the video is over 4 Meg because many ISP's will not send a video over 4 Meg.

    What would be nice to see if if someone can change this to upload to YouTube or web page using FTP if a person places there site and user / password in a send dialog, just an idea.

    Note: I did use an example someone made and changed some thing so it's not pretty to look at.
    Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts