AutoHotkey Community

It is currently May 24th, 2012, 1:56 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: InStr()
PostPosted: November 23rd, 2009, 12:35 pm 
Offline

Joined: November 23rd, 2009, 12:28 pm
Posts: 4
this line:

theposLast := InStr(leString,"#",0)

should give le position of the last occurrence of # in the string but always give the position of the first.

In fact it seems that it always gives the position of the first occurrence, regardless of the last parameter.

Could u confirm this is a bug or tell me my wrong ?

TIA

[Moved from Bug Reports forum. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 12:49 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
The InStr must have all 4 parameters to search reversed:
InStr(Haystack, Needle [, CaseSensitive = false, StartingPos = 1]):
Use
Code:
InStr(LeString,"0",false,0)

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 1:03 pm 
Offline

Joined: November 23rd, 2009, 12:28 pm
Posts: 4
GRRRRR.......

Lost 1 hour for this NOOB mistake :oops:

Thx a lot m8


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: Albireo, Bing [Bot], fragman, jyloup, Pulover, tantalus00 and 20 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