The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
Difference between revisions of "User:Cegaiel/Macros/Plane/Code"
From A Tale in the Desert
< User:Cegaiel | Macros | Plane
Jump to navigationJump to searchLine 10: | Line 10: | ||
+ | SetDefaultMouseSpeed, 0 | ||
IfWinExist eGenesis Client | IfWinExist eGenesis Client | ||
Line 25: | Line 26: | ||
( LTrim | ( LTrim | ||
Hover and middle-click (Click mouse-wheel) on each carpentry bench, one by one, | Hover and middle-click (Click mouse-wheel) on each carpentry bench, one by one, | ||
− | until you've clicked on all the benches you want to use. | + | until you've clicked on all the benches you want to use. |
+ | |||
+ | AFTER setting middle clicking all your benches, then click the OK button. | ||
+ | |||
(Drag this box out of the way if any benches are hidden) | (Drag this box out of the way if any benches are hidden) | ||
+ | |||
) | ) | ||
Line 69: | Line 74: | ||
Gui, +AlwaysOnTop +ToolWindow | Gui, +AlwaysOnTop +ToolWindow | ||
Gui, Font, bold | Gui, Font, bold | ||
− | Gui, Add, Text, vMineCycleText, | + | Gui, Add, Text, vMineCycleText, 5s to drag out of way from the benches |
Gui, Font, norm | Gui, Font, norm | ||
Gui, Show | Gui, Show | ||
− | GuiControl, Text, MineCycleText, 5s to drag | + | GuiControl, Text, MineCycleText, 5s to drag out of way from the benches |
− | ;You got 5 seconds to drag the status | + | seconds = 5 |
− | Sleep | + | ;You got 5 seconds to drag the status window out of the way |
+ | Loop, %seconds% | ||
+ | { | ||
+ | GuiControl, Text, MineCycleText, %seconds%s countdown, drag window out of way | ||
+ | seconds -- | ||
+ | Sleep 1000 | ||
+ | } | ||
Line 96: | Line 107: | ||
MinePosY := MineY%MineNum% | MinePosY := MineY%MineNum% | ||
MouseMove, %MinePosX%, %MinePosY%, 0 | MouseMove, %MinePosX%, %MinePosY%, 0 | ||
− | Sleep, | + | Sleep, 250 |
Send {P} | Send {P} | ||
− | Sleep, | + | Sleep, 250 |
MineNum++ | MineNum++ | ||
Boards++ | Boards++ |
Revision as of 23:39, 27 February 2010
;Ctrl+Alt+W to start macro. ;Ctrl+P to pause script and Ctrl+P again to resume ;The AHK icon in system tray will turn red while paused. ;Ctrl+R to reload script ^r::reload ^p::Pause ^!w:: SetDefaultMouseSpeed, 0 IfWinExist eGenesis Client { WinActivate InputBox, NumPulls, Boards, How many boards do you want to plane? Gui, +AlwaysOnTop +ToolWindow Gui, Font, bold Gui, Add, Text, vMineNumText, Recording bench positions Gui, Font, norm Gui, Add, Text,, ( LTrim Hover and middle-click (Click mouse-wheel) on each carpentry bench, one by one, until you've clicked on all the benches you want to use. AFTER setting middle clicking all your benches, then click the OK button. (Drag this box out of the way if any benches are hidden) ) Gui, Add, Button, default gMineSetLoops, OK Gui, Show MineNum = 0 Boards = 0 WinGet, GameWinHandle, ID, eGenesis Client loop { WinActivate CoordMode, Mouse, Relative KeyWait, MButton, D KeyWait, MButton MouseGetPos, TestX, TestY, WinHandle if (WinHandle = GameWinHandle) { Gosub, MineRecord } else { Gui, Destroy break } } return MineRecord: MineNum++ MouseGetPos, MineX%MineNum%, MineY%MineNum% GuiControl, Text, MineNumText, %MineNum% benches captured TotalBenches := MineNum return MineSetLoops: Gui, Submit Gui, Destroy Gui, +AlwaysOnTop +ToolWindow Gui, Font, bold Gui, Add, Text, vMineCycleText, 5s to drag out of way from the benches Gui, Font, norm Gui, Show GuiControl, Text, MineCycleText, 5s to drag out of way from the benches seconds = 5 ;You got 5 seconds to drag the status window out of the way Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds%s countdown, drag window out of way seconds -- Sleep 1000 } loop, %NumPulls% { MineNum = 1 loop, %TotalBenches% { WinActivate, eGenesis Client MinePosX := MineX%MineNum% MinePosY := MineY%MineNum% MouseMove, %MinePosX%, %MinePosY%, 0 Sleep, 250 Send {P} Sleep, 250 MineNum++ Boards++ GuiControl, Text, MineCycleText, Boards: %Boards% of %NumPulls% if Boards = %NumPulls% { Gui, Destroy Gui, Font, bold Gui, Add, Text, MineCycleText, Boards: %Boards% of %NumPulls% Gui, Font, norm Gui, Add, Text,, ( LTrim All Done! Middle-click on this window to end the script. ) Gui, Show Exit } } } Gui, Destroy Gui, Add, Text,, Middle-click on this window to end the script. Gui, Show return }