Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Academy » Stars automated micromanagement
Re: Stars automated micromanagement Wed, 26 January 2011 01:57 Go to previous messageGo to previous message
BlueTurbit

 
Lt. Commander

RIP
BlueTurbit died Oct. 20, 2011

Messages: 835
Registered: October 2002
Location: Heart of Texas
neilhoward wrote on Tue, 25 January 2011 17:57

Blue,
I am in revision for exams now, but I will definitely try it this weekend.

After listening to you and Ron about suggestions using less mouse clicks, this evening I made a new version of script.

I went to AutoHotKey site and read some docs and decided to try something and it works for me, in early trials.

Only requirement is to open planet summary window first and click on first planet name you want production to start. You want to sort the list by your choice to make sure the planets come up in the order you see. The script uses the next button in production queue window to move to next planet. I believe the next order is different if you don't open the planet summary window first. And Stars window doesn't have to be full screen now.

Quote:

WinWait, Stars!,
IfWinNotActive, Stars!, , WinActivate, Stars!,
WinWaitActive, Stars!,
Sleep, 100

Send, q
WinWait, Production Queue
IfWinNotActive, Production Queue, , WinActivate, Production Queue,
WinWaitActive, Production Queue,
Send, {TAB}{HOME}{SHIFTDOWN}{TAB}{SHIFTUP}

InputBox, shiptype, ship type number, Enter number of ship/item type on list., , 350, 150

loop, %shiptype% {
Send, {DOWN}
}
Send, {UP}

InputBox, ships, number of shps to build, Enter number of ships to queue., , 350, 150

InputBox, planets, Number of Planets, Enter number of planets to queue., , 350, 150


; MsgBox [, Options, Title, Text, Timeout]
MsgBox, 4, , .You entered ship/item type %shiptype%`n Build on %planets% planets`n build %ships% on each planet`n Do you want to continue?`n (Press YES or NO)
IfMsgBox No
return

Send, {HOME}
sleep, 1000


SetMouseDelay, 0

Loop, %planets% {

WinWait, Production Queue
IfWinNotActive, Production Queue, , WinActivate, Production Queue,
WinWaitActive, Production Queue,
Send, {TAB}{HOME}{SHIFTDOWN}{TAB}{SHIFTUP}

loop, %shiptype% {
Send, {DOWN}
}
Send, {UP}

send, {TAB}{TAB}
loop, %ships% {
send, {SPACE}
}

send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{SPACE}
send, {TAB}{TAB}{TAB}

Sleep, 100


}





edit: script modified to remove all mouse clicks


[Updated on: Wed, 26 January 2011 13:04]




BlueTurbit Country/Rock

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Wrong firing order ?
Next Topic: Windows 7: NewReports=1 in ini file
Goto Forum:
  


Current Time: Sun Jun 02 20:59:11 EDT 2024