BasicNoUIObjRunThis Method |
Runs macro code.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic bool RunThis(
string code
)
Public Function RunThis (
code As String
) As Boolean
public:
virtual bool RunThis(
String^ code
) sealed
Parameters
- code String
-
Execute this code.
Return Value
Boolean
True if successful.
Implements
IBasicNoUIRunThis(String)
RemarksRunThis executes a single line of code as if it were one line
inside a Sub Main/End Sub block.
To run more than one line of code you must explicitly include
the Sub Main/End Sub block in the code.
The currently executing macro is suspended until this code completes.
Syntax or run-time errors trigger the
ErrorAlert event.
Example
Run one line of script code:
basicIdeCtl1.RunThis("MsgBox \"Hello.\"");
BasicIdeCtl1.RunThis("MsgBox ""Hello.""")
basicIdeCtl1->RunThis(L"MsgBox \"Hello.\"");
See Also