Autor Beitrag
gizmo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 61

Win 7 64Bit
RAD Studio/Delphi 2007
BeitragVerfasst: Sa 05.10.13 11:52 
Hallo,

ich kann das laufende Programm Adobe After Effects zwingen ein Script auszuführen, wenn ich folgende Zeile im Ausführen Dialog von Windows eingebe:

afterfx.exe -r c:\myFolder\myScript.jsx

Wie kann ich diesen Befehl aus meiner Delphi Anwendung heraus abfeuern?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 05.10.13 12:04 
ShellExecute oder CreateProcess kannst du dafür benutzen.
gizmo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 61

Win 7 64Bit
RAD Studio/Delphi 2007
BeitragVerfasst: Sa 05.10.13 12:27 
Shellexecute(handle,'open',PChar('afterfx.exe -r c:\myFolder\myScript.jsx'),nil,nil,SW_SHOW);

funktioniert nicht.

Wenn ich "afterfx.exe -r" weg lasse wird Photoshop geöffnet, was ich an anderen Tagen auch richtig finde.

Ich vermute mal, dass ich da einiges ändern muss. Leider kenne ich mich nur mit den Sachen aus, die ich in der Delphi Hilfe nachlesen kann. Shell gehört nicht dazu.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 05.10.13 12:38 
Schau dir doch bitte einmal in der Dokumentation an was die Parameter für ShellExecute machen, insbesondere wo die Parameter für das zu startende Programm hin kommen...
msdn.microsoft.com/e...762153(v=vs.85).aspx
ausblenden Delphi-Quelltext
1:
ShellExecute(Handle, 'open''afterfx.exe''-r c:\myFolder\myScript.jsx'nil, SW_SHOW);					
gizmo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 61

Win 7 64Bit
RAD Studio/Delphi 2007
BeitragVerfasst: Sa 05.10.13 13:02 
Das war sehr Hilfreich. Vielen Dank!

Den Parameter nShowCmd verstehe ich jedoch nicht. Ich habe fast alle Varianten ausprobiert (SW_MAXIMIZE, SW_NORNAL ...) und es ändert sich nix.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 05.10.13 13:39 
Der Parameter tut nur etwas, wenn die Anwendung das unterstützt.
gizmo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 61

Win 7 64Bit
RAD Studio/Delphi 2007
BeitragVerfasst: Sa 05.10.13 13:42 
OK, Danke für die schnelle Hilfe.

Schönes Wochenende

gizmo