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"
From A Tale in the Desert
< User:Cegaiel | Macros
Jump to navigationJump to searchLine 14: | Line 14: | ||
WinGetPos,,, winWidth, winHeight | WinGetPos,,, winWidth, winHeight | ||
widthOffset := winWidth - 40 | widthOffset := winWidth - 40 | ||
+ | |||
+ | InputBox, NumPulls, Boards, How many boards do you want to plane? | ||
+ | |||
Gui, +AlwaysOnTop +ToolWindow | Gui, +AlwaysOnTop +ToolWindow | ||
Gui, Font, bold | Gui, Font, bold | ||
− | Gui, Add, Text, vMineNumText, Recording | + | Gui, Add, Text, vMineNumText, Recording bench positions |
Gui, Font, norm | Gui, Font, norm | ||
Gui, Add, Text,, | Gui, Add, Text,, | ||
( LTrim | ( LTrim | ||
− | Hover and middle-click (Click mouse-wheel) on each | + | Hover and middle-click (Click mouse-wheel) on each carpentry bench, one by one, |
− | until you've clicked on all the | + | until you've clicked on all the benches you want to use. Then click the OK button. |
− | (Drag this box out of the way if any | + | (Drag this box out of the way if any benches are hidden) |
) | ) | ||
Line 30: | Line 33: | ||
MineNum = 0 | MineNum = 0 | ||
− | + | Boards = 0 | |
− | |||
WinGet, GameWinHandle, ID, eGenesis Client | WinGet, GameWinHandle, ID, eGenesis Client | ||
Line 67: | Line 69: | ||
Gui, +AlwaysOnTop +ToolWindow | Gui, +AlwaysOnTop +ToolWindow | ||
Gui, Font, bold | Gui, Font, bold | ||
− | Gui, Add, Text, vMineCycleText, | + | Gui, Add, Text, vMineCycleText, 7s to drag away from benches |
Gui, Font, norm | Gui, Font, norm | ||
Gui, Show | Gui, Show | ||
− | GuiControl, Text, MineCycleText, | + | GuiControl, Text, MineCycleText, 7s to drag away from benches |
;You got 7 seconds to drag the status bar out of the way | ;You got 7 seconds to drag the status bar out of the way | ||
Sleep 7000 | Sleep 7000 | ||
+ | |||
+ | |||
loop, %NumPulls% | loop, %NumPulls% | ||
{ | { | ||
− | + | MineNum = 1 | |
+ | |||
− | |||
− | |||
− | |||
loop, %TotalBeds% { | loop, %TotalBeds% { | ||
+ | |||
Line 90: | Line 93: | ||
WinActivate, eGenesis Client | WinActivate, eGenesis Client | ||
− | |||
− | |||
− | |||
MinePosX := MineX%MineNum% | MinePosX := MineX%MineNum% | ||
MinePosY := MineY%MineNum% | MinePosY := MineY%MineNum% | ||
Line 99: | Line 99: | ||
Sleep, 250 | Sleep, 250 | ||
MineNum++ | MineNum++ | ||
+ | Boards++ | ||
+ | GuiControl, Text, MineCycleText, Boards: %Boards% of %NumPulls% | ||
+ | |||
+ | if Boards = %NumPulls% | ||
+ | Exit | ||
+ | |||
} | } | ||
− | |||
− | |||
− | |||
− | |||
Revision as of 05:30, 3 January 2010
;Ctrl+Alt+W to start macro. ;Ctrl+P to pause script (ie to click Water icon) and Ctrl+P again to resume ;The AHK icon in system tray will turn red while paused. ^p::Pause ^!w:: IfWinExist eGenesis Client { WinActivate WinGetPos,,, winWidth, winHeight widthOffset := winWidth - 40 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. 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 TotalBeds := MineNum return MineSetLoops: Gui, Submit Gui, Destroy Gui, +AlwaysOnTop +ToolWindow Gui, Font, bold Gui, Add, Text, vMineCycleText, 7s to drag away from benches Gui, Font, norm Gui, Show GuiControl, Text, MineCycleText, 7s to drag away from benches ;You got 7 seconds to drag the status bar out of the way Sleep 7000 loop, %NumPulls% { MineNum = 1 loop, %TotalBeds% { WinActivate, eGenesis Client MinePosX := MineX%MineNum% MinePosY := MineY%MineNum% MouseMove, %MinePosX%, %MinePosY%, 0 Send {P} Sleep, 250 MineNum++ Boards++ GuiControl, Text, MineCycleText, Boards: %Boards% of %NumPulls% if Boards = %NumPulls% Exit } } Gui, Destroy Gui, Add, Text,, Middle-click on this window to end the script. Gui, Show return }