Thank you very much, the code test runs successfully.
I searched for some information about python using ahk. (Please see the attached picture)
https://autohotkey.com/board/topic/49656...th-python/
https://autohotkey.com/board/topic/39588-autohotkeydll/
VC code:
#include <windows.h>
#include <stdio.h>
}
can I get the return value of the AHK code in the QM code? How to use dll in function Ahkexec? Is it easier to use dll? Can you provide an example? thank you very much
dll download:
https://codeload.github.com/HotKeyIt/ahk...zip/master
I searched for some information about python using ahk. (Please see the attached picture)
https://autohotkey.com/board/topic/49656...th-python/
https://autohotkey.com/board/topic/39588-autohotkeydll/
VC code:
#include <windows.h>
#include <stdio.h>
typedef int (*ahkdll)(wchar_t *, wchar_t *, wchar_t *) ;
typedef int (*ahkReady)();
typedef int (*ahkReady)();
int main()
{
// Load DLL file
HINSTANCE hinstLib = LoadLibrary("AutoHotkey.dll");
if (hinstLib == NULL)
{
printf("ERROR: unable to load DLL/n");
return 1;
}
// Get function pointer
ahkdll ahkdll_ = (ahkdll)GetProcAddress(hinstLib, "ahkdll");
ahkReady ahkReady_ = (ahkReady)GetProcAddress(hinstLib, "ahkReady");
if (ahkdll_ == NULL || ahkReady_ == NULL)
{
printf("ERROR: unable to find DLL function/n");
FreeLibrary(hinstLib);
return 1;
}
// Call function.
ahkdll_(L"D://MyScript.ahk", L"", L"");
// Wait for script to finish
while (ahkReady_())
Sleep(50);
// Unload DLL file
FreeLibrary(hinstLib);
return 0;{
// Load DLL file
HINSTANCE hinstLib = LoadLibrary("AutoHotkey.dll");
if (hinstLib == NULL)
{
printf("ERROR: unable to load DLL/n");
return 1;
}
// Get function pointer
ahkdll ahkdll_ = (ahkdll)GetProcAddress(hinstLib, "ahkdll");
ahkReady ahkReady_ = (ahkReady)GetProcAddress(hinstLib, "ahkReady");
if (ahkdll_ == NULL || ahkReady_ == NULL)
{
printf("ERROR: unable to find DLL function/n");
FreeLibrary(hinstLib);
return 1;
}
// Call function.
ahkdll_(L"D://MyScript.ahk", L"", L"");
// Wait for script to finish
while (ahkReady_())
Sleep(50);
// Unload DLL file
FreeLibrary(hinstLib);
}
can I get the return value of the AHK code in the QM code? How to use dll in function Ahkexec? Is it easier to use dll? Can you provide an example? thank you very much
dll download:
https://codeload.github.com/HotKeyIt/ahk...zip/master