Search the Community
Showing results for tags 'substring'.
-
I love Autoit, but struggling to find the best way to do this. I have 2 text files.... File1 is Tab Separated and File2 is CSV. I am attempting to read in a line from File1 and split it, then search the contents of File2 for one of the substrings from that split line. If I find a match, then I want to split the matching line and grab needed info from it to complete the record and output the combined record to a file. Example line from File1: 17 123456789 learned 10800 bridging 1/13 Example line from File2: 172.25.17.103,computername.domain,Reservation (active
-
When I am searching a word from a sentence through StringInStr, it is not giving exact match but it is giving the word if the letters in the word are included in it. Ex: If I am searching for a word Sun in a sentence below. Sun is hot today. --> Here it is working as expected. But it is returning a word exist even for below sentence also. even though it is sunday. As sun is there in the word sunday. How to exclude this and only it should return true when it finds the word sun.
- 11 replies
-
- stringinstr
- exact match
-
(and 1 more)
Tagged with:
-
substring search not excluding extra characters
ur posted a topic in AutoIt General Help and Support
I am trying to getan exact word match in searching a substring using function StringInStr. Like my search word is oFSO sentence may contain oFSO or OFSO= and not case-sensitive.so I created conditional syntax as $sentence is the complete sentence and $searchword contains the searching word. If StringInStr($sentence, " "&$searchword&" ") or StringInStr($sentence, " "&$searchword&"=") It is working fine for most cases and it excluding words like ofs,ofs1 ,etc words But if the word is ofso1 (i.e., contains the word we specified + extra characters) then it is not excluding that. Co -
I'm creating a small MsgBox-style GUI window for a login, and I'm giving my $Username input box the default text "DOMAIN\Username". When I run it, the default text is highlighted as expected, but it'd be nicer if I could highlight only the username portion. I realize I could use multiple input fields, but I'd rather not. I'm currently accomplishing this by: GUISetState(@SW_SHOW) Send("{END}+{LEFT 8}")and that technically works, but I was wondering if there was a "right" way to do this.