Code Monkey home page Code Monkey logo

ahkdll's Introduction

AutoHotkey_H was invented by tinku99 and enhanced by HotKeyIt based on AutoHotkey (https://github.com/Lexikos/AutoHotkey_L by Lexikos)

AutoHotkey.dll opens the world of AutoHotkey to other programming and scripting languages.
It allows multi-threading by loading a dll multiple times and using its exported functions as well as build-in features like Alias, CriticalObject and other.

You can use AutoHotkey in many other programming languages like C#, C++, VB, .Net, Python and many more by loading the dll or using COM Interface.  For example you can run AutoHotkey scripts from Excel or Word macro as if it was a build-in feature.

Find out more on http://hotkeyit.github.io/v2/

ahkdll's People

Contributors

hotkeyit avatar leemonn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ahkdll's Issues

The encoding errors still occur in Ansi Version

Now Compiling and Running is ok.
But the encoding errors still occur as follow

https://s8.postimg.org/ae109ghlh/encoding_error.jpg


test.exe

? ???? ??? ???? ????.
Hello?
?????

(TODO: ?? ?? ????)

확인

It should be as follows

test.ahk

이 번역기는 완벽한 번역기가 아닙니다.

Hello?
안녕하세요

(TODO: 다른 팁도 추가하기)

확인

Could you compile this ahk source code (test.ahk)?
This ahk script occurs encoding error when it was compiled using ansi version.


test.ahk

tip=
 (
이 번역기는 완벽한 번역기가 아닙니다.

Hello?
안녕하세요
(TODO: 다른 팁도 추가하기)
 )
gosub,Tray_Init
 msgbox,% tip
 exitapp
 Tray_Init:
 Menu, Tray, NoStandard
 Menu, Tray, DeleteAll
 Menu, tray, add, 사이트 방문 , 사이트방문
return
사이트방문:
run, IEXPLORE.EXE "http://translate.google.com"
return


Multi-Threading Functions Missing

I just started using AutoHotkey_H; I wanted to try it to use its multi-threading functionality. However, whenever I try to run a script that calls one of the multi-threading functions, I get a load-time error message saying that the function doesn't exist. I'm using the .exe version of AutoHotkey_H. Is this a bug, or did I invariably mess something up?

Missing AutoHotkey2.rc?

AutoHotkey2.rc is referenced by the project files but not included in git.

(I am assuming there is nothing tricky going on, like a build script generating the file. I have not built the project.)

Hotstrings dont seem to work without also setting a hotkey

I'm using https://github.com/amazing-andrew/AutoHotkey.Interop but I suspect the issue does not lie in that library.

The below ::wtf:: hotstring only works when the ^a hotkey has also been set. otherwise nothing seems to happen.

//ahk.ExecRaw("^a::Send, Hello World"); // Uncomment this line to get the hotstring working
ahk.ExecRaw("::wtf::What the Fridge?"); // This hotstring only works if a hotkey has been set

ahk.ExecRaw just calls through to the ahkdll's ahkExec function, passing along the provided string.

GUI using Dll 'Background[Color]' parameter doesn't work

I'm using 1.1.30.03-H001(Ahk_H Unicode 32-bit) Autohotkey.dll with C#
Gui, Add, picture, x100 y100 w100 h100 vGui_Img +0x100 backgroundtrans, Img.png

GUI using Dll 'Background[Color]' parameter doesn't work
And, if Script reload it self(inside script), GUI shows different(fontsize & styles ...) unlike the first run.

Change Release|Win32 back to /md

As of last commit
image
there is a problem when compiling Release | Win32 because of /mt, you have to manually add "msvcrt.lib;" to Properties -> Linker -> Input -> Additional Dependencies to make it compile with no errors.
Also I don't know if this was intentional since the rest of the configurations use /md.

ahkPause doesn't work as expected

ahkPause (See https://github.com/HotKeyIt/ahkdll/blob/alpha/source/exports.cpp#L189-L192 ) doesn't work as expected because line 192 sets g->IsPaused to false instead of true and decrements g_nPausedThreads instead of increments (and maybe other issues?). Additionally, it also seg faults if you pass 0 as the argument, because the conditional on line 189 attempts to dereference address 0x0.

Regardless of the argument passed to it ("On", "Off", 1), it always returns 0, and it never causes the thread to pause (including the tray icon never turning red). The only thing it appears to do is unpause an already paused thread that has been paused by calling Pause within the ahk script e.g. something like,

#Persistent
loop {
  ToolTip(A_TickCount)
  sleep 1000
  pause
}

With the above script that pauses itself, you can unpause it by calling ahkPause.

However, if you remove the pause line from the loop, ahkPause fails to pause the script when called.

I'm using https://github.com/HotKeyIt/ahkdll-v2-release/blob/master/x64w/AutoHotkey.dll to test this.

Compiled exe with MultiThreadedDLL set to MultiThreaded not working anymore

Maybe there is a bug, but i am not able to use the compiled exe.

For testing (ahk code):
1)
FileRead, tmp, % "AutoHotkey.vcxproj"
tmp := StrReplace(tmp, "MultiThreadedDLL", "MultiThreaded")
file := FileOpen("AutoHotkey.vcxproj", "w")
file.Write(tmp)
file.Close()

FileRead, tmp, % "source\lib_pcre\lib_pcre.vcxproj"
tmp := StrReplace(tmp, "MultiThreadedDLL", "MultiThreaded")
file := FileOpen("source\lib_pcre\lib_pcre.vcxproj", "w")
file.Write(tmp)
file.Close()

and compile

  1. Use new Ahk2Exe.exe compiler to create a simple msgbox.exe and run it.

If i compile it with dll, there is no problem. But not every computer has these dlls. By the way, which dlls are needed on a system to get it running?

The encoding error occur in ansi version


ahk source code (examtranslate.ahk)

tip=
(
이 번역기는 완벽한 번역기가 아닙니다.

Hello?
안녕하세요
(TODO: 다른 팁도 추가하기)
)
gosub,Tray_Init
msgbox,% tip
exitapp
Tray_Init:
Menu, Tray, NoStandard
Menu, Tray, DeleteAll
Menu, tray, add, 사이트 방문 , 사이트방문
return
사이트방문:
run, IEXPLORE.EXE "http://translate.google.com"

return

This ahk script occurs encoding error when it was compiled using ansi version.
I modify GetLine functions in existing C++ code (in script.cpp)
and compiled AutoHotkeySC.bin.
and then it works.
But, a compiled script(likes over 10000 lines of script) is very slow to launch. Performance is very slow.

Can you do fix it?

cpp source code (script.cpp)

size_t Script::GetLine(LPTSTR aBuf, int aMaxCharsToRead, int aInContinuationSection, TextStream *ts)
{
....
...
..
.

ifdef _UNICODE

            //aBuf_length = UTF8ToUTF16((unsigned char*)aBuf, aMaxCharsToRead, (unsigned char*)aDataBuf, aSizeEncrypted) - 1;
            aBuf_length = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)aDataBuf, -1, aBuf, aMaxCharsToRead) - 1; 

