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 Tue, 25 January 2011 18:54 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:29

[email

m.a@stars[/email] wrote on Fri, 21 January 2011 12:14]Interesting! Twisted Evil

Why aren't you using the "next" button and the "enter" key, I wonder? Rolling Eyes


I would love to be able to play entirely by keyboard. Is there a way to use keyboard for Queue detail? I use keyboard as much as I can, but have not discovered way of detailing the number of ships to build. My humble obeisance before a master Not Worthy


with regard to using automation,
keyboard entry recording is better, as it could be used by most other users... but when I did this it was a first idea and I just clicked away in record mode. Also keyboard entries are easier when editing the script, than mouse coordinates.

the number of ships to build is done by having the input boxes with user entry stored into variables. This comes in my next video, the input boxes.

I will post the entire routine, in text, that I used to do the part of the demo video that does the ship building. This includes the input boxes and the loops to do repeats. Just don't anyone try to run it on your screen as the coordinates will likely be different. lol
--------------------

WinWait, Stars!,
IfWinNotActive, Stars!, , WinActivate, Stars!,
WinWaitActive, Stars!,

InputBox, shipno, ship type number, Enter number of ship type on list., , 300, 150
Sleep, 100

shipverify = %shipno%
; on my screen the first item on production list is at
; cursor position 25+16, the next item is 16 down, etc.
; item(ship) 3 would be 25 + (16*3) in making selection
shipno := 25 + (16 * shipno)


InputBox, planets, Number of Planets, Enter number of planets to queue., , 300, 150
Sleep, 100


InputBox, ships, number of shps to build, Enter number of ships to queue., , 300, 150
Sleep, 100

; on my screen 70 is the cursor row location for first planet on planet summary window
planetrow := 70

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


WinWait, Stars!,
IfWinNotActive, Stars!, , WinActivate, Stars!,
WinWaitActive, Stars!,
MouseClick, left, 225, 48
Sleep, 100
MouseClick, left, 229, 57
Sleep, 100

Loop, %planets% {

WinWait, Planet Summary Report,
IfWinNotActive, Planet Summary Report, , WinActivate, Planet Summary Report,
WinWaitActive, Planet Summary Report,

MouseClick, left, 118, planetrow
Sleep, 100
MouseClick, left, 429, planetrow
Sleep, 100

WinWait, Production Queue,
IfWinNotActive, Production Queue, , WinActivate, Production Queue,
WinWaitActive, Production Queue,

MouseClick, left, 570, 44
Sleep, 100

loop, %ships% {
; double click ships and loop until all entered for the planet
MouseClick, left, 89, %shipno%
MouseClick, left, 89, %shipno%
Sleep, 100
}
MouseClick, left, 643, 559
Sleep, 100

Sleep, 100
; increment to the next row on planet summary screen to select
; next planet, on my screen it is 17 down per planet row
planetrow := planetrow + 17

}

Sleep, 300



...



[Updated on: Tue, 25 January 2011 19:15]




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: Thu Jun 06 16:20:50 EDT 2024