Jump to content
UBot Underground

Testing for /auto


Recommended Posts

Is there a way to test for /auto being used during a Cron process?

 

I would like to execute some extra subroutines in that event. Normally I do not execute them unless the user selects a checkbox.

Link to post
Share on other sites

Let's say I have this bot that I schedule to run every hour and I also use the /auto when it starts up.

 

Within my bot, if a user starts it manually, there are a couple of checkboxes. When they are selected they do special things. Those checkboxes are not always needed during every execution.

 

I can think of a scenario where it would be great to Test for the /auto switch and then perform special subroutines like the checkbox code.

Link to post
Share on other sites

Is there a way to test for /auto being used during a Cron process?

You may mean a scheduled task. Correct me if I'm wrong, but I think Cron jobs/processes are for Linux.

 

Let's say I have this bot that I schedule to run every hour and I also use the /auto when it starts up.

 

Within my bot, if a user starts it manually, there are a couple of checkboxes. When they are selected they do special things. Those checkboxes are not always needed during every execution.

 

I can think of a scenario where it would be great to Test for the /auto switch and then perform special subroutines like the checkbox code.

If you mean that you would like to run a bat file with:

compiledbot.exe /auto

, then could the bot not read the bat file and check for the presence of "/auto" in the file?

Link to post
Share on other sites

Well I use cron & scheduled task as the same process. I realize they are for different OSs but I meant it for the desired effect. Unfortunately, brother bill did not see fit to design Scheduled Task in a manner that is functional. If so, then you should be able to schedule a task to run every 5 minutes. In theory, Microsoft did give that level of granularity BUT it is not very reliable.

 

My bot is compiled and I am using the /auto switch. A Batch file may be able to detect a switch BUT it still cannot control what the compiled bot will do.

 

Remember, I want my compiled bot to detect that the /auto switch is being used and then execute another subroutine within the compiled bot code thereby giving the bot the ability to be a bit smarter.

 

That's my wish. I could compile two different versions but that defeats the whole purpose and would SEVERELY confuse customers.

Link to post
Share on other sites

I see what you're saying, you want to be able to get the command line arguments from inside ubot. there's not really anyway to do that directly, unfortunately. one idea might be to make the start up script into something that loads the other script the way you'd like. of course, then you'd have another tab floating without any use when you're not running auto. another possibility would be to have something like a configuration file where they could define which way they want it. you could ready the configuration file from ubot. neither solution is ideal. I think the configuration file is pretty clean though.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...