dersiniar Posted February 22, 2022 Posted February 22, 2022 (edited) #Include <File.au3> #Include <String.au3> #Include <Array.au3> $vFile = @ScriptDir & "\cmp.txt" Local $aFile Local $aFinal[0] _FileReadToArray($vFile, $aFile) For $i = 1 to $aFile[0] $sTemp = _StringBetween($aFile[$i], "All selected attributes", "Long identifier") If $sTemp <> 0 Then _ArrayAdd($aFinal, $sTemp[0]) Next _ArrayDisplay($aFinal) I love this, it helped me alot, but, my txt file has more then 40+ strings that match. How i can get only one match Edited February 22, 2022 by dersiniar
dersiniar Posted February 22, 2022 Posted February 22, 2022 24 minutes ago, dersiniar said: #Include <File.au3> #Include <String.au3> #Include <Array.au3> $vFile = @ScriptDir & "\cmp.txt" Local $aFile Local $aFinal[0] _FileReadToArray($vFile, $aFile) For $i = 1 to $aFile[0] $sTemp = _StringBetween($aFile[$i], "All selected attributes", "Long identifier") If $sTemp <> 0 Then _ArrayAdd($aFinal, $sTemp[0]) Next _ArrayDisplay($aFinal) I love this, it helped me alot, but, my txt file has more then 40+ strings that match. How i can get only one match Figured out allready, Local $Result = $aFinal[1] MsgBox(0, "Price", $Result)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now