else

                            //_tcscpy(aBuf, (LPTSTR)aDataBuf); 
                           //replace below 3 lines
            CStringA sChar;
            StringUTF8ToChar((LPCSTR)aDataBuf, sChar, -1, NULL, CP_ACP);
            _tcscpy(aBuf, sChar);

            aBuf_length = _tcslen(aBuf);

....
...
..
.
}

WinActivate significantly slower in ahkdll v2 compared to AHK_L

While porting some AHK_L scripts to ahkdll v2, I noticed the WinActivate function is 3x slower than AHK_L, which is already rather slow. This is a bit of a pain point for me because I often run scripts in parallel, so almost every ahk input event (mouse click, keyboard button, etc) must be preceded with re-activating the appropriate window.

In AHK_L v1.1.30.00, I measure the time for WinActivate around 1/10 of a second.

In the current ahkdll v2 release, I measure it at 1/3 of a second.

Is it possible to optimize this?

Thanks

can't build properly

hi,
I can't build self-contained file with the new version of your codes
it prompts an error msg from postbuild.ahk 'RegExClass'
Could you check this issue?

Compiler error

If the script is lengthy , the compilation error

send,a
~~
30000+ line error

unicode ,ascii
Both same symptoms

debug in dbgp not showing variables

Debugging with DBGP (such as in notepad++) does not show local and global variables. In Scite4AHK this could be solved by replacing tools/SciTEDebug.ahk. But what about the other IDE? However, the original AutoHotkey.exe(both v2 and v1.1) do not have this problem. Will this be fixed back as the same of standard v2.0 alpha (like removing static catalog for example) in the future?

intellisense errors.

These are the errors I have been seeing when I build the solution. How do I get rid of these errors?

