The ThinBasic Program
(Save as ExtractImages.tBasic)
Code: Select all
USES "FILE"
Global infile as string
Global outfile as string
dim i as long
dim Texto as string
dim cuantos_tag as long
dim src as string
dim tags as string
dim found as string
'-----------------------------------------
' this lines are for NeoBook compatibility
'<<<infile>>>
'<<<outfile>>>
'-----------------------------------------
texto = FILE_LOAD(infile)
cuantos_tag = parseCount(texto,"<img")
if cuantos_tag > 1 then
for i = 2 to cuantos_tag
tags = parse$(texto,"<img",i)
src = parse$(tags,"src=",2)
found = parse$(src,chr$(34),2)
Texto = REMOVE$(Texto, found)
Next i
End if
FILE_SAVE(outfile, Texto)
MsgBox (0,"Done")
using a button in a NeoBook program, put this code into the actions properties:
Code: Select all
ae_TB_Reset
ae_TB_Init
ae_TB_LoadScript "ExtractImages.tBasic" "F"
ae_TB_SetVar "infile" "MiSelected.EML" "S" <-- Change as needed
ae_TB_SetVar "outfile" "MiProcessed.EML" "S" <-- Change as needed
ae_TB_Run ""
Be sure the thinCore.dll file should be located at the same folder of the Neobook PUB
Be sure the thinBasic_File.dll file should be located at the "BIN" folder within the program folder
Run the program using F9
Enjoy !