AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SOLVED: a_endchar and vista

 
Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
ScottMattes



Joined: 21 May 2007
Posts: 173
Location: USA

PostPosted: Wed Jan 06, 2010 1:00 am    Post subject: SOLVED: a_endchar and vista Reply with quote

This is driving me past distraction! I would greatly appreciate it if someone would try this code and tell me if this is a bug.

In this code, test_trig1 works as expected (it doesn't display 'no match' when enter, space or tab is used), but test_trig2 gives 'no match'.

Code:

; proof of concept, can i simulate a non-auto hotstring for each of the shortcut triggers
; space, tab, enter

; check the value of a_endchar before doing the action


msgbox, Type`ntest_trig1{endchar of your choice: enter, period, space, tab, etc}`nor`ntest_trig2{endchar of your choice: enter, period, space, tab, etc}


:O:test_trig1:: ; without b0 a_endchar is set correctly
:b0O:test_trig2:: ; the b0 causes a_endchar to not be set
  l := strlen(a_endchar)
  send, len=%l% a_EndChar=
 
  if a_EndChar = `n
  {
  send, enter
  }
  else if a_endchar = %a_tab%
       {
       send, tab
       }
       else if a_endchar = %a_space%
            {
            send, space
            }
            else send, no match %a_endchar%
return



After reading the help file I would expect exactly the opposite results, though I would still consider it a bug. The help file states that the only time that a_endchar is blank is if the * option is used.

Can this be added as a needed code change to AutoHotkey?

Thank you.[/b]
_________________
-------------
Scott Mattes

My small, and slowly growing, collection of scripts.


Last edited by ScottMattes on Wed Jan 06, 2010 3:43 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Lexikos



Joined: 17 Oct 2006
Posts: 7293
Location: Australia

PostPosted: Wed Jan 06, 2010 8:51 am    Post subject: Reply with quote

It was a bug. Have you updated lately?
Quote:
1.0.48.04 - September 25, 2009
...
Fixed A_EndChar to be valid when the B0 option is present, and to be empty when there is no ending character (broken by 1.0.44.09). [thanks Al2000]

Source: AutoHotkey Changes and New Features
Back to top
View user's profile Send private message Visit poster's website
ScottMattes



Joined: 21 May 2007
Posts: 173
Location: USA

PostPosted: Wed Jan 06, 2010 3:41 pm    Post subject: Reply with quote

Duh! I know to check that, BUT I DIDN'T!

I even searched for A_ENDCHAR, but I should of added the B0.

Thank you, problem solved.
_________________
-------------
Scott Mattes

My small, and slowly growing, collection of scripts.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group