ChrisL Posted November 19, 2009 Share Posted November 19, 2009 (edited) I can't get this to work and I don't understand why #include <String.au3> #include <Array.au3> $Str = FileRead("test.txt") Msgbox(0,"","StringLen " & StringLen($Str)) $Data = _StringBetween($str,"<Order>", "</Order>",-1,1) Msgbox(0,"",@error) _ArrayDisplay($Data) Any help please Thanks Edit: All sorted attachment removed Edited November 19, 2009 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
funkey Posted November 19, 2009 Share Posted November 19, 2009 (edited) $Str = FileRead("test.txt") Msgbox(0,"","StringLen " & StringLen($Str)) $Data = StringRegExp($Str, "<Order>(.*?)</Order>", 3) Msgbox(0,@error, $Data[0] Edit: _ArrayDisplay fails: #include <String.au3> #include <Array.au3> $Str = FileRead("test.txt") Msgbox(0,"","StringLen " & StringLen($Str)) $Data = _StringBetween($str,"<Order>", "</Order>",-1,1) Msgbox(0,@error, $Data[0]) _ArrayDisplay($Data) Edited November 19, 2009 by funkey Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
Xenobiologist Posted November 19, 2009 Share Posted November 19, 2009 The problem is ArrayDisplay #include <String.au3> #include <Array.au3> $Str = FileRead("test.txt") MsgBox(0, "", "StringLen " & StringLen($Str)) $Data = _StringBetween($Str, "<Order>", "</Order>", -1) MsgBox(0, "", @error) ConsoleWrite(_ArrayToString($Data) & @CRLF) _ArrayDisplay($Data) Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ChrisL Posted November 19, 2009 Author Share Posted November 19, 2009 Thanks funkey but did you test it, cos it gives the same result as stringBetween... ie nothing. [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted November 19, 2009 Author Share Posted November 19, 2009 (edited) The problem is ArrayDisplayAhhhhh Cool OK thanks.I have no problem if arrayDisplay can't cope I just need the data.Cheers Edited November 19, 2009 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Mat Posted November 19, 2009 Share Posted November 19, 2009 (edited) maybe becouse you are trying to get a listview to show a 10917 character string. There is a string in $Data[0], the listview just can't show it Mat Proof: #include <String.au3> $Str = FileRead("test.txt") Msgbox(0, "Total", "StringLen " & StringLen($Str)) $Data = _StringBetween($str,"<Order>", "</Order>", -1) MsgBox (0, "Between", "StringLen " & StringLen ($Data[0])) MsgBox (0, "First 200 characters", StringLeft ($Data[0], 200)) You guys post so fast, by the time i'm done i'm only 6th Edited November 19, 2009 by Mat AutoIt Project Listing 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