Hello,
I am building a Dialog with buttons to log me in to a VPN. I have the VPN Macro created called "Login to VPN". This is working correctly. I have a Dialog with a button like so:
object btnVPNRCx: tMSButton
Left = 56
Top = 62
Width = 153
Height = 35
Caption = 'RCx Rules'
TabOrder = 0
DoBrowse = False
BrowseStyle = fbOpen
end
AddDialogHandler>RCxMenu,btnVPNRCx,OnClick,DoVPNRCx
SRT>DoVPNRCx
MessageModal>This is doing the VPN
END>DoVPNRCx
How do I call my Macro or should I create an .exe and call the .exe? If so, what is the syntax for that?
Thank you,
Jim
Best Way to Run a Macro from a Dialog?
Moderators: Dorian (MJT support), JRL
Re: Best Way to Run a Macro from a Dialog?
Some will say to use the macro or the include functions or even to place the script in a subroutine within your dialog script. My choice would be to run the script using the RunProgram function.
Code: Select all
SRT>DoVPNRCx
//So the script doesn't stop and wait for Login to VPN to finish.
Let>RP_Wait=0
//So that you can see windows open
Let>RP_Windowmode=1
RunProgram>Path\Login to VPN.scp
// OR
//RunProgram>Path\Login to VPN.exe
END>DoVPNRCx