AutoHotkey Community

It is currently May 27th, 2012, 2:37 am

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 237 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 16  Next
Author Message
 Post subject:
PostPosted: November 22nd, 2009, 11:18 am 
Offline

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
I also have a TreeView control and the A_EventInfo value is in HEX

and I can't find a workaround here.
This doesn't work:

Code:
SetFormat, Integer, d
X := A_EventInfo
ToolTip % X + 1 - 1


X is again in HEX.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 2:09 pm 
Offline

Joined: January 7th, 2007, 1:43 pm
Posts: 107
jackieku wrote:
@poetbox
Tested with the example in the manual.
Code:
::btw::by the way

works fine here.

However,
Code:
::中文::Chinese

doesn't work. :(

Code:
::btw::顺便
doesn't work too:!:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 22nd, 2009, 2:28 pm 
Offline

Joined: May 22nd, 2009, 2:48 pm
Posts: 12
regexmatch speed is horribly slow with AutohotkeyU version.

unicode version takes 50-60 seconds to regexmatch in one html file
but the same code in ansi always took less than 1 sec.


Can you take a look at it? thanks.

Code:
urldownloadtofile, http://www.autohotkey.com/changelog/, downfile.htm
fileread, html, downfile.htm

stime := A_tickcount
spos := 1

Loop
{
  if !(spos := Regexmatch(html, "i)[a-z]{2,}",match, spos))
    break
  spos += strlen(match)
}
msgbox, % (a_tickcount-stime)/1000


Last edited by fasto on November 22nd, 2009, 2:30 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 2:29 pm 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
poetbox wrote:
Code:
::btw::顺便
doesn't work too:!:

Here is a workaround.
Code:
::btw::
   Send 顺便
   return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 2:33 pm 
jackieku wrote:
poetbox wrote:
Code:
::btw::顺便
doesn't work too:!:

Here is a workaround.
Code:
::btw::
   Send 顺便
   return
thank you very much!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 3:22 pm 
Offline

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
Quote:
::btw::顺便

doesn't work too:!:


Curiously this works for me; no need for a workaround
(maybe because i have English as System Locale)

@jackieku
Thank you very much for the rapid fixing of the HEX/DEC problem !


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 4:56 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Actually FileRead can be also used to read binary file with the official build of AHK, which is quite handy. Now it no longer works with AutoHotkeyU, which is understandable. I accomplished the same job through file.RawRead, however, it was a bit cumbersome compared to FileRead. So, what do you think about introducing an additional flag into FileRead to read the file in raw?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 5:02 am 
Sean wrote:
Actually FileRead can be also used to read binary file with the official build of AHK, which is quite handy. Now it no longer works with AutoHotkeyU, which is understandable. I accomplished the same job through file.RawRead, however, it was a bit cumbersome compared to FileRead. So, what do you think about introducing an additional flag into FileRead to read the file in raw?

Isn't the *C flag there?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 5:42 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
It didn't work in my test (:actually my first usage of *c, I've never used AHK's clipboard function, I suppose). Testing again, it now works. Oops. Turn out to be two spaces between the falg and file path. BTW, still looks like better have a separate flag for raw read, as the purpose of *c seems not in raw/binary read but in indicating that the file is specially formatted for clipboard.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 8:57 am 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
Sean wrote:
BTW, still looks like better have a separate flag for raw read, as the purpose of *c seems not in raw/binary read but in indicating that the file is specially formatted for clipboard.

This behavior (*C means binary read when output variable isn't "clipboard") is derived from official AutoHotkey (though it's undocumented), so there is no need to add an additional flag. I don't like to add new commands or new flags to the commands if it's not necessary (I hate commands and globals).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 10:17 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
jackieku wrote:
This behavior (*C means binary read when output variable isn't "clipboard") is derived from official AutoHotkey (though it's undocumented), so there is no need to add an additional flag.
Thanks, you made me look into the source file. You're right, it was there. Although it may be somehow pointless to document/use this flag for raw-read with the official build, I suppose it better be documented with AutoHotkeyU as FileRead is no longer raw-read.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 10:24 am 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
Sean wrote:
OK, you made me look into the source file. You're right, it was there. Although it may be somewhat pointless to document/use this flag for raw-read with the official build, I suppose it better be documented with AutoHotkeyU as FileRead is no longer raw-read.

AutoHotkey converts CR/LF to LF if *C is not specified...
So I don't think it is pointless. It is not raw-read, too.
If you really think this should be documented some where, I can added it to the wiki. If you can not wait for it, you could edit it as well. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 10:28 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
jackieku wrote:
AutoHotkey converts CR/LF to LF if *C is not specified...
Wouldn't that require the *t flag?
Quote:
*t: Replaces any/all occurrences of carriage return & linefeed (`r`n) with linefeed (`n).
Source: FileRead


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 10:32 am 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
Lexikos wrote:
jackieku wrote:
AutoHotkey converts CR/LF to LF if *C is not specified...
Wouldn't that require the *t flag?
Quote:
*t: Replaces any/all occurrences of carriage return & linefeed (`r`n) with linefeed (`n).
Source: FileRead

Yes. I'm wrong... sorry. :oops:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 11:04 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
jackieku wrote:
If you really think this should be documented some where, I can added it to the wiki. If you can not wait for it, you could edit it as well. :)
Yes I do, but no need of hurry. Actually I meant in the would-be official help file when it's going into final release. BTW, the new file functions with object syntax are sweet.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 237 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 16  Next

All times are UTC [ DST ]


Who is online

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