AutoHotkey Community

It is currently May 26th, 2012, 11:31 pm

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 ... 6, 7, 8, 9, 10, 11, 12 ... 16  Next
Author Message
 Post subject:
PostPosted: November 18th, 2009, 5:17 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
jackieku wrote:
1. That is a bug, it will be fixed in the next release.
While correcting it, I suppose the following change in the same file will make ControlGet,, List work also with managed control WindowsForms10.SysListView32.
http://www.autohotkey.com/forum/viewtopic.php?t=50654

Code:
if (!_tcsnicmp(aControl, _T("SysListView32"), 13))
to
Code:
if (tcscasestr(aControl, _T("SysListView32")))


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 9:06 am 
Offline

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
Quote:
Code:
if (InStr("!!!!!ABCmmmmmmmm", "ab"))
{
   MsgBox 1
}


That works indeed, but not this:

Code:
if (InStr("!!!!!АБВmmmmmmmm", "аб"))
{
   MsgBox 1
}


(cyrillic letters)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 9:52 am 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
rousni wrote:
Quote:
Code:
if (InStr("!!!!!ABCmmmmmmmm", "ab"))
{
   MsgBox 1
}


That works indeed, but not this:

Code:
if (InStr("!!!!!АБВmmmmmmmm", "аб"))
{
   MsgBox 1
}


(cyrillic letters)

Locale related issues should be fixed. I'm working on it, but there are some difficulties. Because I can only recognize English letters, I do not know whether the results are correct or not.


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

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
Thank you for your reply and for your great work. By the way, I find the new icon superb !


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 10:36 am 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
rousni wrote:
Thank you for your reply and for your great work. By the way, I find the new icon superb !

Sorry, that's may not a bug. You should do "StringCaseSense locale" or "StringCaseSense on" first to get the above case to work.

This is the description from the official manual.
Quote:
StringCaseSense On|Off|Locale
...
Off (starting default): The letters A-Z are considered identical to their lowercase counterparts. This is the starting default for all scripts due to backward compatibility and performance (Locale is 1 to 8 times slower than Off depending on the nature of the strings being compared).
...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 1:06 pm 
Offline

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
Indeed, with 'StringCaseSense, Locale' this works fine. Thanks :D

Code:
StringCaseSense, Locale
if (InStr("!!!!!АБВmmmmmmmm", "аб"))
{
   MsgBox 1
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 1:44 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
I have an issue with some locale specific keys on my keyboard
Code:
½::
æ::
ø::
å::

Each give this message:
Quote:
Note: The hotkey ½:: will not be active because it does not exist in the current keyboard layout.


The file is UTF-8 BOM.

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 2:08 pm 
Offline

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
Quote:
I have an issue with some locale specific keys on my keyboard
Code (Copy):
½::
æ::
ø::
å::


Each give this message:
Quote:
Note: The hotkey ½:: will not be active because it does not exist in the current keyboard layout.


I solved this using the corresponding virtual key codes. e.g.
vk4E::


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 2:21 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Yes, that solves the problem (vkDC for ½ :)) - but the Ansi version works without this hack.

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 2:40 pm 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
tonne wrote:
Yes, that solves the problem (vkDC for ½ :)) - but the Ansi version works without this hack.

I suggest you escape the characters properly, if the characters aren't ASCII characters. That might be hacked by someone, but I won't (and can't) do it. Non-ASCII characters should only be used for string constants and comments in the scripts to achieve best compatibility.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 4:20 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
I think I found and fixed the problem!
The VkKeyScanEx has an wide counterpart VkKeyScanExW which, I believe, must be used in UNICODE.

This is what i changed:
keyboard_mouse.h, line 328:
Code:
vk_type CharToVKAndModifiers(TCHAR aChar, modLR_type *pModifiersLR, HKL aKeybdLayout); // tonne, changed (char aChar, to (TCHAR aChar,

keyboard_mouse.cpp, line 3860:
Code:
      return CharToVKAndModifiers(*aText, pModifiersLR, aKeybdLayout); // Making this a function simplifies things because it can do early return, etc.
   // tonne (previous line), changed ((char) *aText, to (*aText,

keyboard_mouse.cpp, line 3878:
Code:
vk_type CharToVKAndModifiers(TCHAR aChar, modLR_type *pModifiersLR, HKL aKeybdLayout) // tonne, changed (char aChar, to (TCHAR aChar,

keyboard_mouse.cpp, line 3888:
Code:
   SHORT mod_plus_vk = VkKeyScanExW(aChar, aKeybdLayout); // v1.0.44.03: Benchmark shows that VkKeyScanEx() is the same speed as VkKeyScan() when the layout has been pre-fetched.
   // tonne, previous line use VkKeyScanExW instead of VkKeyScanEx

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 5:25 pm 
Offline

Joined: November 30th, 2008, 1:51 pm
Posts: 73
@tonne
Have you tested your changes?

In addition, you don't need change VkKeyScanEx to VkKeyScanExW. The following codes are copied from WinUser.h.
Code:
#ifdef UNICODE
#define VkKeyScanEx  VkKeyScanExW
#else
#define VkKeyScanEx  VkKeyScanExA
#endif // !UNICODE

As we use TCHARs, VkKeyScanEx is the right choice.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 6:00 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Yes it seems to work for both native ASCII and danish variations.
No problems with modifiers or hotstrings.

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 7:09 pm 
Offline

Joined: December 17th, 2007, 6:39 pm
Posts: 235
Location: Galati, Romania
As a little bug report,

Auto-Syntax Tidy crashes AutohotkeyU.exe when passing files to it. I'll do some research tomorrow if nobody finds the problem until then.

EDIT:
The second bug report,

Code:
stringreplace,test,test,ă,a

works if run as a script, but when compiled using the unicode AutohotkeySC.bin returns a strange error.


Last edited by Petru on November 19th, 2009, 5:07 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 10:03 am 
Offline

Joined: March 23rd, 2006, 2:20 pm
Posts: 128
Code:
Input, KEY, L1
MsgBox, %KEY%


When I have the Bulgarian keyboard layout activated and type a letter, e.g. u0430, the msgbox displays a latin letter, in this case u00E0.

Is this normal for a unicode program?


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 ... 6, 7, 8, 9, 10, 11, 12 ... 16  Next

All times are UTC [ DST ]


Who is online

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