n9mfk9 Posted January 10, 2008 Share Posted January 10, 2008 Hi everyone herer is my code This is the error i get (25) : ==> Subscript used with non-Array variable.: $tag1[$a] = '%'& $aArray1[$a]&'%' how can i fix this Thanks expandcollapse popup#include <String.au3> #include <array.au3> Dim $tag1 Dim $tagname3 $file = FileOpen("tagslist.txt", 0) $fileout = FileOpen("myphp.txt", 1) ;Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $aArray1 = _StringBetween($line, '%', '%') If Not @error Then ; _ArrayDisplay($aArray1, 'Default Search') ;MsgBox(0,$aArray1) For $a = 0 To UBound($aArray1) - 1 $tag1[$a] = '%'& $aArray1[$a]&'%' $tagname3[$a] = $aArray1[$a] $tagname3[$a] = StringReplace($tagname3[$a],'-','_') $tagname3[$a] = StringReplace($tagname3[$a],'<','LT') $tagname3[$a] = StringReplace($tagname3[$a],'>','GT') $tagname3[$a] = StringReplace($tagname3[$a],'=','') $tagname3[$a] = StringReplace($tagname3[$a],'/','_') $tagname3[$a] = StringReplace($tagname3[$a],',','CM') FileWrite($fileout, $tag1[$a]) ;MsgBox(0,'',$aArray1[$a]) ;$aArray1[$a] = "" & $aArray1[$a] & "%" Next ; $a = @CRLF & "|" ;$output = "|%" & _ArrayToString($aArray1, @CRLF & "|%") ;FileWrite($fileout, $output & @CRLF) EndIf WEnd FileClose($fileout) FileClose($file) Link to comment Share on other sites More sharing options...
/dev/null Posted January 10, 2008 Share Posted January 10, 2008 how can i fix this Thankswithout the file tagslist.txt, nobody can tell you!CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
n9mfk9 Posted January 10, 2008 Author Share Posted January 10, 2008 Sorry i for got it Beautagslist.txt Link to comment Share on other sites More sharing options...
slaughter Posted January 10, 2008 Share Posted January 10, 2008 expandcollapse popup#include <String.au3> #include <array.au3> Dim $tag1[1] Dim $tagname3[1] $file = FileOpen("tagslist.txt", 0) $fileout = FileOpen("myphp.txt", 1) ;Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $aArray1 = _StringBetween($line, '%', '%') If Not @error Then _ArrayDisplay($aArray1, 'Default Search') ;MsgBox(0,$aArray1) For $a = 0 To UBound($aArray1) - 1 ReDim $tag1[UBound($aArray1)] ReDim $tagname3[UBound($aArray1)] $tag1[$a] = '%'& $aArray1[$a]&'%' $tagname3[$a] = $aArray1[$a] $tagname3[$a] = StringReplace($tagname3[$a],'-','_') $tagname3[$a] = StringReplace($tagname3[$a],'<','LT') $tagname3[$a] = StringReplace($tagname3[$a],'>','GT') $tagname3[$a] = StringReplace($tagname3[$a],'=','') $tagname3[$a] = StringReplace($tagname3[$a],'/','_') $tagname3[$a] = StringReplace($tagname3[$a],',','CM') FileWrite($fileout, $tag1[$a]) ;MsgBox(0,'',$aArray1[$a]) ;$aArray1[$a] = "" & $aArray1[$a] & "%" Next ; $a = @CRLF & "|" ;$output = "|%" & _ArrayToString($aArray1, @CRLF & "|%") ;FileWrite($fileout, $output & @CRLF) EndIf WEnd FileClose($fileout) FileClose($file) problems: 1 variables was not set as array 2 Problem with array size Just redim it to a new size each time if you don't know what actual size is gonna be. You are welcome In progress: Windows Server bruteforce GUARD Admin Tools (Remote client control) Bypasing firewall Old stuff: [font="Verdana;"]MD5 Auto Update Calendar XP SS multi usser server & client Autoit Remote Control (ARC)[/font] Link to comment Share on other sites More sharing options...
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