adik2dmax666 Posted January 19, 2011 Share Posted January 19, 2011 $read1 = FileRead("C:\RF Online\NetLog\rfclient.log") $read2 = FileRead("C:\Program Files\Level Up Games\RF online\NetLog\rfclient.log") $read5 = FileRead("C:\Program Files (x86)\Level Up Games\RF online\NetLog\rfclient.log") $read3 = FileRead("D:\RF Online\NetLog\rfclient.log") $read4 = FileRead("D:\Program Files\Level Up Games\RF online\NetLog\rfclient.log") $read6 = FileRead("D:\Program Files (x86)\Level Up Games\RF online\NetLog\rfclient.log") $read7 = FileRead("C:\Program Files\RF\RF online\NetLog\rfclient.log") $read8 = FileRead("D:\Program Files\RF\RF online\NetLog\rfclient.log") $username1 = _StringBetween($read1, "SetAccountID", "^^", -1) $username2 = _StringBetween($read2, "SetAccountID", "^^", -1) $username3 = _StringBetween($read3, "SetAccountID", "^^", -1) $username4 = _StringBetween($read4, "SetAccountID", "^^", -1) $username5 = _StringBetween($read5, "SetAccountID", "^^", -1) $username6 = _StringBetween($read6, "SetAccountID", "^^", -1) $username7 = _StringBetween($read7, "SetAccountID", "^^", -1) $username8 = _StringBetween($read8, "SetAccountID", "^^", -1) $size1 = UBound($username1) $size2 = UBound($username2) $size3 = UBound($username3) $size4 = UBound($username4) $size5 = UBound($username5) $size6 = UBound($username6) $size7 = UBound($username7) $size8 = UBound($username8) can it be simplified to this? i dont know if its correct because i run on linux Local $readctr,$read[8],$username[8],$size[8],$arr_read[8] = ["C:\RF Online\NetLog\rfclient.log", "C:\Program Files\Level Up Games\RF online\NetLog\rfclient.log","D:\RF Online\NetLog\rfclient.log","D:\Program Files\Level Up Games\RF online\NetLog\rfclient.log","C:\Program Files (x86)\Level Up Games\RF online\NetLog\rfclient.log","D:\Program Files (x86)\Level Up Games\RF online\NetLog\rfclient.log","C:\Program Files\RF\RF online\NetLog\rfclient.log","D:\Program Files\RF\RF online\NetLog\rfclient.log"] For $i = 0 to 7 ;ConsoleWrite($arr_read[$i] & @LF) $read[$i] = FileRead($arr_read[$i]) $username[$i] = _StringBetween($read[$i], "SetAccountID", "^^", -1) $size[$i] = Ubound($username[$i]) Next First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack. -George Carrette[sub]GD Keylogger Creator (never released)[/sub][sub]Garena Autojoin v3.0[/sub] Link to comment Share on other sites More sharing options...
bo8ster Posted January 19, 2011 Share Posted January 19, 2011 the line $username[$i] = _StringBetween($read[$i], "SetAccountID", "^^", -1) is invalid You cannot refer to $read2 like $read[$i]. I don't think this can be done in AutoIt but I could be wrong. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
guinness Posted January 19, 2011 Share Posted January 19, 2011 $StringBetween = _StringBetween($read[$i], "SetAccountID", "^^", -1) is invalid $username[$i] = $StringBetween[0] You cannot refer to $read2 like $read[$i]. I don't think this can be done in AutoIt but I could be wrong.In the Second Example this is correct, but if you are talking about having a normal Variable e.g. $Read1 = "Something", $Read2 = "Something" then have a look at Eval() in the Helpfile! $Read1 = "Read1" $Read2 = "Read2" $Read3 = "Read3" For $A = 1 To 3 ConsoleWrite(Eval("Read" & $A) & @CRLF) Next UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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