AutoHotkey Community

It is currently May 27th, 2012, 11:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 152 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11
Author Message
 Post subject: Re: 64 bit version
PostPosted: November 25th, 2011, 7:48 am 
Offline

Joined: November 25th, 2011, 7:31 am
Posts: 1
Anonymous wrote:
i tried it with win 7 64b, in device descriptions some chinese like unreadable words which detected 10 devices, and when i click on the devices nothing is displayed on the device info. what to do next.


I think this isn't a 64-bit issue, but rather an Ansi vs. Unicode issue. The DLL is expecting Ansi strings, but if you're using AutoHotKey_L then your script may be expecting Unicode strings.

I made some tweaks to the AutoHotkeyRemoteControlDLL.ahk script to convert the strings to Unicode so they can be displayed properly.

You could also try using the original AutoHotKey, which doesn't support Unicode, so there's no ambiguity in string format. More information on that is here:

http://l.autohotkey.net/file/users/Members/Lexikos/AutoHotkey_L/docs/Compat.htm

Here are my changes. You really only need the first one (Str -> AStr) to have the script function. The others are just prettying up the display names of the devices, which is not critical.

Code:
27c32
<    strRC := DllCall("AutohotkeyRemoteControl\GetDeviceType", Int, A_Index-1, "Cdecl Str")   
---
>    strRC := DllCall("AutohotkeyRemoteControl\GetDeviceType", Int, A_Index-1, "Cdecl AStr")   
77,78c82,84
<    VarSetCapacity(Name, 500) ;Reserve more space than needed.
<    nRC := DllCall("AutohotkeyRemoteControl\GetMouseDeviceInfo", INT, nCount, "INT *", DevID, "INT *", BtnNr, "INT *", SampleRate, INT, NameSize, Str, Name, "Cdecl Int")   
---
>    VarSetCapacity(AnsiName, 500) ;Reserve more space than needed.
>    nRC := DllCall("AutohotkeyRemoteControl\GetMouseDeviceInfo", INT, nCount, "INT *", DevID, "INT *", BtnNr, "INT *", SampleRate, INT, NameSize, UInt, &AnsiName, "Cdecl Int")
82a89,92
>     ; Convert from returned UTF8 to script's native Unicode
>     Name := StrGet(&AnsiName, -1, UTF-8)
98,100c108,111
<    VarSetCapacity(Name, 500)
<    nRC := DllCall("AutohotkeyRemoteControl\GetKeyDeviceInfo", INT, nCount, "INT *", nSubType, "INT *", nKeyboardMode, "INT *", nFuncKeyCount, "INT *", nIndicators, "INT *", nTotalKeys, INT, NameSize, Str, Name, "Cdecl Int")   
---
>    VarSetCapacity(AnsiName, 500)
>    nRC := DllCall("AutohotkeyRemoteControl\GetKeyDeviceInfo", INT, nCount, "INT *", nSubType, "INT *", nKeyboardMode, "INT *", nFuncKeyCount, "INT *", nIndicators, "INT *", nTotalKeys, INT, NameSize, UInt, &AnsiName, "Cdecl Int")
104a116,119
>    ; Convert from returned UTF8 to script's native Unicode
>    Name := StrGet(&AnsiName, -1, UTF-8)
122c137
<    VarSetCapacity(Name, 500)
---
>    VarSetCapacity(AnsiName, 500)
124c139
<    nRC := DllCall("AutohotkeyRemoteControl\GetHIDDeviceInfo", INT, nCount, "INT *", dwVendorId, "INT *", dwProductId, "INT *", dwVersionNumber, "INT *", usUsagePage, "INT *", usUsage, INT, NameSize, Str, Name, "Cdecl Int")   
---
>    nRC := DllCall("AutohotkeyRemoteControl\GetHIDDeviceInfo", INT, nCount, "INT *", dwVendorId, "INT *", dwProductId, "INT *", dwVersionNumber, "INT *", usUsagePage, "INT *", usUsage, INT, NameSize, UInt, &AnsiName, "Cdecl Int")   
128a144,147
>    ; Convert from returned UTF8 to script's native Unicode
>    Name := StrGet(&AnsiName, -1, UTF-8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2012, 8:02 pm 
Offline

Joined: March 24th, 2009, 2:25 pm
Posts: 22
When I start AutoHotkeyRemoteControlDLL.ahk I get this error
Quote:
---------------------------
AutoHotkeyRemoteControlDLL.ahk
---------------------------
GetDeviceCount fehlgeschlagen. Errorcode: -3
---------------------------
ОК
---------------------------

I took the archive from here - http://www.autohotkey.net/~daonlyfreez/ ... /fnkey.htm, in step 1, and extracted it.

I get the error in WinXP SP3 on my netbook and a fresh WinXP SP3 in virtual machine


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 152 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11

All times are UTC [ DST ]


Who is online

Users browsing this forum: notsoobvious, rrhuffy, Yahoo [Bot] and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group