Jump to content

search text multilevel in txt


Recommended Posts

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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

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

(&quot;http://s1376.mefoto.jpg&quot;);">

How to download from this "http://s1376.mefoto.jpg" had in String

Link to comment
Share on other sites

#include <Array.au3>
#include <String.au3>

$html2 = FileOpen(@ScriptDir & "\xd.txt", 0)
$sText = FileRead($html2)

$between = _StringBetween(StringReplace($sText, @CRLF, ""), "&quot;", "&quot;")
;_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

(&quot;http://i418.photobucket.com/albums/pp265/tashboe3/quotes/peace-4.jpg&quot;);">
Link to comment
Share on other sites

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
(&quot;', '&quot;);">')
 MsgBox(0, "text", $between[0]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...