Development with SDK

From Screen Scraper Studio
Jump to: navigation, search

The recommended way to create an app that uses screen scraping and UI automation API depends of your programming language and development environment.

Contents

Javascript development

Prerequisites: On your development computer you need to have installed ScreenScraper Studio STANDALONE or DEVELOPER edition.

Use code generation wizards to generate fully functional javascript code that takes care of most common scraping and ui automation scenarios.

.Net development

Prerequisites: On your development computer you need to have installed DEVELOPER edition.

Using NuGet package manager

The simplest method of using API comes by NuGet Package Manager extension. This is available starting with VS 2010. We highly recommend to install and use it if you didn't already. You will find it very useful for installing a huge range of development components.

Our Screen Scraper package is listed here.

Open one of our sample in VS, right click References and choose Manage NuGet references, click Online tab, search for 'UiPath', clic Install and you're good to go. Use [[Wizards|code generation wizards] to generate source code for your own scenarios.

Without NuGet

Open one of our sample in VS You have to manually reference the UiPathInterop.dll .Net assembly to get access to the API from managed code. Just use UiFactory class to instantiate objects. When you deploy on another computer use Studio to copy all redistributable files to a folder of your choice. Read more about deployment here.

VB6, Delphi or other COM aware language

Prerequisites: On your development computer you need to have installed DEVELOPER edition.

API is conveniently exposed as a COM library. Start opening a sample in your IDE and then make sure you have referenced UiPathLib. Use Studio to generate the VB6 code tailored to your scenario.

Deployment: We managed to avoid all the trauma attached to registering the COM interfaces by making our COM library fully reg free COM compatible. Read more about using API as reg free COM but of course you can continue to register the COM object instead.

Learn how to deploy such an app here.

C++

Prerequisites: On your development computer you need to have installed DEVELOPER edition.

Use reg free COM

See the instructions from VB6.

Use COM interfaces natively

This method do not require COM registration or adding the reg free COM manifest. It works as you would use a native C++ class created dynamically.

Use the CreateCOMObject function exposed by uipath.dll in order to get pointers to the COM interfaces. Here are the necessary steps:

  • Import the interface types in your application using the #import directive:
       #import "uipath.dll"   named_guids

Optionally, you can add:

       using namespace UiPathLib;

to avoid writing "uiPathLib::" every time you use a type name from our interfaces.

  • Load the corresponding COM DLL library and call the CreateCOMObject function:
//This is the CreateCOMObject prototype
typedef HRESULT (__stdcall *CreateCOMObjectPROC)(REFCLSID clsid, REFIID iid, LPVOID* out_obj);
 
//Proceed with loading the desired library
HMODULE mod = LoadLibrary("uipath.dll");
CreateCOMObjectPROC _CreateCOMObject = (CreateCOMObjectPROC)GetProcAddress(mod, "CreateCOMObject");
CComPtr<IUiNode>    uiNode;
 
//Call CreateCOMObject. Notice the clsid and iid parameters.
HRESULT res = _CreateCOMObject(CLSID_TextCaptureX, IID_IUiNode, (LPVOID*)&uiNode);

The code above is a sample, you can adapt it to your needs. Other types can be obtained from the TLH files that are generated by the compiler after the first #import at compilation time. The TLH files can be found in the Intermediate Directory of the Visual Studio project.

Java

Prerequisites: On your development computer you need to have installed ScreenScraper Studio STANDALONE or DEVELOPER edition. You can use API by calling the COM interfaces thru Jacob bridge between java and COM.

Developement with unlimited version

Unlimited version has the code that check activation removed so naturally there are different binaries from the stock one. You receive these binaries after you purchase the unlimited redistributable license.

You do not need this binaries during development but certainly you want to deploy them. We recommend that you have Studio installed and activated on a development machine and at deployment time you copy the unlimited redistributable files.

Share your opinion


blog comments powered by Disqus
Personal tools
Namespaces
Variants
Actions
Getting started
API documentation
Support
Toolbox