Intelligent Automation & Macro Software  

Go Back   Tethys Solutions Forums > Products Zone > Workspace Macro
Register FAQ Search Today's Posts Mark Forums Read

Workspace Macro Post messages and questions related to Macro Recorder or Windows Macro here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2007, 01:07 PM
peter_122 peter_122 is offline
Junior Member
 
Join Date: Mar 2007
Posts: 6
Default Calling a macro from C++

Hi, I would like to call my WS macro from my C++ code. Could you tell how to do it? Thanks.
Reply With Quote
  #2 (permalink)  
Old 05-10-2007, 12:18 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 474
Default

You can use the following code snippet to call a macro from C++ code.

Use ShellExecute API to launch Automation Anywhere.

To use this API <windows.h> has to be included.

ShellExecute(AppHandle,"open",(LPCTSTR)WMExePath,( LPCTSTR)pstrMessage,NULL,1);

AppHandle : This is the Handle of the calling Application window.

“open” : It is a Keyword which is used to open the EXE

WMExePath : The Path where Workspace Macro Exists.

Eg. WMExePath = “C:\Program Files\Workspace Macro 4.6\Workspace Macro.exe”

pstrMessage : The command line parameter to be passed with the Exe.

Eg. pstrMessage = “C:\\Document and Settings\\User\\My Documents\\Workspace Macro\\My Macros\\mymacro.wksp \\u”

Hope that helps.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 09:10 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved