CPP Tutorial
(Copy URL in PhpBB Forum Format - Info)From iMacros
Here's how to use the Scripting Interface with Visual C++ 2008.
Contents |
Create Project
Add a reference to iMacros Scripting Interface
- Open the Project Property Pages
- Choose Framework and References. Click the button Add New Reference...
- In the Add Reference window, click on the COM tab and scroll down until you find iMacros Scripting Interface.
- Click the OK button. And OK again to leave the Property Pages window.
Input some code
using namespace System;
int main(array<System::String ^> ^args)
{
int timeout = 60;
iMacros::AppClass^ app = gcnew iMacros::AppClass();
Console::WriteLine("Hello iMacros world!");
Console::Write("iMacros version ");
Console::WriteLine(Convert::ToString(app->iimGetInterfaceVersion()));
app->iimInit("",true,"","","",timeout);
app->iimDisplay("C++ test",timeout);
app->iimPlay("CODE:URL GOTO=http://www.iopus.com",timeout);
app->iimPlay("CODE:WAIT SECONDS=5",timeout);
app->iimExit(timeout);
return 0;
}
Done
- Notice that the intellisense for iMacros class and methods is now activated.
- Now you can build and run the program as usual.
