Hi it´s me again ;)
Does this library work with AutoHotkey_L?
I just cant get it to work (version 1.0.95.00).
In this simple example I always receicve ErrorLevel -4 when using " GPF_SetSingleLine()" and "GPF_ShowSingleLine()":
Code:
#Include GPF_v1.1c.ahk
return
F12::
GPF_Main( )
GPF_SetSingleLine(0,100,100,"Test",0xFF000000,0,20,0,0)
GPF_ShowSingleLine(0,1)
Return
I also tested your example 1 with the same result: EL "-4" (The specified function could not be found inside the DLL.)
EDIT:
Ok, I got it. Seems that you have to change the argument type from "Str" to "AStr" in some DLL Calls.
E.g. for multi line:
Code:
GPF_SetMultiLine(ObjNum,PosX,PosY,Text,ARGB,UseBlackBG,FontSize,UseBold,SizeX,SizeY,FontFamily)
{
static proc_GPML_SetTextMultilineData
If ( proc_GPML_SetTextMultilineData = "" )
proc_GPML_SetTextMultilineData := DllCall("GetProcAddress", uint, DllCall("GetModuleHandle", str, "gpcomms"), Astr, "GPML_SetTextMultilineData")
DllCall(proc_GPML_SetTextMultilineData, UChar, ObjNum, "UShort", PosX, "UShort", PosY, "Astr", GPF_AuxGetFilledStr(Text,True), "UInt", ARGB, "Int", UseBlackBG, "UChar", FontSize, "Int", UseBold, "UChar", SizeX, "UChar", SizeY, "UChar", FontFamily)
return ErrorLevel
}
GPF_ShowMultiLine(ObjNum,ShowText)
{
static proc_GPML_ShowText
If ( proc_GPML_ShowText = "" )
proc_GPML_ShowText := DllCall("GetProcAddress", uint, DllCall("GetModuleHandle", str, "gpcomms"), Astr, "GPML_ShowText")
DllCall(proc_GPML_ShowText, UChar, ObjNum, "Int", ShowText)
return ErrorLevel
}
That works for me!