AutoHotkey Community

It is currently May 27th, 2012, 3:18 am

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: May 18th, 2010, 9:26 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
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).

Image

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
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Last edited by fincs on August 8th, 2010, 11:04 am, edited 13 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 18th, 2010, 10:05 pm 
Sounds great!!
I look forward to the implementation of DllCall function.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 19th, 2010, 9:37 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
New release now available.

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 19th, 2010, 10:45 pm 
Offline

Joined: March 27th, 2008, 2:14 pm
Posts: 700
No lazy-person-accessible changelog? :(

_________________
Scripts - License


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 20th, 2010, 1:53 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2010, 12:16 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
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):
Image
Yes, SciTE4AutoHotkey v2.1 will be released someday :P
Speaking of it, I've tweaked the AutoComplete and calltip features to add AutoHotkey_L stuff.

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2010, 3:28 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Great! I redirected the link for AutoHotkey64_COM to this thread.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 1:00 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
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
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 2:25 pm 
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%


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 3:03 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
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
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject: DllCall: DeviceIoControl
PostPosted: May 23rd, 2010, 5:22 pm 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 5:43 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
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
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 6:03 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
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 ... a19892ca53
more to the point
Code:
is64bit()
{
   EnvGet,pa,PROCESSOR_ARCHITECTURE
   Return InStr(pa,"64")
}

MsgBox % "OS is "  A_OSVersion (is64bit() ? "64" : "32")
ExitApp

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 6:59 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
It would break scripts.
In order to detect 64-bit Windows you just have to check if A_PtrSize is 8.

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2010, 7:59 pm 
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.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 12 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