Profile Picture

How do you pass arguments to a launcher for external svg app?

Posted By shadeline2000 Last Year
You don't have permission to rate!

How do you pass arguments to a launcher for external svg app?

Author
Message
shadeline2000
shadeline2000
Posted Last Year
View Quick Profile
Junior Member

Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 11, Visits: 44
I plan to use aflauncher.exe for affinity photo and affinity designer, but I'm not sure how I add arguments for it to launch either one?
Peter (RL)
Peter (RL)
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)

Group: Administrators
Last Active: Yesterday
Posts: 22.7K, Visits: 35.7K
Unfortunately there are no options to add arguments. You just have to add the path to your Affinity Photo or Designer .exe file in Preferences (CTRL+P). Instructions for this can be found below.

https://manual.reallusion.com/Cartoon-Animator/Content/Resources/5.0/10-Preference/Image-Section.htm
https://manual.reallusion.com/Cartoon-Animator/Content/Resources/5.0/10-Preference/Vector-Section.htm

                                                                

Peter
Forum Administrator

www.reallusion.com


voom
voom
Posted Last Year
View Quick Profile
New Member

New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)New Member (87 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 5, Visits: 28
Affinity V2 apps have no accessible .exe, like the V1 apps did. (They are not installed as desktop apps and calling the .exe files from a different app is blocked by file access permission issues) Serif is aware of the issue, this breaks many workflows with 3rd party apps. 
That is why @shadeline2000 mentions "aflauncher.exe" which is a temporary workaround from the Affinity-Forums. 
What I found to work to get Photo and Designer V2 working with CA5 is to make an .exe out of the .bat - files Affinity is also providing. (CA5 needs an .exe file...) There are ways to create an .exe out of a .bat (Google it...)
These are the BATs: 
----------------
start /b affinitydesigner2.exe %1
exit
----------------
start /b affinityphoto2.exe %1
exit
----------------

Also, to make it work, just like in V1, the setting in Photo and Designer "save over psd" has to be ticked. 


CA5 | Affinity Photo 2 (PSD) | Affinity Designer 2 (SVG) | Davinci Resolve Studio (Video / Audio)
(Photopea to convert EPS to SVG with correct folder hierarchy)
shadeline2000
shadeline2000
Posted Last Year
View Quick Profile
Junior Member

Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 11, Visits: 44
Peter (RL) (1/5/2023)
Unfortunately there are no options to add arguments. You just have to add the path to your Affinity Photo or Designer .exe file in Preferences (CTRL+P). Instructions for this can be found below.

https://manual.reallusion.com/Cartoon-Animator/Content/Resources/5.0/10-Preference/Image-Section.htm
https://manual.reallusion.com/Cartoon-Animator/Content/Resources/5.0/10-Preference/Vector-Section.htm




https://forum.affinity.serif.com/index.php?/topic/167828-accessing-affinity-v2-apps-from-other-apps/

I get the error "The file cannot be accessed by the system" when I put this as my launch: C:\Users\[USERNAME]\AppData\Local\Microsoft\WindowsApps\AffinityPhoto2.exe

It was recommended I use parameters to launch each program from CTA 5... but CTA 5 doesn't have that ability???

https://forum.affinity.serif.com/index.php?/topic/178056-i-am-using-aflaunchexe-for-affinity-photo-2-does-affinity-designer-need-something-like-that-too/#comment-1025651
Edited
Last Year by shadeline2000
wires
wires
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)

Group: Forum Members
Last Active: 2 days ago
Posts: 5.7K, Visits: 26.4K
MSI installers were promised for the Affinity software in December however they didn't function correctly during internal testing and their release has been pushed back until "later". Once these are available there should no longer be issues around launching them from within 3rd Party software. Serif really screwed up with their latest releases, at least for Windows users and are now trying hard to pacify the unhappy masses.

Gerry



System: Win 10 Pro (21H2), Asus X99-E WS, CPU i7-5930K -3,5 GHz, 32 GB DDR4 2666-16 RAM, NVidia GTX 1080 Ti GPU - 11 GB VRAM(Driver Studio-536.99), Samsung 850 Pro 512 GB SSD, 6 TB HD storage.


shadeline2000
shadeline2000
Posted Last Year
View Quick Profile
Junior Member

Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 11, Visits: 44
CTA 5 should allow params to be passed.
Edited
Last Year by shadeline2000
animagic
animagic
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)

Group: Forum Members
Last Active: 40 minutes ago
Posts: 15.7K, Visits: 30.6K
shadeline2000 (1/7/2023)
CTA 5 should allow params to be passed.

It would introduce another point of user failure with endless questions on the forum and to support...Unsure


https://forum.reallusion.com/uploads/images/436b0ffd-1242-44d6-a876-d631.jpg

shadeline2000
shadeline2000
Posted Last Year
View Quick Profile
Junior Member

Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 11, Visits: 44
The code below is what I created so that CTA 5 would launch the aflaunch.exe by Affinity.

Delphi EXAMPLE code to allow CTA 5 to launch programs that require parameters:


program ExecuteApp;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  Windows,
  ShellApi,
  System.SysUtils;

var
  i: Integer;
  cl: string;
  parms: string;
  SI: TStartupInfo;         //requires Windows
  PI: TProcessInformation;  //requires Windows

begin
    {
      Create two separate exe files for each and change parms for each:

      parms := '-a Photo2';
      parms := '-a Designer2';
    }

    cl := 'aflaunch.exe';
    parms := '-a Photo2';

    cl := cl + ' ' + parms;

    for i := 1 to ParamCount do
    begin
      cl := cl + ' "' + ParamStr(i) + '"';
    end;
    Writeln(cl);
    UniqueString(cl);

  // below will launch:
    try
      try
        writeln('begin');
        FillChar(SI, sizeof(SI), 0);
        FillChar(PI, sizeof(PI), 0);
        SI.cb := sizeof(SI);

        if not CreateProcess(nil, PChar(cl), nil, nil, true, 0, nil, nil, SI, PI) then
          RaiseLastOSError;

        WaitForSingleObject(PI.hProcess, INFINITE);

        CloseHandle(PI.hProcess);
        CloseHandle(PI.hThread);

        writeln('end');
      except
        on E: Exception do
          begin
            Writeln(E.ClassName, ': ', E.Message);
            ExitCode := 1;
         end;
      end;
    finally
      Writeln('Complete');
      //Readln;   // uncomment if you want the screen to pause and require you to hit enter to exit
      ExitCode := 0;
    end;
end.

You can download Delphi Community edition and compile this code for free.   Just make sure you create a File > New > Console Applicaton

Edited
Last Year by shadeline2000
shadeline2000
shadeline2000
Posted Last Year
View Quick Profile
Junior Member

Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)Junior Member (146 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 11, Visits: 44
animagic (1/7/2023)
shadeline2000 (1/7/2023)
CTA 5 should allow params to be passed.

It would introduce another point of user failure with endless questions on the forum and to support...Unsure


OR, they should have allowed *.bat files to be able to be launched instead of just exe files!



Reading This Topic