Error 2 error C2051: case expression not constant C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 5596 1 AutoHotkey
Error 1 error C2065: 'AHK_CHECK_DEBUGGER' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 5596 1 AutoHotkey
Error 3 error C2039: 'HasPendingCommand' : is not a member of 'Debugger' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 5600 1 AutoHotkey
Error 4 error C2039: 'Break' : is not a member of 'Debugger' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 5635 1 AutoHotkey
Error 6 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14219 1 AutoHotkey
Error 5 error C2065: 'CriticalObject' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14219 1 AutoHotkey
56 IntelliSense: identifier "CriticalObject" is undefined c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14219 3 AutoHotkey
57 IntelliSense: identifier "criticalobj" is undefined c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14219 19 AutoHotkey
Error 9 error C2059: syntax error : ')' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14220 1 AutoHotkey
Error 7 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14220 1 AutoHotkey
Error 8 error C2065: 'CriticalObject' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14220 1 AutoHotkey
58 IntelliSense: expected an expression c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14220 40 AutoHotkey
59 IntelliSense: expected a ')' c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14220 41 AutoHotkey
60 IntelliSense: expected an expression c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14221 35 AutoHotkey
61 IntelliSense: expected a ';' c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14221 36 AutoHotkey
Error 10 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14222 1 AutoHotkey
Error 11 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14225 1 AutoHotkey
Error 12 error C2227: left of '->GetObj' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14225 1 AutoHotkey
Error 13 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14227 1 AutoHotkey
Error 14 error C2227: left of '->GetCriSec' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14227 1 AutoHotkey
Error 15 error C2653: 'CriticalObject' : is not a class or namespace name C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14229 1 AutoHotkey
Error 16 error C3861: 'Create': identifier not found C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14229 1 AutoHotkey
62 IntelliSense: name followed by '::' must be a class or namespace name c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14229 17 AutoHotkey
Error 20 error C2039: 'Create' : is not a member of 'global namespace'' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey Error 22 error C2040: 'CriticalObject' : 'int *' differs in levels of indirection from 'int' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey Error 17 error C2143: syntax error : missing ';' before '*' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey Error 21 error C2146: syntax error : missing ';' before identifier 'Create' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey Error 19 error C2825: 'CriticalObject': must be a class or namespace when followed by '::' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey Error 18 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey 63 IntelliSense: identifier "CriticalObject" is undefined c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 1 AutoHotkey 64 IntelliSense: name followed by '::' must be a class or namespace name c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14242 17 AutoHotkey Error 23 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14243 1 AutoHotkey Error 25 error C2061: syntax error : identifier 'CriticalObject' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14265 1 AutoHotkey Error 24 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14265 1 AutoHotkey 65 IntelliSense: identifier "CriticalObject" is undefined c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14265 2 AutoHotkey 66 IntelliSense: identifier "criticalobj" is undefined c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14265 18 AutoHotkey 67 IntelliSense: expected a type specifier c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14265 36 AutoHotkey Error 26 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14266 1 AutoHotkey Error 27 error C2227: left of '->object' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14266 1 AutoHotkey Error 28 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14270 1 AutoHotkey Error 29 error C2227: left of '->lpCriticalSection' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14270 1 AutoHotkey Error 30 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14271 1 AutoHotkey Error 31 error C2227: left of '->lpCriticalSection' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14271 1 AutoHotkey Error 32 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14275 1 AutoHotkey Error 33 error C2227: left of '->lpCriticalSection' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14275 1 AutoHotkey Error 34 error C2065: 'criticalobj' : undeclared identifier C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14276 1 AutoHotkey Error 36 error C2039: 'Delete' : is not a member of 'global namespace'' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14284 1 AutoHotkey
Error 37 error C2146: syntax error : missing ';' before identifier 'Delete' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14284 1 AutoHotkey
Error 38 error C2371: 'CriticalObject' : redefinition; different basic types C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14284 1 AutoHotkey
Error 35 error C2825: 'CriticalObject': must be a class or namespace when followed by '::' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14284 1 AutoHotkey
68 IntelliSense: name followed by '::' must be a class or namespace name c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14284 6 AutoHotkey
Error 39 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14285 1 AutoHotkey
Error 41 error C2227: left of '->lpCriticalSection' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14287 1 AutoHotkey
Error 40 error C2355: 'this' : can only be referenced inside non-static member functions C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14287 1 AutoHotkey
69 IntelliSense: 'this' may only be used inside a nonstatic member function c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14287 30 AutoHotkey
Error 43 error C2227: left of '->lpCriticalSection' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14289 1 AutoHotkey
Error 42 error C2355: 'this' : can only be referenced inside non-static member functions C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14289 1 AutoHotkey
70 IntelliSense: 'this' may only be used inside a nonstatic member function c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14289 24 AutoHotkey
Error 44 error C2248: 'ObjectBase::Delete' : cannot access protected member declared in class 'ObjectBase' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14291 1 AutoHotkey
Error 45 error C2352: 'ObjectBase::Delete' : illegal call of non-static member function C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14291 1 AutoHotkey
71 IntelliSense: a nonstatic member reference must be relative to a specific object c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14291 9 AutoHotkey
72 IntelliSense: function "ObjectBase::Delete" (declared at line 21 of "c:\users\hkalluru\downloads\dll\hotkeyit\source\script_object.h") is inaccessible c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14291 21 AutoHotkey
Error 48 error C2039: 'Invoke' : is not a member of '`global namespace'' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14294 1 AutoHotkey
Error 49 error C2146: syntax error : missing ';' before identifier 'Invoke' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14294 1 AutoHotkey
Error 51 error C2371: 'CriticalObject' : redefinition; different basic types C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14294 1 AutoHotkey
Error 47 error C2825: 'CriticalObject': must be a class or namespace when followed by '::' C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14294 1 AutoHotkey
73 IntelliSense: name followed by '::' must be a class or namespace name c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14294 30 AutoHotkey
Error 52 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14301 1 AutoHotkey
Error 55 error C1903: unable to recover from previous error(s); stopping compilation C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14303 1 AutoHotkey
Error 54 error C2227: left of '->lpCriticalSection' must point to class/struct/union/generic type C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14303 1 AutoHotkey
Error 53 error C2355: 'this' : can only be referenced inside non-static member functions C:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14303 1 AutoHotkey
74 IntelliSense: 'this' may only be used inside a nonstatic member function c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14303 35 AutoHotkey
75 IntelliSense: 'this' may only be used inside a nonstatic member function c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14306 18 AutoHotkey
76 IntelliSense: 'this' may only be used inside a nonstatic member function c:\Users\hkalluru\Downloads\DLL\HotKeyIt\source\script2.cpp 14307 24 AutoHotkey

