What would be the best way to pass parameters into a macro execution call from the Batch Mode command /runmacro?
What would be the best way to pass parameters into a macro execution call from the Batch Mode command /runmacro?
Just add the parameters you need to the SDL Passolo command line call and use the Windows API to retrieve and analyze the command line when the macro starts.
Private Declare Function GetCommandLine Lib "kernel32.dll" Alias "GetCommandLineA" () As String
Sub Main
Dim cmdLine As String
cmdLine = GetCommandLine()
MsgBox cmdLine
End Sub
Hello Achim,
Thank you for the reply. I have tried it and get an exception:
-----------------------------------
Problem signature:
Problem Event Name: APPCRASH
Application Name: psl.exe
Application Version: 16.0.309.0
Application Timestamp: 583c01c5
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.23569
Fault Module Timestamp: 57f7bc1f
Exception Code: c0000005
Exception Offset: 00030ac4
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Read our privacy statement online:
go.microsoft.com/.../
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
-----------------------------------
I have tried even to execute it as administrator to exclude possible access right violation, but the result is the same.
Hello Achim,
Thank you for the reply. I have tried it and get an exception:
-----------------------------------
Problem signature:
Problem Event Name: APPCRASH
Application Name: psl.exe
Application Version: 16.0.309.0
Application Timestamp: 583c01c5
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.23569
Fault Module Timestamp: 57f7bc1f
Exception Code: c0000005
Exception Offset: 00030ac4
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Read our privacy statement online:
go.microsoft.com/.../
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
-----------------------------------
I have tried even to execute it as administrator to exclude possible access right violation, but the result is the same.