AutoHotkey Community

It is currently May 27th, 2012, 1:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: January 6th, 2010, 2:00 am 
Offline

Joined: May 21st, 2007, 3:44 pm
Posts: 176
Location: USA
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
Image
My small, and slowly growing, collection of scripts.


Last edited by ScottMattes on January 6th, 2010, 4:43 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2010, 9:51 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2010, 4:41 pm 
Offline

Joined: May 21st, 2007, 3:44 pm
Posts: 176
Location: USA
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
Image
My small, and slowly growing, collection of scripts.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

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