AutoHotkey Community

It is currently May 27th, 2012, 12:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 177 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12
Author Message
 Post subject:
PostPosted: February 4th, 2012, 4:24 am 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
Whenever I see "first letter" I think about encoding problems. Most likely, you're using Unicode, and the script was written for ANSI. Here's why this is a problem:
Code:
ANSI
Hello World
72 101 108 108 111 32 87 111 114 108 100 00

Unicode
Hello World
72 00 101 00 108 00 108 00 111 00 32 00 87 00 111 00 114 00 108 00 100 00 00 00
The Red null-byte is the one AutoHotkey Basic/ANSI picks up as the end of the string. The orange null-double-byte is the one AutoHotkey Unicode intends to signal the end of the string. AutoHotkey ANSI reads "72 00" and says "oh, a 00... must be the end of the string", so it only picks up the H.

Long story short, either convert the whole script or run it under ANSI.

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 4:46 am 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
That was the kind of explanation I was looking for. I tried that - converting the entire script to ANSI, but the problem remains. What if I converted it all to UTF-8? I see now that I had it mixed (must be the defaults of my text editors).

I am using Autohotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 4:58 am 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
Converting them all to UTF-8 didn't work either. AutoHotkey_L is supposed to prefer Unicode, and this particular Forms Framework is supposed to be fixed for Autohotkey_L, per maul-esel.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 5:42 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
You need AutoHotkey_L ANSI, not Unicode. The AHK executable needs to be the ANSI version, not just the script.

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 5:45 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
:!: IT HAS NOT YET BEEN FIXED :!:

I'd probably should not have posted about it. :? If I have time, I intend to fix it. Up to know, I just removed some duplicate declarations.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 1:14 am 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
@maul.esel, Is there anything I can do to help? I checked through the toolbar.ahk script trying to find an error in a string-length function, but couldn't find one. All the instances of buffer variables containing the caption names are all correct (I'm sure you know that already! :) ). I think nimda is right that the error is an encoding problem.

maul.esel, I will say, that aside from the caption bug, the script works flawlessly.

Now, I noticed another post where someone had done some work on toolbar.ahk, and gave it a version number of 1.1. Looking through the script, I saw some references to unicode, as well as some unicode dll calls. But I couldn't run that script because of the "duplicate declaration" problem.

I will try the ANSI version and see if that helps for now.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 1:20 am 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
Using AutoHotkey_L ansi works.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 5th, 2012, 10:49 pm 
Offline

Joined: February 5th, 2012, 10:03 pm
Posts: 3
I have been trying to get this to work with no success. I have been able to remove most of the duplicate definitions, but the last one I cannot seem to figure out. I am brand new here, trying to figure out if this can do what I need to do.

My last error is, and windows won't let me copy paste it and you won't let me upload it, so I will do my best to type what seems to matter

Error at line 1191 in ...\SpreadSheet.ahk

Line Text: SS_SetGlobalFields(hCtrl, Fields, V1="", v2="", V3="", v4="" ...)
Error: Function cannot contain functions.

And I don't need spreadsheet, can I just remove it?[/img]


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 5th, 2012, 10:52 pm 
Offline

Joined: February 5th, 2012, 10:03 pm
Posts: 3
I am trying to write a script that will do parent and child window manipulation. I am not going to use a form, just want something like

Win_FromPoint
Win_GetParent
Win_GetChildren

Can I access these functions from a general hotkey script? Is there an example where this is done?

Are there any set of examples for the forms?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 10:55 pm 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
@sting, skim through the whole thread - maul.esel made version which fixed the bugs. I think the link was back a page or two. You do know you have to "include" the Win.ahk script, right? You might have to use the ansi version of autohotkey, too.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 6th, 2012, 11:43 am 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Quote:
maul.esel made version which fixed the bugs.
Do you read what I post :?:
Just some posts above, I wrote:
:!: IT HAS NOT YET BEEN FIXED :!:

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 6th, 2012, 3:42 pm 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
@maul.esel, Yes, I certainly did read your post, maybe you didn't fix all of the problems, but you DID fix it enough to work very well for the ansi version of autohotkey_L.

Thanks to your *unfinished* fix, we are able to use the framework. Before this, I was not able to use the framework at all. For this, you have my sincere thanks, and I will patiently wait for you to finish.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: rrhuffy and 1 guest


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