 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
Posted: Tue May 18, 2010 8:26 pm Post subject: AutoHotkey64: 64-bit AutoHotkey_L [updated 6/24/10] |
|
|
Note: AutoHotkey64 has been merged into AutoHotkey_L
Hello,
This is a native build of AutoHotkey_L for AMD64 processors (32-bit version also available with all additions such as COM).
Download (r8)
Demo script: AhkRss (requires Unicode-enabled XPath)
This was built with Visual C++ 2010 Express using the Windows 7.1 SDK. Currently only the 'Release' and 'ReleaseAnsi' targets are supported for both processors.
Changelog:- r8: Added Lexikos' DllCall() changes. Merged latest changes from AutoHotkey_L repository. 64-bit binaries are now compressed with MPRESS. Added A_Is64bitOS which returns 1 if the script is running under 64-bit Windows, regardless of the AutoHotkey version.
- r7: Upgraded to AutoHotkey_L L52.
- r6: Fixed typo in NumGet()/NumPut().
- r5: Fixed bug in RegisterCallback() and made pointer types unsigned (thanks Sean).
- r4: Implemented DllCall() and RegisterCallback(). Fixed some misc issues in the GUI code.
- r3: Added Sean's COM additions. The debugger is now enabled. VC++ 2010 Express is now used.
- r2: All warnings gone and some more INT_PTR to int cast errors fixed. Variable list now works properly. ANSI/Unicode builds now both available.
- r1: Initial release.
_________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]
Last edited by fincs on Sun Aug 08, 2010 10:04 am; edited 13 times in total |
|
| Back to top |
|
 |
sunday Guest
|
Posted: Tue May 18, 2010 9:05 pm Post subject: |
|
|
Sounds great!!
I look forward to the implementation of DllCall function. |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
|
| Back to top |
|
 |
infogulch
Joined: 27 Mar 2008 Posts: 648
|
Posted: Wed May 19, 2010 9:45 pm Post subject: |
|
|
No lazy-person-accessible changelog?  _________________ Scripts - License |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Thu May 20, 2010 12:53 am Post subject: |
|
|
Excellent. Although I haven't tried it yet, this is the one that I've been constantly feeling the need of recently.
PS. I added COM support to AutoHotkey64. See here. |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
Posted: Sat May 22, 2010 11:16 am Post subject: |
|
|
New release now available. It adds Sean's COM stuff and reenables the debugger.
Screenshot of both things in action (click for full size version):
Yes, SciTE4AutoHotkey v2.1 will be released someday
Speaking of it, I've tweaked the AutoComplete and calltip features to add AutoHotkey_L stuff. _________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list] |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Sat May 22, 2010 2:28 pm Post subject: |
|
|
| Great! I redirected the link for AutoHotkey64_COM to this thread. |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
Posted: Sun May 23, 2010 12:00 pm Post subject: |
|
|
New release available.
After some research and crazy hours of coding and debugging DllCall() and RegisterCallback() are working now.
The catch? Exceptions don't seem to work properly. That's all.
I've used some ASM code from DynCall to implement the dynamic function calling, so props to the guys that worked on it! _________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list] |
|
| Back to top |
|
 |
Paulo_Guest Guest
|
Posted: Sun May 23, 2010 1:25 pm Post subject: |
|
|
Congratulations Fincs, the 64bit version is very welcome.Thanks.
Tested both (unicode and ansi) and everything seems OK.
Just one minor bug.
The ansi versions interpretes the "‹" char as "?" char.The unicode is OK.
| Code: | ‹var := "bla"
msgbox, %‹var% |
|
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
Posted: Sun May 23, 2010 2:03 pm Post subject: |
|
|
| Paulo_Guest wrote: | Just one minor bug.
The ansi versions interpretes the "‹" char as "?" char.The unicode is OK.
| Code: | ‹var := "bla"
msgbox, %‹var% |
|
That actually has nothing to do with AutoHotkey64.
The latest release of AutoHotkey_L (on which AHK64 is based) changed the default encoding for BOM-less scripts, it's now UTF-8 instead of the system default codepage. As you probably used it to save the script it gives an error because the codepage representation of '‹' is not valid UTF-8.
The Unicode build is not affected because the invalid character becomes the replacement character � (which is a valid variable character, probably not a good idea):
| Code: | 0[1 of 3]: 0
ErrorLevel[1 of 3]: 0
�var[3 of 3]: bla |
In order to fix the problem save the script as UTF-8 or use the /CP0 switch. _________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list] |
|
| Back to top |
|
 |