If acts weird

If (0 < 15 < 10)
{
	Msgbox, evaluates to true why?
}

If statement turns to true, am I missing something on If statement? or is it a bug

[BUG] excessive memory usage

When I tested yaml to load a 1.6m json file, I found that the ahk_h v2 version will use up to 500+m of memory, while ahk_L v2 version only needs 20-30m of memory.
test code:

a := FileRead('js.json', 'utf-8')
o := Yaml(a)
MsgBox()

image

ahk.ahkgetvar always returns a pointer?

From Python I try:

>>> import ctypes
>>> ahk = ctypes.cdll.AutoHotKey
>>> ahk.ahktextdll("","","")
816
>>> ahk.ahkassign("test","5")
0
>>> ahk.ahkgetvar("test",0) # As value
39321392
>>> ahk.ahkgetvar("test",1) # As pointer
39321392 # Same value either way
>>> ctypes.cast(int(ahk.ahkgetvar("test", 0)), ctypes.POINTER(ctypes.c_char))
<ctypes.LP_c_char object at 0x01EC7B20>
>>> ans = _ # Result of last operation is stored in a variable named "_"
>>> ans[0]
'5'

I expect ahkgetvar to return the value not a pointer, am I wrong?
Using Version 1.1.8.1 AutoHotkey_H ANSI 32-bit (on winXP64, Python2.7 32bit).

Thanks a ton for building this though, it's very helpful!

The encoding errors recur in Ansi Version

;test.ahk
gosub,Tray_Init

tip=
 (
이 번역기는 완벽한 번역기가 아닙니다.

Hello?
안녕하세요
(TODO: 다른 팁도 추가하기)
 )

VarSetCapacity(var,1024)
DllCall("WideCharToMultiByte","UInt",949,"Uint",0,"wStr",tip,"UInt",StrLen(tip)*2,"PTR",&var,"UInt",1024,"UInt",0,"UInt",0)

MsgBox % "GetACP : " DllCall("GetACP") "`nIsUnicode: `t" (A_IsUnicode?1:0) " `nVersion: `t `t" A_AhkVersion "`n" StrGet(&var,"CP0")
 exitapp
return

Tray_Init:
 Menu, Tray, NoStandard
 Menu, Tray, DeleteAll
 Menu, tray, add, 사이트 방문 , 사이트방문
return

사이트방문:
run, IEXPLORE.EXE "http://translate.google.com"
 return

