Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute the Uiscripter source code from QM2
#1
Hi,

How to Execute the Uiscripter source code from QM2? 

Using the following code, an error is prompted
error CS0009: Metadata file 'c:\Users\Administrator\Desktop\Dll\AuCpp.dll' could not be opened -- 'An attempt was made to load a program that is not in the correct format.

Thanks in advance for any advice and help
david

Macro Macro2
Code:
Copy      Help
CsScript x
x.SetOptions("references=C:\Users\Administrator\Desktop\Dll\Au.dll") ;;Au.dll
x.SetOptions("references=C:\Users\Administrator\Desktop\Dll\AuCpp.dll") ;;AuCpp.dll

x.AddCode("")

;call static function
x.Call("Class1.TestFunction")



#ret
//C# code
using System;
using Au;
using Au.Types;

public class Class1
{
public static void TestFunction()
{
run.it(folders.System + "calc.exe");
}
}
#2
It is not possible.
Au.dll uses .NET 6.
Quick Macros C# uses .NET 4.x.

Au.dll cannot be used in QM directly.
But a QM macro can execute scripts in the new program using command line.


Forum Jump:


Users browsing this thread: 1 Guest(s)