Extract specific text from a file and

Discuss RoboTask here
Post Reply
msbtrp23
Posts: 12
Joined: Mon Sep 03, 2012 7:37 am

Extract specific text from a file and

Post by msbtrp23 »

here is the deal: Everyday a got text file to my inbox folder from my CEO which says when should i stop the system (application server) and call him. But i don't exactly now when does the text file comes. I know i could monitor the folder and get the message about it, but I want to get the text in the file as a message form and also I should resend the same message to the accountants at the same time. Can you help me Oleg?
deesloop
Posts: 70
Joined: Wed Feb 25, 2009 3:44 am

Extract specific text from a file and

Post by deesloop »

OK
Since I can actually answer this I thought I would

A file trigger watches for a specific file
So you could do something like watch folder for a text file.

Then using a file loop you could copy the contents of the text file to the cliupboard and paste into email
Then delete the original file

sometihng like this

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task10"
Hide=INTEGER|0
ID=INTEGER|798374535
LogOnAsUser=INTEGER|1
Name=STRING|"Send email"
OnErrorTaskID=INTEGER|0
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

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

[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"FILEWATCHER"

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

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20121213"
date2=STRING|"20121213"
destvar=STRING|"FILEWATCHER"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"d:\costs\*.txt"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_CLIPBOARD_PUT"
Enabled=INTEGER|-1
Name=STRING|"Put Text"
Params=FOLDER

[Actions\Action3\Params]
file=STRING|"{FILEWATCHER}"
linecount=STRING|"0"
sourcetext=STRING|"0"

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

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

[Actions\Action5\Params]
attachcount=STRING|"0"
auth=STRING|"0"
charset=STRING|"iso-8859-1"
from=STRING|"from@domain.com"
host=STRING|"myemail.domain.com"
html=STRING|"0"
msg0=STRING|"{ClipBoardContent}"
msgcount=STRING|"1"
password=STRING|"2540125197262262622626482"
passwordmode=STRING|"0"
port=STRING|"25"
SSL=STRING|"0"
subject=STRING|"Enter subject"
to=STRING|"to@domain.com"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
UnigueID=INTEGER|1569537

[Events\Event1\Params]
chg=STRING|"0"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"0"
folder1=STRING|"d:\costs"
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"
msbtrp23
Posts: 12
Joined: Mon Sep 03, 2012 7:37 am

Extract specific text from a file and

Post by msbtrp23 »

Thanks dude! It works.
Post Reply