Could you compile this ahk source code (test.ahk) in latest H ANSI Version?
This ahk script recur encoding error when it was compiled using ANSI Version.
Here is Screenshot of Compile and Uncompile test
https://s16.postimg.org/x1lbpjch1/latest_H_Error.jpg

Unable to generate the DLLs

Hi,

I downloaded the source code and it compiled without any error with the Visual Studio 2010 Express. However, I only see the exe file generated and cannot find any DLL. Wonder if some one can give me a hand?

Thanks,
Jingzhao

cmd line param bug

this seems to only happen with compiled scripts

compile this script with AHK_H v1

#persistent
msgbox, command line params: %0% `n %1%
return

f9::reload

press f9 twice, every press after the 2nd time, you get the script path itself passed as a command line parameter.

this bug existed in 1.1.24 but i just tested with 1.1.28 and still fails

[BUG] making threadobject threads persistent doesn't work

This won't be persistent if run as a thread

#Persistent
SetTimer((*) => ToolTip("Persistent Timer Running", , , 3), 100)

adding an infinite loop makes it stay running

#Persistent
SetTimer((*) => ToolTip("Busy Timer Running", , , 3), 100)

loop {
	Sleep(100)
}

I tested it using the script bellow

#Persistent
timerThread := ThreadObj("#Include persistent timer.ahkh2")
loopThread := ThreadObj("#Include busy timer.ahkh2")

how do i change default password?

I've read your instructions:

    default password AutoHotkey is now better hidden and it is easier to set own password
    Make sure to amend or add g_default_pwd.. entries, also in globaldata.h and update the length of it here and here.
    The password itself needs to be changed here, use you own fake entries. You can also have empty (\0) characters in between or use for example separate function to generate the password...
    The best method is to generate the password dynamically through separate function(s) so it is not saved directly in source and that part of source code is not open to public!```

Are you able to guide/example on how to make decryption most difficult, and changing the default password to "biax" and how to dynamically set a password? I've read your instructions and still aint sure how to.

Many issues...

#SingleInstance On isn't recognized; On has to be removed.
#NoENV isn't recognized; has to be commented out.
AutoTrim, Off isn't recognized; has to be commented out.

IfExist isn't recognized as a valid function name; need alternative...

I'm trying to use one interface for vJoy with my framework but don't want to recode the entire thing to get it to "work".. Why is all of this, and more, missing?

can't write propertie while ahkExec

Hello.
I'm using 1.1.13 Win32w version, which I get from http://www.autohotkey.net/~HotKeyIt/AutoHotkey/files/AutoHotkey-txt.html

I used ahktextdll and defined ahk class and it's instance.
Then, on some event, I use ahkExec to write some values to instance properties and looks like properties aren't changed.
This may possibly be a bug.

Priviously i succsessfully used 1.1.10 Win32w.

I create class like this:
;==================
wr := new writer()
class writer
{
__New() {
this.foo := ""
}
__Delete() {...}
}
;there are also hotkeys holding execution
;==================

I acces properties like this:
;==================
wr.foo := "bar"
tmp := wr.foo
msgbox %tmp%
;==================

Possible to get array values/object properties for v2?

Is there any way to get values for array/object types using the v2 dll? I'd like to do something like:

ahkExec("notepads := WinGetList("Notepad")
ahkgetvar("notepads[1]") // or "notepads.1", or ideally the entire array somehow

but I get an illegal variable name by referencing any of the properties, and I couldn't figure out if there's any way to use the result of just getting the object with ahkgetvar("notepads") or anything like this. I'm trying to avoid setting each property to a separate ahk variable and then ahkgetvaring those.

With v1 you can do:

ahkExec("WinGet notepads, List, Notepad")
ahkgetvar("notepads") // => '2' (array length)
ahkgetvar("notepads1") // => "0x290530" (first id)

Thanks!

Visual Studio Version?

Hi,

Which VS Version are you using?

I tried VS 2013 Update 4 Community, but it's not working without changing the minhook. The sln shows up VS 2013, but the project says VS 2010.

Version numbers incorrect

For the v2.0-beta3-H002 release, A_AhkVersion is reporting 2.0-beta.1.

v2.0-beta3-H002 itself is incorrect; there must be a . between the pre-release identifier and the numeral. Without this dot, version number comparisons with other forks will yield incorrect results.

In other words, 2.0-beta3-H002 is (erroneously) greater than 2.0-beta.4, while 2.0-beta.3-H002 would (correctly) be greater than 2.0-beta.3 but less than 2.0-beta.4.

(That is presuming your version numbers are based on the main fork's version numbers, and are intended to be comparable.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.