metis Posted April 4, 2011 Share Posted April 4, 2011 How to set the look of the text in the multi-text. Here is my code but it only works when it is in one line: #Include <String.au3> #include <File.au3> $html2 = FileOpen("xd.txt", 0) $sText = FileRead($html2, Default) $array = StringRegExp($sText, 'a(?i)b(.*?)d(?i)e', 3) $ktoty = $array[0] MsgBox(0,"text",$ktoty) $id = _StringBetween($sText,'ab','de') MsgBox("0","",$id[0]) xd.txt a b c d e Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 4, 2011 Moderators Share Posted April 4, 2011 metis, I have absolutely no idea what you are trying to do. You have a text file with different characters on each line - what is your desired outcome? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
metis Posted April 4, 2011 Author Share Posted April 4, 2011 I want to beat me, "C"when I'm in separate lines. When I have all the code xd.txt in one line and show it to me when I am in separate lines that no longer shows SHoW(not need) abcde NOT Show(need) a b c d e Link to comment Share on other sites More sharing options...
smartee Posted April 4, 2011 Share Posted April 4, 2011 I am guessing that English is not your first language (try Google translator). I am also guessing this is what you need: #include <Array.au3> #include <String.au3> $html2 = FileOpen(@ScriptDir & "\xd.txt", 0) $sText = FileRead($html2) $between = _StringBetween(StringReplace($sText, @CRLF, ""), "ab", "de") _ArrayDisplay($between) Link to comment Share on other sites More sharing options...
metis Posted April 4, 2011 Author Share Posted April 4, 2011 Thanks. #include <Array.au3> #include <String.au3> $html2 = FileOpen(@ScriptDir & "\xd.txt", 0) $sText = FileRead($html2) $between = _StringBetween(StringReplace($sText, @CRLF, ""), "ab", "de") MsgBox(0, "text", $between[0]) Link to comment Share on other sites More sharing options...
metis Posted April 4, 2011 Author Share Posted April 4, 2011 i have problem <div style="border: 3px dotted rgb(229, 221, 187); margin: 15px 15px 30px 0px;"> <div style="background-color: rgb(247, 238, 202); padding: 10px 5px 10px 3px;"> <table id="ctl00_CT_ChomikActiveList" style="margin: auto;" border="0" cellpadding="3" cellspacing="3"> <tbody><tr> <td valign="top"> <div class="pictureBox" style="background-image: url ("http://s1376.mefoto.jpg");"> How to download from this "http://s1376.mefoto.jpg" had in String Link to comment Share on other sites More sharing options...
smartee Posted April 5, 2011 Share Posted April 5, 2011 #include <Array.au3> #include <String.au3> $html2 = FileOpen(@ScriptDir & "\xd.txt", 0) $sText = FileRead($html2) $between = _StringBetween(StringReplace($sText, @CRLF, ""), """, """) ;_ArrayDisplay($between) InetGet($between[0],@ScriptDir&"\mypic.jpg") xd.txt<div style="border: 3px dotted rgb(229, 221, 187); margin: 15px 15px 30px 0px;"> <div style="background-color: rgb(247, 238, 202); padding: 10px 5px 10px 3px;"> <table id="ctl00_CT_ChomikActiveList" style="margin: auto;" border="0" cellpadding="3" cellspacing="3"> <tbody><tr> <td valign="top"> <div class="pictureBox" style="background-image: url ("http://i418.photobucket.com/albums/pp265/tashboe3/quotes/peace-4.jpg");"> Link to comment Share on other sites More sharing options...
metis Posted April 5, 2011 Author Share Posted April 5, 2011 EN> That is not what I mean. The idea is to look at the moment (I have 3 codes and I want to look that way(code below)-but my code is not working PL> Nie o to mi chodzi. Chodzi o to by szukał w danym momencie(mam takie 3 kody i chcę aby szukał w ten sposób(kod na dole)-lecz moj to nie działa #include <Array.au3> #include <String.au3> $html2 = FileOpen(@ScriptDir & "\xd.txt", 0) $sText = FileRead($html2) $between = _StringBetween(StringReplace($sText, @CRLF, ""), '<div style="border: 3px dotted rgb(229, 221, 187); margin: 15px 15px 30px 0px;"><div style="background-color: rgb(247, 238, 202); padding: 10px 5px 10px 3px;"><table id="ctl00_CT_ChomikActiveList" style="margin: auto;" border="0" cellpadding="3" cellspacing="3"><tbody><tr><td valign="top"><div class="pictureBox" style="background-image: url ("', '");">') MsgBox(0, "text", $between[0] 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