How to start a .dsa script right after Daz is opened?

Hey Guys,

I want to automate Daz Studio so it can start running a script right after it's opened (Daz can even be opened using another script too!).

How can I do that?

 

Comments

  • Edit>Preferences (Daz Studio>Preferences on a Mac), in thr Startup tab check Load file and then use the button to select Browse... and pick the file you wish to run/load

  • Are you saying you want to do the following?

    1. Have a script launch DAZ Studio.

    2. Then have Daz Studio load a script (all by itself), just after it has finished starting up?

  • You can also use the command line (or a short cut and edit its settings) - quotes are used to handle paths with spaces correctly, otherwise it will see the space as separating two pieces of data:

    "path/to/DAZStudio.exe" "path/to/script.dsa"

  • Richard Haseltine said:

    You can also use the command line (or a short cut and edit its settings) - quotes are used to handle paths with spaces correctly, otherwise it will see the space as separating two pieces of data:

    "path/to/DAZStudio.exe" "path/to/script.dsa"

     

    That is even better!

    Thanks!

  • algovincianalgovincian Posts: 2,575

    Richard Haseltine said:

    You can also use the command line (or a short cut and edit its settings) - quotes are used to handle paths with spaces correctly, otherwise it will see the space as separating two pieces of data:

    "path/to/DAZStudio.exe" "path/to/script.dsa"

    Is there anyway to use the command line in a similar fashion to run a script in an already running version of DS?

    - Greg

     

  • algovincian said:

    Richard Haseltine said:

    You can also use the command line (or a short cut and edit its settings) - quotes are used to handle paths with spaces correctly, otherwise it will see the space as separating two pieces of data:

    "path/to/DAZStudio.exe" "path/to/script.dsa"

    Is there anyway to use the command line in a similar fashion to run a script in an already running version of DS?

    - Greg

    Yes, use the same command line - but make sure you are not declaring an instance name or that you use the same instance name as the running version, if you use a command line with a different instance name or the auto-incrmenting names then you would instead get a second instance of DS running the script.

  • algovincianalgovincian Posts: 2,575
    edited December 2021

    Richard Haseltine said:

    algovincian said:

    Richard Haseltine said:

    You can also use the command line (or a short cut and edit its settings) - quotes are used to handle paths with spaces correctly, otherwise it will see the space as separating two pieces of data:

    "path/to/DAZStudio.exe" "path/to/script.dsa"

    Is there anyway to use the command line in a similar fashion to run a script in an already running version of DS?

    - Greg

    Yes, use the same command line - but make sure you are not declaring an instance name or that you use the same instance name as the running version, if you use a command line with a different instance name or the auto-incrmenting names then you would instead get a second instance of DS running the script.

    Thanks for the info, Richard - worked like a charm. Could have sworn I've tried this in the past with no luck, but whatever . . . I'm happy to see it working now! 

    For anyone interested, the following allows the automation of DS via DAZScript to be extended to a VBScript executed completely independently of DS. The file m:\test.vbs contains the following simple code:

    Dim oShell
    Set oShell = WScript.CreateObject ("WScript.Shell")
    oShell.run "m:\\test.dsa"
    Set oShell = Nothing

    The file m:\test.dsa contins the following:

    print ( "Hello." );

    When executing test.vbs, the already running instance of DS executes the script test.dsa and the hello message is printed to the DS log. This will be incrediby useful when automating several applications in a pipeline (one of which is DS).

    Cheers!

    - Greg

     

     

    Post edited by algovincian on
Sign In or Register to comment.