Jump to content

Recommended Posts

Posted (edited)

Welcome.

How to read the text and add it to the gui.

The program aims to find title="trwa"

Then copy the text "prog_title">Prawda czy fałsz - pogromcy mitów: James Bond - wydanie specjalne (2)

and display in gui.

16:00 <span class="bar bar_40" title="trwa"></span></th><td><a href="/tv/Prawda-Czy-Falsz-Pogromcy-Mitow-James-Bond-Wydanie-Specjalne-2-688164" class="prog_title">Prawda czy fałsz - pogromcy mitów: James Bond - wydanie specjalne (2)</a><div class="genre">serial dokumentalny</div><p class="excerpt">Adam Savage i Jamie Hyneman, eksperci od efektów specjalnych, poddają testom mity, legendy i zdarzenia uznawane za historyczne.</p></td></tr><tr class="prog cat_ser even"><th>

Edited by jacq
Posted (edited)

One simple way to do this using the StringInStr() and _StringBetween() functions.

#include <String.au3>

$String = '16:00 <span class="bar bar_40" title="trwa"></span></th><td><a href="/tv/Prawda-Czy-Falsz-Pogromcy-Mitow-James-Bond-Wydanie-Specjalne-2-688164" class="prog_title">Prawda czy falsz - pogromcy mitów: James Bond - wydanie specjalne (2)</a><div class="genre">serial dokumentalny</div><p class="excerpt">Adam Savage i Jamie Hyneman, eksperci od efektów specjalnych, poddaja testom mity, legendy i zdarzenia uznawane za historyczne.</p></td></tr><tr class="prog cat_ser even"><th>'

$String_Start = 'class="prog_title">'
$String_End   = '</a><div class="genre">'

If StringInStr($String, 'title="trwa"') Then
    $Array = _StringBetween($String, $String_Start, $String_End)
    ConsoleWrite($Array[0] & @LF)
EndIf
Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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
×
×
  • Create New...