Lister: how to Strip html tags "automatically" ?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
lotharbz
Junior Member
Junior Member
Posts: 4
Joined: 2020-07-15, 16:31 UTC

Lister: how to Strip html tags "automatically" ?

Post by *lotharbz »

Hello,
to strip html tags I do the following:
- open the file with Lister (F3)
- save the file (File/Save as... + <enter>)
Is it possible to do this automatically, eventually using a script?

TIA
Bye, Maurizio.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6495
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Strip html tags "automatically"

Post by *Horst.Epp »

lotharbz wrote: 2020-07-15, 16:40 UTC Hello,
to strip html tags I do the following:
- open the file with Lister (F3)
- save the file (File/Save as... + <enter>)
Is it possible to do this automatically, eventually using a script?

TIA
Bye, Maurizio.
Of course its possible to to such job with a script.
But this is not related to TC.
And whats the reason for doing this ?
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Strip html tags "automatically"

Post by *Stefan2 »

Hi and welcome, Maurizio.

Yes, you can do that by an script, you can use for example VBScript, JavaScript, PowerShell or AutoHotkey.
Once you have found such an script, TC can execute that on a selected file or all selected files, or on a whole folder.

We can help you on executing such an script via a button or a keyboard shortcut.
For an first step, right click a button, open for modifying and then click the [Help]-button.

Also, in past I have had a few command line tools which were able to do that...

 
lotharbz
Junior Member
Junior Member
Posts: 4
Joined: 2020-07-15, 16:31 UTC

Re: Strip html tags "automatically"

Post by *lotharbz »

Hi,
thanks for the answers. I try to explain it better. This is what I do.
Move the cursor over an AFile.html file. Then press the following sequence of keys:
<F3> open the file with internal Lister
<Alt+F> <A> open the "Save as..." dialog box
<Enter> save the file using the name proposed by the Lister, that is AFile.html.txt
<Esc> close the lister.
By this way I obtain a new file with html tags stripped out.

Of course I would like to do all this in one shot, and this is why I ask in the forum :-)

Maybe the more generic question should be if is it possibile to interact with internal lister using a script.

TIA
Bye, Maurizio.
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Strip html tags "automatically"

Post by *Stefan2 »

You could automate this by using AutoHotkey and some SendKey commands....

FAQs: automate/script TC with AutoHotkey AHK
viewtopic.php?p=350976#p350976

Something like that (not sure about the correct syntax right now, but if you want, surly somebody will help you)
* select an file
* execute the script, which will then:
- sendmessage "903" to TC (cm_List=903;View with Lister ; your <F3>)
- if Lister class is active
- if language is English
- send !F
- send A
- send {Enter}
- send {Escape}

The call of such an script can be done via button or keyboard shortcut.

?


 
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Strip html tags "automatically"

Post by *Hacker »

A quick and dirty AHK script that is activated by Win-F3 would look like this:

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
#F3::
	Send, {F3}
	WinWaitActive, ahk_class TLister
	Send, !fa{Enter}
	WinWaitActive, ahk_class TLister
	Sleep, 1000
	WinClose, ahk_class TLister
Return
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
lotharbz
Junior Member
Junior Member
Posts: 4
Joined: 2020-07-15, 16:31 UTC

Re: Strip html tags "automatically"

Post by *lotharbz »

Very very interesting! I'll give it a try.

Thank you!

Bye, Maurizio.
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Strip html tags "automatically"

Post by *vdijken »

For me this method is quite useless. Links are placed between {}, and most important: the layout is gone. There must be better ways. But if you can automate that, I am not sure.
lotharbz
Junior Member
Junior Member
Posts: 4
Joined: 2020-07-15, 16:31 UTC

Re: Strip html tags "automatically"

Post by *lotharbz »

For me is enough. I'm using this method to compare the actual web page with the previous one. This way is more simpler to see what is changed in the content.

Bye, Maurizio.
Post Reply