Jump to content


Photo

Comma in Input command


  • Please log in to reply
2 replies to this topic

#1 stevenp

stevenp
  • Members
  • 187 posts

Posted 19 July 2012 - 01:54 AM

it seems there's no way to catch the comma in the Input command.
Tried to escape it (`,), put into begin/end of the match-list, put in a variable, nothing helps.

Moderator's Note: Split from post in Announcements section. ~ sinkfaze

#2 sinkfaze

sinkfaze
  • Moderators
  • 6077 posts

Posted 19 July 2012 - 02:36 AM

MatchList[/url">

":ggsf3t12]Two consecutive commas results in a single literal comma.


:?:

#3 stevenp

stevenp
  • Members
  • 187 posts

Posted 19 July 2012 - 01:56 PM

a quote from documentation:

Two consecutive commas results in a single literal comma. For example, the following would produce a single literal comma at the end of string: "string1,,,string2". Similarly, the following list contains only a single item with a literal comma inside it: "single,,item".

...and a comma becomes a part of a matchstring.
There's no info about matching the comma character
As HotKeyIt showed, it should be an EndKey
Input,var,,{`,}
MsgBox % ErrorLevel

The example section of the documentation could be modified to:
Input, SingleKey, L1, {`,}{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}
to avoid confusion in future