Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83

    Huh? Who can help me modifying this code?

    Hi all:
    I use Windows Media Player to open 128k.wma file. I put it on AutoPlay\\Audio\\12\\wma folder, but after publishing, open the wma file that it can't open specify file. I think it path incorrect. Where can I put? Who can help me? Thanks.

    File.Run("AutoPlay\\Docs\\wmplayer.exe", "128k.wma", "AutoPlay\\Audio\\12\\wma", SW_SHOWNORMAL, false);
    Pierre

  2. #2
    Join Date
    Feb 2004
    Location
    Washington DC Area
    Posts
    73
    Try it like this.
    (Don't have AMS around right now to check this but I think it's right.)

    Code:
    File.Run("AutoPlay\\Docs\\wmplayer.exe", "AutoPlay\\Audio\\12\\wma\\128k.wma", "", SW_SHOWNORMAL, false);


    Quote Originally Posted by pierre
    Hi all:
    I use Windows Media Player to open 128k.wma file. I put it on AutoPlay\\Audio\\12\\wma folder, but after publishing, open the wma file that it can't open specify file. I think it path incorrect. Where can I put? Who can help me? Thanks.

    File.Run("AutoPlay\\Docs\\wmplayer.exe", "128k.wma", "AutoPlay\\Audio\\12\\wma", SW_SHOWNORMAL, false);

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Unless you are searching for wmplayer.exe and getting the full path, I'd use File.Open instead of File.Run.

    When using File.Open, it will use the application that is associated with.


    Quote Originally Posted by pierre
    Hi all:
    I use Windows Media Player to open 128k.wma file. I put it on AutoPlay\\Audio\\12\\wma folder, but after publishing, open the wma file that it can't open specify file. I think it path incorrect. Where can I put? Who can help me? Thanks.

    File.Run("AutoPlay\\Docs\\wmplayer.exe", "128k.wma", "AutoPlay\\Audio\\12\\wma", SW_SHOWNORMAL, false);

  4. #4
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83
    Hi Worm:
    I wish I use Windows Media Player to open the file only.

    For pjhiggins:
    I had tried your method, but I can't reach my request. It can't open the file by Windows Media Player. Can you tell me why?
    Pierre

  5. #5
    Join Date
    Feb 2004
    Location
    Washington DC Area
    Posts
    73
    wmplayer.exe isn't in the AutoPlay folder structure. You'll have to use the correct path to it. On my PC that is C:\Program Files\Windows Media Player\wmplayer.exe.

    Try something like this...

    Code:
    Song = _SourceFolder.."\\AutoPlay\\Audio\\test.wma";
    File.Run("C:\\Program Files\\Windows Media Player\\wmplayer.exe", "/play /close "..Song, "", SW_SHOWNORMAL, false);
    I ran into a problem where the path was getting stuck at the space in Documents and Settings. It works great if the .wma file is moved to someplace simple like C:\.

    Unfortunately, my latest project went live beta today so I am really busy and can't spend the time to figure out the path issue. I bet one of the others here can figure it out pretty quick though.

    Also, here's a link to Media Player command lines...
    http://support.microsoft.com/default...22&Product=wmp

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    my latest project went live beta today
    Yay PJ, whoop, whoop, whoop!

    Corey Milner
    Creative Director, Indigo Rose Software

  7. #7
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83
    Hi pjhiggins:
    I still can't try successed. If I put the test.wma into \\AutoPlay\\Auto or C:\\ , both can't open by Windows Media Player. Can you tell me detail reason? Thanks.


    Song = _SourceFolder.."\\AutoPlay\\Audio\\test.wma";
    File.Run("C:\\Program Files\\Windows Media Player\\wmplayer.exe", "/play /close "..Song, "", SW_SHOWNORMAL, false);
    Pierre

  8. #8
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83
    Hi all:
    Who can explain below codes meaning? Sorry, I am a novice program designer.

    Song = _SourceFolder.."\\AutoPlay\\Audio\\test.wma";

    File.Run("C:\\Program Files\\Windows Media Player\\wmplayer.exe", "/play /close "..Song, "", SW_SHOWNORMAL, false);

    Q1: What meaning upon codes?
    Q2: \\AutoPlay\\Audio\\test.wma....Where is it path?
    Q3: ..Song ---->What mean is it?

    Thank you for advance.
    Pierre

  9. #9
    Join Date
    Feb 2004
    Location
    Washington DC Area
    Posts
    73
    Ok, here's a fully working version. It may not be the best way to do it but it does it just the same

    Code:
    Quotes = '"'
    Song = Quotes.._SourceFolder.."\\AutoPlay\\Audio\\12\\wma\\128k.wma"..Quotes
    File.Run("C:\\Program Files\\Windows Media Player\\wmplayer.exe", "/play /close "..Song, "", SW_SHOWNORMAL, false);
    Quotes supplies a regular quote ( " ). This is needed to wrap the filename path so that the long filename paths work.

    Song is the path, including the quotes variable, to the .wma file you want to play.

    Attached is a sample project with the above, all working nicely.
    Attached Files

  10. #10
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83
    Hi pjhiggins:
    You are terrific. I had tried your methods that it can reach my demand. Thank you very much.
    Pierre

Similar Threads

  1. The ? char code is not working
    By Marker0077 in forum Setup Factory 6.0
    Replies: 7
    Last Post: 06-21-2003, 04:04 PM
  2. A way to "fire" key strokes such as "ALT-F" from pre-scripted AMS code?
    By Protocol in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 03-17-2003, 09:18 PM
  3. ability to list code
    By intel352 in forum Setup Factory 6.0
    Replies: 7
    Last Post: 02-24-2003, 12:42 PM
  4. Software Unlock code autogeneration
    By kaylward in forum AutoPlay Media Studio 4.0
    Replies: 11
    Last Post: 02-07-2003, 12:34 PM

Posting Permissions

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