Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a macro associated with the 'OnOpen' document event but I don't want to run the code when in batch mode (that is running using the '/R' switch).
How can I detect it so that I can warap an 'if' statement around the code in the macro?
Thanks!
Gordon
Hi,
You can modify a variable value with the batch script line.
I think it's like this :
Qv.exe /vVariableName=1 /r QvApp.qvw
Hi Martin,
Thanks for your reply - that will certainly work. I wondered if it were possible to detect the use of the /r switch directly instead though.
Regards,
Gordon
Actually, the problem with passing a variable with /v as well as using the /r switch is that the variable gets set to the passed value and the document saved with it, so you have to reset the value too.
Regards,
Gordon
Adding to Gordon's point:
Add as the last line in your loadscript a Set statement that changes your batch variable to zero (or whatever you're using for a non-batch value).