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 

InStr Function skipping literal commas

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
AiKscroll



Joined: 06 Jun 2005
Posts: 179
Location: Northern Virginia

PostPosted: Wed Nov 15, 2006 10:42 pm    Post subject: InStr Function skipping literal commas Reply with quote

AHK seems to be skipping any `, commas and giving a blank parameter error message.

Use this code to see what I mean:
Code:
var = abc,123
comma := InStr(var, `,)
msgbox, %comma%

Output should be 4 but I get an error instead.
_________________
_AiK
Back to top
View user's profile Send private message AIM Address
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Wed Nov 15, 2006 11:16 pm    Post subject: Reply with quote

It's an expression so use "," instead.
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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