One task I want to do within a C# program is to construct a string representing a url which I want to download using OEpro (with url macros etc.), then get the program to invoke OEpro, send the string to the New Project Wizard, and get the relevant web pages downloaded.
Can I do this? And to save me reinventing the wheel, do you have any existing simple generic code for starting up OEpro (or invoking an already runnng instance) and passing a url to the wizard? If so, I`d be really grateful for anything that would point me in the right direction here. Thanks!
Check out www.codeproject.com for programming info. Here is a link on how to run another program (eg. OE) from your program.
However, are there any known problems with having more than one instance of OEpro running at the same time? I might want to use this method to invoke it again, while an instance is already running.
So there shouldn`t be any problems. Only problem is that there doesn`t appear to be any way of determining when the download have finished. Maybe Oleg could add another parameter /ExitOnDownloadFinish which will cause OE to exit when all projects have finished downloading, instead of just exiting immediately like /Exit does.
The best way to learn programming is to try things out and see what happens.
You may use the parameter "/close" to exit Offline Explorer a few seconds after the download is complete. This is useful if you want to download a few Projects automatically and then quit Offline Explorer to save memory and other resources. /CloseNoCountdown will force Offline Explorer to quit silently, without displaying the close countdown dialog.
Please look in the Help file for more information.
At the start of the code I needed:
Then the necessary line of code in C# is simply;
Process.Start("OE.exe", "\"/new=url=" + textBox2.Text + ",run=true,level=3\"");
where textBox2 contains the url to be loaded using the OEpro engine.
If OE is already running, a new instance is not created; the above just adds the new project into the already-running instance. Perfect, just what I wanted to do!
Many thanks once again and have a great Christmas!