03-08-2020, 07:15 PM
QM2 can't do it very easily.
To convert simple strings to virtual-key codes, can be used function QmKeyCodeToVK. Then function SendInput.
Or use C# SendKeys. But its keys syntax is different. Reference.
Function CSharpSendKeys
To convert simple strings to virtual-key codes, can be used function QmKeyCodeToVK. Then function SendInput.
Or use C# SendKeys. But its keys syntax is different. Reference.
Function CSharpSendKeys
;/
function $keys
;Sends keys specified in string.
;Calls .NET function SendKeys.SendWait.
;Syntax reference: <google>C# SendKeys.Send</google>.
;EXAMPLE
;CSharpSendKeys "^a" ;;Ctrl+A
opt noerrorshere 1
CsScript x.AddCode("")
x.Call("Class1.Key" keys)
#ret
//C# code
using System;
using System.Windows.Forms;
public class Class1
{
public static void Key(string keys)
{
,SendKeys.SendWait(keys);
}
}