Jump to content

Search the Community

Showing results for tags 'stringinstr'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 17 results

  1. Hi guys, really need your help. How can i check every 5 min if my text file include String "Markus". Btw i need this function to run on my Logs file that are updated whenever some event is triggered (logs appear in same txt file). So i did test some codding to test isit possible. But somehow, it only detect for the 1st time String check, and keep coming the same output every time, it didnt check/read on the current txt file that has been updated. For this purpose i update txt file manually so i put String "Markus" and check, and try to remove it agn. Here is my code:
  2. Hey there! I've been developing a artificial intelligence. My first hard task was letting the A.I know when a sentence is found in memory with different words What i tried to do here is simply, get all the words in user sentence that could be used as a identifier example: Steve Jobs then identify the sentence purpose with the words we found in the past "for" loop example: Do/Know/You/Who/Steve/Jobs Compare the example in the following matching sentences in memory. 1-St
  3. Hi guys! I have these checkbox that I'm trying to click on. They have the same inner-text string but a different ID. Sometime there can be as many as 4 checkbox with the same string but the ID is always different. I tried a few methods down below but I'm unable to make any real results. Any suggestions or solutions I would appreciate it very much. <ul><li class="cx-list-item-wrapper" data-day="Aug 2 2018 07:27:37 GMT-0700 (Pacific Daylight Time)"><div class=""><div class="cx-list-item-container"><div class=&q
  4. Hi everybody, i have a log file with several entries like the following one: INFO [26.04.2017 11:37:48] [main] XML-Data: <online-activation> <general> <userid>XYZ</userid> <mac-address/> <OU>VG-DE</OU> <ROLE>KDT</ROLE> <FOA>PRO;FC;DOM;MDD</FOA> <BRD>XYZ;IMP</BRD> </general> <applications> <app expiration-date="2017-10-01" name="BB-INFO"/> <app expiration-date="2017-10-01" name="MMSKD"/>
  5. I have a good handle on how to read a file line by line, and search for a given string. Basically using, FileOpen, FileReadLine, and StringInStr. I have been trying to figure out why my search keeps coming back with no match. For example, if my string line was "Where is Waldy", and I was searching for Waldy that comes back fine. But in my file, Let's say it is Where is "Waldy" So i read that line in and do a search for Waldy, but i comes back with no match since there is quotes around it. Is there a way to resolve this? Here is my actual example The
  6. Hello, I want to be able to search for multiple strings and if any of the strings are found I want it returned which one it is. I've been able to search for multiple strings using the OR command, but I'm not sure how I am supposed to make it return which of my strings is found. I've given an example below If StringInStr($html, Batman) OR StringInStr($html, Superman) Then MsgBox(0, "Success", "The string found was: Superman") EndIf So it will search for the two strings and whichever it founds it will return me with. How can I make that work?
  7. #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Local $path="C:\Users\rootx\Desktop\Nuova cartella",$mask = "*.jpg;*.png;*.ico",$Pos $FileArr = _FileListToArrayRec($path,$mask,1,1,1,2) For $x = 1 to UBound($FileArr)-1 If $Pos = StringInStr($FileArr[$x],"-") Then ConsoleWrite("------"&$FileArr[$x]&@CRLF) Else ConsoleWrite($FileArr[$x]&@CRLF) FileDelete($FileArr[$x]) EndIf ConsoleWrite($x&@CRLF) Next ConsoleWrite($x-1&@CRLF) I would write a loop that individual
  8. Hello, As always, sorry for my bad english. here is the code i have #include <File.au3> #include <String.au3> $file1 = "d:\doppioniautoit\international.txt" FileOpen($file1, 0) $file2 = "d:\doppioniautoit\standard.txt" FileOpen($file2, 0) For $i = 1 to _FileCountLines($file1) $line = FileReadLine($file1, $i) $aExtract = _StringBetween($line, "(", ")") ;MsgBox(0, $line, $aExtract[0]) $itime = TimerInit() For $x = 1 to _FileCountLines($file2) $line2 = FileReadLine($file2, $x) Local $iPosition = StringInStr($l
  9. Good Morning All, I'm hoping someone here can work their AutoIT magic I'm doing a pretty "simple" string search in a HUGE variable. But I'm doing the basics almost straight out of the Help File... ( sorry, I'm leaving out my main code for privacy reasons ) Local $hFileOpen = FileOpen($sFilePath, $FO_READ) Local $sFileRead = FileRead($hFileOpen) Local $sEmailPosition01 = StringInStr ($sFileRead, $sEmailAddress )Everything looks good with my troubleshooting I ran IsString against $sFileRead and $sEmailAddress and was okay: "The variable is a string" So then I ran StringLen($sFileRead) and go
  10. #include <MsgBoxConstants.au3> #include <array.au3> $File = FileOpen(@DesktopDir & "\email addresses 11-17-2015.txt") $aArray = FileReadToArray($File) For $i=0 To UBound($aArray)-1 Local $x = StringInStr($aArray[$i],"@") If @error Then MsgBox(0,0,$aArray[$i] & " on line " & $i+1 & " is not a valid address.") EndIf Next MSgBox(0,0,"Done")I have a list of 3600 email addresses and I need to check if there is an @ symbol in the email address. This is my code. I only get a message box with "Done" e
  11. I was working on something last night and decided to use StringRegExpReplace() for a config file, I never noticed that you cant just "overwrite" the file with the update so easily it required a few more pieces of code to work properly. Is this the simplest way (what I used) and while I searched for it and did not find it do we have or will we have a RegEx equivalent for _ReplaceStringInFile()? $sFile = FileRead(@ScriptDir & "\test.txt") $hFile = FileOpen(@ScriptDir & "\test.txt", 2) $sNewContent = StringRegExpReplace($sFile, "(test)", "new$1")
  12. 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.
  13. 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
  14. Hi guys, I didn't find an answer to my problem in other do until topics, that's why I am here. I need to pause my script until the text in a static control changes to something like "File prepared" or "New image". Here is what I tried: Do Sleep(500) $Status = ControlGetText("Prepare and Resize", "", "[CLASS:Static; Instance:8]") Until StringInStr($Status, "prepared") > 0 AutoIt doesn't like it after "Until" and complains: Statement cannot be just an expression. Is there another way to say that a word shall be included in a static control? Glad for help.
  15. Hi, im struggling with this issue, StringInStr could do the trick, but it doesn't seem to support 3 different strings to compare, StringRegExp is messy, i tried some ways, help was no help, so i hope you can. So this will exemplify what i need: $StrDropCheckFolder = StringInStr($__aGUIDropFiles[$i], ".mp3;.wav;.wma", 2) Anything that contains those = true I made the StringRegExp work, but only with one string at a time. Couldn't find in help file the corresponding OR parameter.. and OR doesn't work in StringInStr. Best regards.
  16. I've bumped on next problem: I have txt file with bunch of mails, and I want to write script that search for specific one and put it in other txt file. Example: Email1@gmail.com Email2@gmail.com Email3@yahoo.com Email4@hotmail.com Now what I want is to search if domain is @gmail and output entire mail in new file. I have tried StringInString but I have no idea what to do with number of place where is found line starting. I'm pretty sure this should be done with StringCompare but I seams not to be able to find anyone with similar task who have posted online about this. I would
  17. Hello, i'm making this tool to convert "English" letters To "Arabic" letters but i have some problems in reading "input1" Notice: it isn't translator!! here's the script: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> $Form1 = GUICreate("Form1", 257, 155, 339, 282) $Input1 = GUICtrlCreateInput("", 32, 32, 201, 21) $Input2 = GUICtrlCreateInput("", 32, 88, 201, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_RIGHT)) $Label1 = GUICtrlC
×
×
  • Create New...