
In the 'AppWizard' dialog click 'Finish'.
Open the properties dialog of your project. ('Project' | 'Properties')
Set the property 'Additional Include Directories' within the 'C/C++' | 'General' tab to the installation path of Ranorex ('include' folder)
#include "RanorexCore.h" printf("-------------------------------------\n"); printf(" Starting application calc.exe... \n"); printf("-------------------------------------\n"); // Starting testapplication int ret = RxApplicationStart(TESTED_APPLICATION); if ( ret != 0 ) { printf(" ERROR: Cannot start application calc.exe\n"); exit(1); } // Finding form by class name and activate it (timeout=3000 msec) HWND form = RxFormFindClassName(TESTED_APPLICATION_CLASS, 1, TRUE, 3000); if ( form == 0 ) { printf(" ERROR: Application not found\n"); exit(2); } // Searching and clicking button 2 printf(" Searching and testing button 2\n"); HWND button2 = RxFormFindChildText(form, "2", MATCH_EXACT); if ( button2 == 0 ) { printf(" ERROR: button2 not found\n"); exit(3); } if ( RxMouseClickControl(button2) != 0 ) { printf(" ERROR: button2 click error\n"); exit(4); } // Searching and clicking button 8 printf(" Searching and testing button 8\n"); HWND button8 = RxFormFindChildText(form, "8", MATCH_EXACT); if ( button8 == 0 ) { printf(" ERROR: button8 not found\n"); exit(5); } if ( RxMouseClickControl(button8) != 0 ) { printf(" ERROR: button8 click error\n"); exit(6); } printf(" Closing application\n"); RxSleep(3000); RxFormClose(form); return 0;
Announcements