Daz Studio Script to Open Video Files and Image Files (Resolved)

jjoynerjjoyner Posts: 617

Two weeks ago, I found the Writing a little script to open a PDF file? thread in the Daz Script Developer Discussion forum (https://www.daz3d.com/forums/discussion/232111/writing-a-little-script-to-open-a-pdf-file#latest) that I thought would help me to solve a problem.  Recently, I’ve encountered a couple of product that have script files to open a video file or an image file.  In one product, the scripts are supposed to open video files (WMV format).  In another product, the scripts are supposed to tip image files (PNG format).  The problem is that the product's scripts don’t work.  The Writing a little script to open a PDF file? thread pointed me to a script that I hoped would solve the problem, but it didn’t.  The script in the video files product and the alternative, recommended script will open text files (TXT), Word files (DOCX), Adobe files (PDF), web files (HTML), audio files (MP3) and more.  Neither of them opens video files (WMV, MP4 or MOV) or image files (JPG or PNG), though.  The scripts in the second product is supposed to open PNG files but actually contains no actions – just one comment line identifying the vendor.

Does anyone know of a Daz Studio script that will open video files and image files?  Thanks in advance.

Post edited by jjoyner on

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,899

    Does double-clicking those files in a browser window open them? The scripts just tell the OS to open the file. which should produce the same result as double-clicking them.

  • NorthOf45NorthOf45 Posts: 5,488

    Try a different application? The display_document_dynamic works for me on all those types, but with different default apps.

  • jjoynerjjoyner Posts: 617
    edited July 2022

    Richard Haseltine said:

    Does double-clicking those files in a browser window open them? The scripts just tell the OS to open the file. which should produce the same result as double-clicking them.

     Yes, I tried this last week.  Double-clicking directly on the files opens them in their associated applications.  This information and more is in my posts in the thread referenced above (https://www.daz3d.com/forums/discussion/232111/writing-a-little-script-to-open-a-pdf-file#latest).

    Post edited by jjoyner on
  • jjoynerjjoyner Posts: 617
    edited July 2022

    I tried using the display_document_dynamic script again but still no success with video or image files.  Attached is the display_document_dynamic script in two flavors.  The script to open a pdf file works.  The only change in the script to open the png file  is changing the file format type in the last line.  The script to open the png file does not work.

     

    display_document_dynamic scripts.jpg
    725 x 118 - 36K
    dsa
    dsa
    Desired launch pdf.dsa
    3K
    pdf
    pdf
    Desired launch pdf.pdf
    333K
    dsa
    dsa
    Desired launch png.dsa
    3K
    Desired launch png.png
    256 x 256 - 33K
    Post edited by jjoyner on
  • NorthOf45NorthOf45 Posts: 5,488

     Tried the .png file and it worked okay, after changing the path to my copy of the file.

    You never did say if there is an error message when running the script, or if it just does nothing.

    Anything interesting in the Windows Event Viewer? 

  • jjoynerjjoyner Posts: 617
    edited July 2022

    NorthOf45 said:

     Tried the .png file and it worked okay, after changing the path to my copy of the file.

    You never did say if there is an error message when running the script, or if it just does nothing.

    Anything interesting in the Windows Event Viewer? 

    No error messages when running the png script.  I get a small, spinning, circle at my cursor for a few seconds and then it stops with no results.  The same thing happens if I modify the script to open a video file or an image file.  You mentioned earlier that you had successfully used the display_document_dynamic script to open video and image files.  Would you mind saring one that I could try?  If so, you can PM me if you do not want to share the script via this thread.

    I'n not familiar with the Event Viewer but will research it to see if it can help to shed any light on this issue.

    Thanks.

    Post edited by Richard Haseltine on
  • NorthOf45NorthOf45 Posts: 5,488

    There's no magic. I have always used it to point to any non-DAZ Studio file type (video, image, pdf, etc., in a mapped folder) by changing the last line in the script (and nothing else) to the library path and filename. The target must be in a DAZ Studio mapped folder (i.e., library) otherwise it will throw an error. Since yours is not throwing an exception, the problem must lie outside Studio, the Event Viewer might catch the error. It sees everything...

  • jjoynerjjoyner Posts: 617

    I opened the Windows Event Viewer and it was a rabbit hole that I did not want to jump into - much like the Registry Editor.  There are so many options/choices and explanatory language that is undecipherable to anyone who doesn't work at Microsoft.   :(

  • jjoynerjjoyner Posts: 617

    While doing some other file maintenance in Daz Studio's General subdirectory, I stumbled upon what appears to be the resolution of this issue.  I double-clicked one of the tutorial products icons in Daz Studio to open one of the tutorial video files (WMV format) that would not open via the dsa file and which caused me to make my initial post, but today the video file opened - in the Windows Movies & TV app and not Windows Media Player.

    I went to Windows Settings and saw that the default app for WMV files was set to Movies & TV instead of Windows Media Player and I had not made that change.  I explored by changing the default app for WMV files to Media Player (different from and newer than Windows Media Player although both come from Microsoft) and then to Real Player and the dsa file opens the video in each player.

    My guess is that Microsoft changed something under the mysterious hood of Windows 10 that prevents the dsa file from opening the video in the older Windows Media Play but not the newer Media Player.  I can still manually open a WMV file in Windows Media Play by right-clicking on it, selecting Open with, and choosing Window Media Player.

  • NorthOf45NorthOf45 Posts: 5,488

    Too many Media Players from Microsoft. I believe they are trying to phase out the old Windows Media Player (like they did with Internet Explorer) and replace it with Media Player for local libraries, while Films & TV adds streaming content to the mix. Not to mention three or four third-party media players; it can get confusing.

Sign In or Register to comment.