Hello
I have created a view that I need to export to a csv file on a daily basis. I am using this currently :
@Command([FileExport]; “Comma Separated Value”; “c:\MyDir\export.csv”)’
and it works ok.
Now I’d like to run it in unattended mode (as a scheduled agent).
The problem is that each time I run it, it shows up a menu to ask if I want to “replace the output file” (yes, I want) and another menu that ask me “How Much To Export” (All document or Selected Document) and “Export Character Set” (Uncode or UTF-8) …
Now, I don’t want the agent to ask me all these stuff each time it runs (otherwise the agent cannot be run in attended mode) and at same time I want to set what are my choice (Yes I want to replace the file, I want it in UTF-8 format)
I’m sure this can be done using lotuscript but I do not have the skills to write it
Can anyone help?
Thanks in advance
Subject: Unattended FileExport agent
Create your own LotusScript agent which simulates the result of File-Export menu.Maybe there is a C API which makes it possible to accomplish it with 1 call, otherwise it would take about an hour to write such agent from scratch.
Here is an example of a similar agent:
You might also take a look at DXL export, which can be a good solution for export for backup purposes.
Subject: Unattended FileExport agent
Search this forum for ‘SendKeys’…this will allow you to provide the necessary key inputs automatically.
Alex
Subject: RE: Unattended FileExport agent
Thanks Alex, but it looks like it does not work within Domino Designer … or am I wrong? (sorry I was not very accurate about the tool I’m using …)*piero
Subject: RE: Unattended FileExport agent
Sendkeys can be added to your agent so that you can automatically provides responses to expected prompts in advance and the agent can proceed.
To reduce one of the prompts your agent could look for an existing file of the same name and delete it before running.
Alex
Subject: RE: Unattended FileExport agent
Alex, this is an extract from my agent :
@Command([OpenView];“f. Execution\by TC Name”);
@Command([ViewExpandAll]);
@Command([FileExport];“Comma Separated Value”;“c:\temp\TC.csv”);
when I add
@Command([SendKeys];“{ENTER}”);
I get an error : = "Unknown [Keyword] for @Function:‘[SendKeys]’
Could you add a more concrete example of how to use the Sendkey? The sample I have looked at in the forum are not clear to me …
It will help me a lot
thanks
*piero
Subject: RE: Unattended FileExport agent
Thanks for posting your code. SendKeys is a Lotusscript statement but doesn’t always work so there are some examples in this forum about using the Windows API as an alternative SendKeys option.
You would need to convert your formula to use NotesUIWorkspace to open the view and then sendkeys to perform the File - Export.
Alex