Martin C 6 Posted December 24, 2013 Report Share Posted December 24, 2013 Hi I recently upgraded to UBot 5 from 4 and also from Pro to Developer. I have a number of Ubots that I wrote in UBot 4 Pro that I initiate via a .bat file using the /Auto switch. However, if I recompile those UBots using UBot 5 when they start instead of automatically running they sit there waiting for the Run command. Is there some knack to setting the compile settings so that they automatically run in a batch file that has the /Auto command? This is the contents of my .bat file. pushd C:\Users\martin\Documents\UbotStudio\DevelopmentStart SGProcessEndOfMonth.exe /auto I have tried two different Ubots, one that was working okay but when I opened it in UBot 5 and recompiled and tried again instead of running it just sat there. Any guidance would be appreciated. Martin Quote Link to post Share on other sites
Edward_2 85 Posted December 24, 2013 Report Share Posted December 24, 2013 Have you tried onload, its a command in dev. It will start your bot... well onload. merry xmas Quote Link to post Share on other sites
pftg4 102 Posted December 24, 2013 Report Share Posted December 24, 2013 works for me Quote Link to post Share on other sites
Martin C 6 Posted December 27, 2013 Author Report Share Posted December 27, 2013 I've heard back from Ubot support to say that Ubot 5 does not support the /Auto command from .bat files, instead I should be using the in-built scheduler, (not sure if that will work for me but I will give it a go), in the meantime I have reverted to version 4, but if Version 5 is working for Homer I will be interested. Quote Link to post Share on other sites
UBotDev 276 Posted December 27, 2013 Report Share Posted December 27, 2013 Why wouldn't they add /auto feature in v5? That's really sad to hear if it's true. Quote Link to post Share on other sites
Martin C 6 Posted December 27, 2013 Author Report Share Posted December 27, 2013 Edward_2 Thanks for the onload suggestion, that was a command I hadn't seen, that seemed to work just fine. Quote Link to post Share on other sites
pftg4 102 Posted December 27, 2013 Report Share Posted December 27, 2013 here you go think this is what you mean http://screencast.com/t/ryP64fqtoS pftg4 Quote Link to post Share on other sites
Martin C 6 Posted December 28, 2013 Author Report Share Posted December 28, 2013 Homer Thanks for your clarification, to clarify what I was trying to do I was trying to initiate a complied Ubot using a Windows .bat file that I could schedule using the Windows Task Scheduler. So for example I have a UBot exe that checks the status of a website every few minutes to see if there is a job that needs to be processed so I have a text batch file that contains the following: pushd C:\Users\martin\Documents\UbotStudio\DevelopmentStart /wait SGProcessExportResults.exe /auto In version 4 the SGProcessExportResults.exe would open and run, with version 5 it opens but does not run. As I now have the developer edition I can now use Edward_2's suggestion and use the onload to make it work in version 5. The Windows Task Scheduler is quite sophisticated and I can schedule a task specifying that it only run between certain start/end times, but between those times it should repeat every hour. I haven't looked at it in detail but version 5's in-built scheduler may be sophisticated enough for me but even if it is the windows task scheduler can make the system cleaner as it is preventing the need for multiple processes running in hibernation, for example, if I had a ubot that I only wanted to run annually I don't really want the Ubot.exe hibernating for a year. Maybe that is just me though. Quote Link to post Share on other sites
Martin C 6 Posted December 28, 2013 Author Report Share Posted December 28, 2013 Ahh, the only problem with using the onload method is that the executable never ends, just gets to the end of the script and waits, so it looks like it is either Version 5 and the in-built scheduler, or compile it using version 4, unless there is a way to force the executable to close. Quote Link to post Share on other sites
WarrenIndLLC 0 Posted January 27, 2014 Report Share Posted January 27, 2014 I know this is late but you can setup a batch file and use a shell command to run the batch file to close the bot. Quote Link to post Share on other sites
Martin C 6 Posted March 11, 2014 Author Report Share Posted March 11, 2014 I know this is late but you can setup a batch file and use a shell command to run the batch file to close the bot. I think you are right that that is a work around, I think it sucks that the /auto functionality has been removed though. The /auto command was very useful and the new scheduling is good but doesn't always perform the same function. It is fine if the procedure is time dependent but not if the procedure is triggered by an event. A quit process though should be an easy addition to include, surely that is something that is missing anyway that could be useful? Quote Link to post Share on other sites
orbital 15 Posted March 11, 2014 Report Share Posted March 11, 2014 Here is a free plugin that closes the bot for you once it is done. http://www.ubotstudio.com/forum/index.php?/topic/12765-free-free-plugin-close-bot-command/ Quote Link to post Share on other sites
Martin C 6 Posted March 13, 2014 Author Report Share Posted March 13, 2014 Here is a free plugin that closes the bot for you once it is done. http://www.ubotstudio.com/forum/index.php?/topic/12765-free-free-plugin-close-bot-command/ Brilliant thanks for the pointer and kudos to Aymen for providing it. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.