sunday Guest
|
Posted: Sun May 23, 2010 4:22 pm Post subject: DllCall: DeviceIoControl |
|
|
Wow, this is what I wanted. Thanks, fincs!!
I have just one thing I want to figure out to move to the 64 bit version.
The following script shows "1" if you use Synaptics Touchpad and touch it.
| Code: | hSynTP := DllCall("CreateFile", "Str", "\\.\SYNTP", "UInt", 0xC0000000, "UInt", 3, "UInt", 0, "UInt", 3, "UInt", 80, "UInt", 0)
InBuf := DllCall("GlobalAlloc", "UInt", 0x40, "UInt", 16)
OutBuf := DllCall("GlobalAlloc", "UInt", 0x40, "UInt", 8)
NumPut(0x01000000 | 10, InBuf + 4 * 0)
NumPut(0x01000000 | 729, InBuf + 4 * 1)
NumPut(0xFFFFFFFE , InBuf + 4 * 3)
DllCall("DeviceIoControl", "UInt", hSynTP, "UInt", 0x80006004, "UInt", InBuf, "UInt", 16, "UInt", OutBuf, "UInt", 8, "UInt", 0, "UInt", 0) ; <- This doesn't respond.
TouchPad := NumGet(OutBuf + 1) > 0
MsgBox % TouchPad |
This doen't work on the 64w.exe while it works well on the original AHK_L or the 32w.exe.
I figured out that DllCall for DeviceIoControl in this particular setting doesn't respond, but I have no idea beyond this.
Do you or anyone have any suggestion for this issue? |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
Posted: Sun May 23, 2010 4:43 pm Post subject: |
|
|
Exactly.
Pointers in 64-bit processors are 8 bytes long instead of 4 bytes.
A new type was added to AutoHotkey_L (ptr) that represents a pointer. It can also be used for size_t parameters.
There's also A_PtrSize.
My attempt at a 32-bit/64-bit compatible version of the script:
| Code: | hSynTP := DllCall("CreateFile", "Str", "\\.\SYNTP", "UInt", 0xC0000000, "UInt", 3, "ptr", 0, "UInt", 3, "UInt", 80, "ptr", 0, "ptr")
InBuf := DllCall("GlobalAlloc", "UInt", 0x40, "ptr", 16, "ptr")
OutBuf := DllCall("GlobalAlloc", "UInt", 0x40, "ptr", 8, "ptr")
NumPut(0x01000000 | 10, InBuf + A_PtrSize * 0, 0, "ptr")
NumPut(0x01000000 | 729, InBuf + A_PtrSize * 1, 0, "ptr")
NumPut((~0) - 1, InBuf + A_PtrSize * 3, "ptr")
DllCall("DeviceIoControl", "ptr", hSynTP, "UInt", 0x80006004, "ptr", InBuf, "UInt", 16, "ptr", OutBuf, "UInt", 8, "ptr", 0, "ptr", 0)
TouchPad := NumGet(OutBuf + 1) > 0
MsgBox % TouchPad |
The next version will make ptr the default type for NumPut() and NumGet() to ease porting (ex: COM.ahk because of some still useful functions like COM_QueryInterface). _________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list] |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sun May 23, 2010 5:03 pm Post subject: |
|
|
because ahk is aimed at non expert non programers how bout instead of showing WIN_VISTA show WIN_VISTA32 and WIN_VISTA64 same of win7
http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/24792cdc-2d8e-454b-9c68-31a19892ca53
more to the point
| Code: | is64bit()
{
EnvGet,pa,PROCESSOR_ARCHITECTURE
Return InStr(pa,"64")
}
MsgBox % "OS is " A_OSVersion (is64bit() ? "64" : "32")
ExitApp |
_________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1151 Location: Seville, Spain
|
|
| Back to top |
|
 |
sunday Guest
|
Posted: Sun May 23, 2010 6:59 pm Post subject: |
|
|
Thank you very much, fincs.
Now the message box shows up, although the script doesn't respond to the touchpad when run on the AHK64.
However, since it seems a matter of the device driver but of the AHK64, I'm looking for some more information to fix it.
If anyone could help fix this script, it would be greatly appreciated. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|