View Single Post
  #4 (permalink)  
Old 03-25-2008, 09:46 AM
goddet goddet is offline
Junior Member
 
Join Date: Feb 2008
Posts: 3
Default

Is there somebody who use Macro Sdk with c# language?

I tested the macro which was created by my source code in the VB sample gives with the macro sdk (add macro to any sofware) .
And this wksb file works fine!

In my code, the result of the RunMacro function indicate that there is a failure but I don't know where is the problem!

You can find here a piece of my code :
Code:
if (SDKObj.IsRecordingOn() == 1)
      throw new Exception("Macro is Recording");
if (SDKObj.IsRunOn() == 1)
      throw new Exception("Macro is running!");

int i = SDKObj.RunMacro(MacroPath, null, 0, @"MacroFolder\MacroErrorLog.txt");

//If there is a failure in RunMacro
if(i==1)
{
      SDKObj.GetLastError(ref codErr, ref msgErr);
      Console.WriteLine("Error during macro execution: \nErr0r n°" + codErr + "\t" + msgErr);
}
Reply With Quote