Text extraction of a delimited file

Discuss RoboTask here
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Text extraction of a delimited file

Post by Oleg »

You made mistakes in steps #4 and #5. See screenshot
error.png
error.png (19.31 KiB) Viewed 9559 times
Also see here corrected task:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task405"
Hide=INTEGER|0
ID=INTEGER|1969860690
LogOnAsUser=INTEGER|1
Name=STRING|"Copy of How to parse line27 (v2)"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action13=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER

[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20150412"
date2=STRING|"20150412"
destvar=STRING|"BODYTEXT"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\sendfile\*.txt"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
sort=STRING|"1"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action10]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""ADDON"" with value ""{addon}{EOL}item{num} = {tmp({num})}"""
Params=FOLDER

[Actions\Action10\Params]
expand=STRING|"1"
varname=STRING|"ADDON"
varvalue=STRING|"{addon}{EOL}item{num} = {tmp({num})}"

[Actions\Action11]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action12]
ActionID=STRING|"A_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER

[Actions\Action12\Params]
attachcount=STRING|"0"
auth=STRING|"1"
charset=STRING|"iso-8859-1"
from=STRING|"noreply@tnkeyips.com"
host=STRING|"smtp.gmail.com"
html=STRING|"1"
msg0=STRING|"<html>"
msg1=STRING|"<head>"
msg11=STRING|"<h2 style=""text-align: center;""><strong>INVOICE</strong></h2>"
msg12=STRING|"</body>"
msg13=STRING|"</html>"
msg14=STRING|"</p>"
msg17=STRING|"{TextFile({BodyText})}"
msg2=STRING|"<title></title>"
msg3=STRING|"</head>"
msg4=STRING|"<body>"
msg5=STRING|"<h2 style=""text-align: right;""><img alt="""" src=""http://www.kkeyips.com/images/kkurnkey_ips_logo.png"" style=""width: 218px; height: 138px; float: left;"" />Kurnkey Industrial<br />"
msg6=STRING|"13249 Karton Cir<br />"
msg7=STRING|"Palm, CA 90705<br />"
msg8=STRING|"Ph. 562.944.6994<br />"
msg9=STRING|"&nbsp;</h2>"
msgcount=STRING|"18"
password=STRING|"3897725224286239089"
passwordmode=STRING|"0"
port=STRING|"587"
SSL=STRING|"2"
subject=STRING|"Invoice {ExtractFileNameNoExt({BodyText})} | received today | {DateTime}"
to=STRING|"{email}"
user=STRING|"tipsinvoicing@gmail.com"

[Actions\Action13]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action2]
ActionID=STRING|"A_FILE_WAIT"
Enabled=INTEGER|-1
Name=STRING|"Waiting {BodyText} file for 60 sec"
Params=FOLDER

[Actions\Action2\Params]
filename=STRING|"{BodyText}"
timeout=STRING|"60"

[Actions\Action3]
ActionID=STRING|"A_TXT_EXTRACTLINE"
Enabled=INTEGER|-1
Name=STRING|"TXT Extract Line"
Params=FOLDER

[Actions\Action3\Params]
external=STRING|"1"
filename=STRING|"{BodyText}"
linecount=STRING|"0"
linenum=STRING|"1"
variable=STRING|"email"

[Actions\Action4]
ActionID=STRING|"A_TXT_EXTRACTLINE"
Enabled=INTEGER|-1
Name=STRING|"TXT Extract Line"
Params=FOLDER

[Actions\Action4\Params]
external=STRING|"1"
filename=STRING|"{BodyText}"
linecount=STRING|"1"
linenum=STRING|"26"
variable=STRING|"cnt"

[Actions\Action5]
ActionID=STRING|"A_TXT_EXTRACTLINE"
Enabled=INTEGER|-1
Name=STRING|"TXT Extract Line"
Params=FOLDER

[Actions\Action5\Params]
external=STRING|"1"
filename=STRING|"{BodyText}"
linecount=STRING|"0"
linenum=STRING|"27"
variable=STRING|"line27"

[Actions\Action6]
ActionID=STRING|"A_VARIABLES_DELIMITED"
Enabled=INTEGER|0
Name=STRING|"Delimit Variable"
Params=FOLDER

[Actions\Action6\Params]
colon=STRING|"0"
comma=STRING|"1"
other=STRING|"0"
otherchar=STRING|"*"
quote=STRING|"0"
semocolon=STRING|"0"
space=STRING|"0"
spaceasone=STRING|"0"
string=STRING|"{line27}"
tab=STRING|"0"
variable=STRING|"tmp"

[Actions\Action7]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""ADDON"" with value """""
Params=FOLDER

[Actions\Action7\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"ADDON"

[Actions\Action8]
ActionID=STRING|"A_LOOP_SIMPLE"
Enabled=INTEGER|-1
Name=STRING|"Simple Loop"
Params=FOLDER

[Actions\Action8\Params]
begin=STRING|"1"
end=STRING|"{cnt}"
variable=STRING|"NUM"

[Actions\Action9]
ActionID=STRING|"A_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""num"""
Params=FOLDER

[Actions\Action9\Params]
incement=STRING|"-1"
vaiable=STRING|"num"
Oleg Yershov
TWSI
Posts: 22
Joined: Sun Apr 05, 2015 2:01 am

Re: Text extraction of a delimited file

Post by TWSI »

Ok thank you!
Post Reply