Page 1 of 1

create scheduled bat

Posted: Tue Aug 06, 2013 5:57 am
by Lamkefyned
how to create a scheduled bat for an hour to open a clients, put the number startbot and Begin?

Re: create scheduled bat

Posted: Tue Aug 06, 2013 6:58 am
by rock5
Well if you want it to automatically log in then you are probably looking for my 'login' userfunction. Once you have it properly installed and set up you can just create a bat file similar to the existing bat files but with the extra arguments for auto logging in. This is what I use to test starting 3 clients at once,

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/login.lua" acc:45 char:1 client:rom path:rbassist
START ../../micromacro.exe "%folder%/login.lua" acc:46 char:1 client:rom path:rbassist
START ../../micromacro.exe "%folder%/login.lua" acc:47 char:1 client:rom path:rbassist
If I understand you correctly, you want it to wait 1 hour before loading the clients. I didn't think there was a batch file command to do this but I found one. It's called 'timeout', It's available in Windows 7 but not XP unless you download the Resource Kit. So just add it to the top of the file.

Code: Select all

timeout 3600

Re: create scheduled bat

Posted: Tue Aug 06, 2013 2:27 pm
by grande
Hey cool, so I could build a bat file like this and then tell task scheduler to run it at various times in the day? Man... that would be FUMAZING.

Also, I have a question on the syntax. Which parts of this code do I need to adjust to my locality/configurtion:

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/login.lua" acc:45 char:1 client:rom path:rbassist
START ../../micromacro.exe "%folder%/login.lua" acc:46 char:1 client:rom path:rbassist
START ../../micromacro.exe "%folder%/login.lua" acc:47 char:1 client:rom path:rbassist  
  


I assume the "../../micromacro.exe" would be updated to be the actual path so it would look more like this:

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START c:/folder/mm/micromacro.exe "%folder%/login.lua" acc:45 char:1 client:rom path:rbassist
START c:/folder/mm/micromacro.exe "%folder%/login.lua" acc:46 char:1 client:rom path:rbassist
START c:/folder/mm/micromacro.exe "%folder%/login.lua" acc:47 char:1 client:rom path:rbassist  
  


Right? Are there more things other than the acc/char/client/path that might change?

Re: create scheduled bat

Posted: Tue Aug 06, 2013 4:54 pm
by Lamkefyned
jajajajajajaj as you know that I have xp?

Re: create scheduled bat

Posted: Tue Aug 06, 2013 4:57 pm
by Lamkefyned
another thing ... the rbassist is the waypoint?
rock 5 and I have a file of yours. "LoginXML"
where downloaded your addon?

Re: create scheduled bat

Posted: Tue Aug 06, 2013 5:25 pm
by Lamkefyned
I get an error

...romacro/scripts/rom/userfunctions_login.lua:63: Game Shortcut does not exist: rom.lnk

Re: create scheduled bat

Posted: Tue Aug 06, 2013 8:04 pm
by rock5
@grande.
  • The bat file assumes it's in the "micromacro/scripts/rom" folder. If it is, then no changes would be needed to the folders. If it is located somewhere else, not only would you have to correct the micromacro folder but also the 'login.lua' folder. You can specify full path names such as you did with micromacro or you can adjust the relative path. For instance if the bat is in the micromacro/scripts folder you could use

Code: Select all

START ../micromacro.exe "%folder%/rom/login.lua" acc:45 char:1 client:rom path:rbassist
@ambolia
ambolia wrote:jajajajajajaj as you know that I have xp?
  • It looks like 'ping' is commonly used for pauses. There are different ways of using it, this is one way.

    Code: Select all

    ping -n 3600 127.0.0.1 > NULL
ambolia wrote:another thing ... the rbassist is the waypoint?
  • Yes. Change it to the waypoint file you want to load.
ambolia wrote:rock 5 and I have a file of yours. "LoginXML"
where downloaded your addon?
ambolia wrote:I get an error

...romacro/scripts/rom/userfunctions_login.lua:63: Game Shortcut does not exist: rom.lnk
  • As always, carefully follow the installation and setup instructions. You need to create a shortcut of your game client and put it in the 'rom' folder.

Re: create scheduled bat

Posted: Wed Aug 07, 2013 7:52 pm
by Lamkefyned
- I have the fastlogin
- I have the shortcut "client"
But still gives the same error

Re: create scheduled bat

Posted: Wed Aug 07, 2013 9:12 pm
by lisa
ambolia wrote:- I have the shortcut "client"
Game Shortcut does not exist: rom.lnk
maybe rename the shortcut rom as in "rom.lnk" like the error message says ?

Re: create scheduled bat

Posted: Fri Aug 09, 2013 4:51 pm
by Lamkefyned
Thanks for all the help but still gives me the same problem .....
no userfunccion could change in the customer's name?

Re: create scheduled bat

Posted: Sat Aug 10, 2013 12:47 am
by rock5
If you don't have Explorer showing file extensions then if you name the shortcut 'rom.lnk' I think it will actually be named 'rom.lnk.lnk' with the last '.lnk' being hidden. So if Explorer is not set to show file extensions then you have to name the shortcut just 'rom'.

Re: create scheduled bat

Posted: Mon Aug 12, 2013 10:47 am
by Lamkefyned
Thanks rock5 and lisa

Re: create scheduled bat

Posted: Mon Aug 12, 2013 10:51 am
by Lamkefyned
and there any way that when a critical close that tab and then reopen?