Getting information from a triggerfile.

Discuss RoboTask here
Post Reply
cadmageren
Posts: 3
Joined: Tue Apr 18, 2006 1:17 am
Location: Denmark

Getting information from a triggerfile.

Post by cadmageren »

One more newbie easy question:
Monitor folder for triggerfile.. *.go
If found: Rename to .. *.work
Triggerfile is a simple textfile and contains variables.
$sourcedoc = C:\master\input\FODAquote\Master\FODAquote.doc
$destination = C:\test.doc
...
Open $sourcedoc in Word.
Execute word macro within Word.
(The macro is saved in a seperate document.)
If macro succeeds, delete the triggerfile.
If macro fails, rename triggerfile to .. *.bad
 
Can someone please help me in the right direction. Thanks in advance.
/Michael Christoffersen

 
Last edited by cadmageren on Tue Apr 18, 2006 5:32 am, edited 1 time in total.
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Getting information from a triggerfile.

Post by Oleg »

I haven't understood completely: what program must save the doc into destination?
If Word, then RoboTask can open source document only when *.go file is detected.
All another processing you can do in Word macro.

Recently we discussed how to extract the string from text. See here.
cadmageren
Posts: 3
Joined: Tue Apr 18, 2006 1:17 am
Location: Denmark

Getting information from a triggerfile.

Post by cadmageren »

Hi Oleg.
My macro should use the $destination variable, and create a new document, based on the sourcedocument.
(The go file also contains also contains many different field values, which is being merged into the new document, ie making a customised document)
I will have a look at the link u gave.
 
cadmageren
Posts: 3
Joined: Tue Apr 18, 2006 1:17 am
Location: Denmark

Getting information from a triggerfile.

Post by cadmageren »

Oleg - I have looked at the sample, but how do I get the name of the triggerfile?
 
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Getting information from a triggerfile.

Post by Oleg »

Use the "File Monitor" event. This event can save a list of new or changed files into text files. See at the "Save changes" tab. You can use this file in the task body (e.g. "Text loop")
Last edited by Oleg on Tue Apr 18, 2006 7:09 am, edited 1 time in total.
Post Reply