App.showURL / "display_document_dynamic" not working "for everybody"?

V3DigitimesV3Digitimes Posts: 3,051

Hello,

With reference to Rob's script initiated here : http://www.daz3d.com/forums/discussion/30942/solved-help-with-app-showurl-for-opening-local-files

and finalised and shared here : http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/general_ui/display_document_dynamic/start

I included in my latest product to come a .dsa script file using this script to open directly a pdf file from the interface - the content library tab. This is the user manual for this product, located in the "ReadMe's" of the product so that the main script can be moved without losing the path to the pdf.

It worked perfectly on my computer, as well as on the computers of 4 of the testers, who are using MAC and PC.

When we double click  the dsa file via the content library tab, the pdf opens as expected, when the script is not moved, and when the script is moved elsewhere, well everything works like a charm anyway!

But suddenly, I have a fifth tester for who the exact same code in the exact same product does not work. Nothing opens. I know he has a pdf reader compatible with my pdf file since he can open my pdf using the file explorer, by double clicking on the pdf file directly.

This is why I came back here to see if anybody had already heard about that, or had an idea what could happen. I was wondering if it could come from the way his computer is set up or from the script? Thank you for any feedback comment or idea on the subject, because for now, I'm out of idea for the origin of the issue.

 

 

Post edited by V3Digitimes on

Comments

  • djigneodjigneo Posts: 283

    The first thing I would do is print out the exact string that's being fed into the App.ShowURL() and have the user attempt using a Windows > Run command using that exact text. It may clue you in to some error you're not seeing.

    The second thing would be to have the user run the Script from the Script IDE so any error messages will be more apparent.

    I'm not sure what your script looks like, but I would make sure some is there code to verify the file was found before calling the ShowURL command, and if not, print out an error message. I'm happy to take a peek at your script if you're willing to show it.

  • rbtwhizrbtwhiz Posts: 2,181

    It sounds as if the "fifth tester" doesn't have the requisite application/file extension associations established, or has some security/anti-virus setting that is blocking the URL from being processed normally. The Display Document sample basically just constructs a URL to a local file and passes that off to the OS to do whatever it is configured to do.

    -Rob

  • V3DigitimesV3Digitimes Posts: 3,051
    edited August 2015

    Understood, so there are potential reasons for which it can happen. Indeed djigneo there is a part of the code checking the file is well at the place it is supposed to be, and displaying a message box information if it is not, (which I have tested by renaming the file and works perfectly fine). 

    I would bet for a security/antivirus issue since he could open it by double clicking it from the windows explorer, so the file extension was probably established. I hope it won't happen to too many people.

    Thank you both for sharing your feedback on the subject!

    Post edited by V3Digitimes on
  • djigneodjigneo Posts: 283

    I wonder if opening DAZ Studio as an admin would make any difference.

Sign In or Register to comment.