Discuss RoboTask here
TWSI
Posts: 22 Joined: Sun Apr 05, 2015 2:01 am
Post
by TWSI » Tue Apr 07, 2015 1:50 pm
I need to assign a variable that will extract an email address from each notepad located at position 1 and place this variable robotask (to) sendemail. I need to include all of this in my current tsk file attached.
Thanks again for the help
David
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|210164082
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task7"
Hide=INTEGER|0
ID=INTEGER|2093688538
LogOnAsUser=INTEGER|1
Name=STRING|"Account #000 | Heading"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=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|"20150406"
date2=STRING|"20150406"
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|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[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_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER
[Actions\Action3\Params]
attachcount=STRING|"0"
auth=STRING|"1"
charset=STRING|"iso-8859-1"
from=STRING|"noreplyyahoo.com"
host=STRING|"smtp.gmail.com"
html=STRING|"0"
msg0=STRING|"{TextFile({BodyText})}"
msgcount=STRING|"2"
passwordmode=STRING|"0"
port=STRING|"587"
SSL=STRING|"2"
subject=STRING|"Invoice {ExtractFileNameNoExt({BodyText})} | received today | {DateTime}"
to=STRING|"?????"
user=STRING|"invoicing@gmail.com"
[Actions\Action4]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file C:\sentfile\sentlog.txt"
Params=FOLDER
[Actions\Action4\Params]
encode=STRING|"0"
fileexists=STRING|"1"
filname=STRING|"C:\sentfile\sentlog.txt"
line0=STRING|"{ExtractFileNameNoExt({BodyText})} {DateTime} Sucessfull"
linecount=STRING|"1"
suppress=STRING|"0"
[Actions\Action5]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER
[Actions\Action5\Params]
destdir=STRING|"C:\sentfile\"
f_count=STRING|"2"
file0=STRING|"{BodyText}"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"1"
rename=STRING|"0"
renamemask=STRING|"*.*.new"
subdir=STRING|"0"
system=STRING|"1"
[Actions\Action6]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
UnigueID=INTEGER|1121775689
[Events\Event1\Params]
chg=STRING|"1"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"1"
folder1=STRING|"c:\senfile\"
foldercount=STRING|"1"
incmask=STRING|"*.txt"
interval=STRING|"60"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
pass=STRING|"0"
passmode=STRING|"1"
saveresults=STRING|"0"
subfolders1=STRING|"0"
Oleg
Site Admin
Posts: 3202 Joined: Thu Jan 01, 1970 1:00 am
Contact:
Post
by Oleg » Tue Apr 07, 2015 2:07 pm
I need the example of text.
Oleg Yershov
TWSI
Posts: 22 Joined: Sun Apr 05, 2015 2:01 am
Post
by TWSI » Tue Apr 07, 2015 3:39 pm
please see attached notepad print screen
Attachments
See attached NOTEPAD.jpg (27.39 KiB) Viewed 15911 times
Oleg
Site Admin
Posts: 3202 Joined: Thu Jan 01, 1970 1:00 am
Contact:
Post
by Oleg » Tue Apr 07, 2015 4:38 pm
See corrected task below.
Look at the steps #3, #4
Also I have corrected the trigger. You specified incorrect folder name.
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|317955339
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task1"
Hide=INTEGER|0
ID=INTEGER|2093688538
LogOnAsUser=INTEGER|1
Name=STRING|"Account #000 | Heading"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=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|"20150406"
date2=STRING|"20150406"
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|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"
[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_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER
[Actions\Action4\Params]
attachcount=STRING|"0"
auth=STRING|"1"
charset=STRING|"iso-8859-1"
from=STRING|"noreplyyahoo.com"
host=STRING|"smtp.gmail.com"
html=STRING|"0"
msg0=STRING|"{TextFile({BodyText})}"
msgcount=STRING|"2"
passwordmode=STRING|"0"
port=STRING|"587"
SSL=STRING|"2"
subject=STRING|"Invoice {ExtractFileNameNoExt({BodyText})} | received today | {DateTime}"
to=STRING|"{email}"
user=STRING|"invoicing@gmail.com"
[Actions\Action5]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file C:\sentfile\sentlog.txt"
Params=FOLDER
[Actions\Action5\Params]
encode=STRING|"0"
fileexists=STRING|"1"
filname=STRING|"C:\sentfile\sentlog.txt"
line0=STRING|"{ExtractFileNameNoExt({BodyText})} {DateTime} Sucessfull"
linecount=STRING|"1"
suppress=STRING|"0"
[Actions\Action6]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER
[Actions\Action6\Params]
destdir=STRING|"C:\sentfile\"
f_count=STRING|"2"
file0=STRING|"{BodyText}"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"1"
rename=STRING|"0"
renamemask=STRING|"*.*.new"
subdir=STRING|"0"
system=STRING|"1"
[Actions\Action7]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
UnigueID=INTEGER|203047950
[Events\Event1\Params]
chg=STRING|"1"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"1"
folder1=STRING|"c:\sendfile\"
foldercount=STRING|"1"
incmask=STRING|"*.txt"
interval=STRING|"60"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
pass=STRING|"0"
passmode=STRING|"1"
saveresults=STRING|"0"
subfolders1=STRING|"0"
Oleg Yershov
TWSI
Posts: 22 Joined: Sun Apr 05, 2015 2:01 am
Post
by TWSI » Tue Apr 07, 2015 4:49 pm
Oh got it
Thanks again......
David