- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Difference between revisions of "User:Dukederek"
Line 16: | Line 16: | ||
<blockquote> | <blockquote> | ||
− | ^return:: | + | ^return::<br> |
− | x = 0 | + | x = 0<br> |
− | y = 0 | + | y = 0<br> |
− | IfWinActive Dwarf Fortress | + | IfWinActive Dwarf Fortress<br> |
− | { | + | {<br> |
− | Loop | + | Loop<br> |
− | { | + | {<br> |
− | Input, keypress, B, {esc} , w,a,s,d,k,q | + | Input, keypress, B, {esc} , w,a,s,d,k,q<br> |
+ | if keypress = w<br> | ||
+ | {<br> | ||
+ | y := --y<br> | ||
+ | Send {up}<br> | ||
+ | continue<br> | ||
+ | }<br> | ||
+ | else if keypress = s<br> | ||
+ | {<br> | ||
+ | y := ++y<br> | ||
+ | Send {down}<br> | ||
+ | continue<br> | ||
+ | }<br> | ||
+ | else if keypress = a<br> | ||
+ | {<br> | ||
+ | x := --x<br> | ||
+ | Send {left}<br> | ||
+ | continue<br> | ||
+ | }<br> | ||
+ | else if keypress = d<br> | ||
+ | {<br> | ||
+ | x := ++x<br> | ||
+ | Send {right}<br> | ||
+ | continue<br> | ||
+ | }<br> | ||
+ | else if keypress = k <br> | ||
+ | {<br> | ||
+ | break<br> | ||
+ | }<br> | ||
+ | else if keypress = q<br> | ||
+ | {<br> | ||
+ | Return<br> | ||
+ | }<br> | ||
+ | }<br> | ||
+ | SetKeyDelay 1<br> | ||
+ | Send {left %x%}<br> | ||
+ | Send {up %y%}<br> | ||
+ | x := x + 1<br> | ||
+ | y := y + 1<br> | ||
− | + | Loop %y%<br> | |
− | + | {<br> | |
− | + | Loop %x%<br> | |
− | + | {<br> | |
− | + | Send d<br> | |
− | + | Send {NumpadAdd}<br> | |
− | + | Send d<br> | |
− | + | Send {right}<br> | |
− | + | }<br> | |
− | + | Send {left %x%}<br> | |
− | + | Send {down}<br> | |
− | + | }<br> | |
− | + | Loop %y%<br> | |
− | + | {<br> | |
− | + | Send {up}<br> | |
− | + | }<br> | |
− | + | }<br> | |
− | + | else<br> | |
− | + | return<br> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Loop %y% | ||
− | { | ||
− | Loop %x% | ||
− | { | ||
− | Send d | ||
− | Send {NumpadAdd} | ||
− | Send d | ||
− | Send {right} | ||
− | } | ||
− | Send {left %x%} | ||
− | Send {down} | ||
− | } | ||
− | Loop %y% | ||
− | { | ||
− | Send {up} | ||
− | } | ||
− | } | ||
− | else | ||
− | return | ||
</blockquote> | </blockquote> |
Revision as of 17:42, 21 January 2008
== Dump Macro
I have written a dump macro for AutoHotKey which works something like the designation tools in the actual DF interface. The current limitation is that it only works if you start at the top left of the group of tiles you wish to dump and finish at the bottom right.
I have mapped it to "ctrl-return" so that it can be left running when not needed and not interfere with any other commands in DF.
To use.
- Go to the top leftmost square you want to dump using the k "look around" button
- Press "ctrl-return"
- Using w a s d, move the yellow cross to the bottom rightmost square of things you wish to dump. To cancel press q
- press k
The limitations are that only the first two items on each tile's list are set to be dumped. Also, it seems non-trivial to map this to the arrow keys rather than w a s d but that's not so bad right?
Here is the code, for those not in the know install autohotkey, paste the text below into a file named "blockdump.ahk" or something, double click the file so there is a green and white "H" icon in your system tray.
^return::
x = 0
y = 0
IfWinActive Dwarf Fortress
{
Loop
{
Input, keypress, B, {esc} , w,a,s,d,k,q
if keypress = w
{
y := --y
Send {up}
continue
}
else if keypress = s
{
y := ++y
Send {down}
continue
}
else if keypress = a
{
x := --x
Send {left}
continue
}
else if keypress = d
{
x := ++x
Send {right}
continue
}
else if keypress = k
{
break
}
else if keypress = q
{
Return
}
}
SetKeyDelay 1
Send {left %x%}
Send {up %y%}
x := x + 1
y := y + 1
Loop %y%
{
Loop %x%
{
Send d
Send {NumpadAdd}
Send d
Send {right}
}
Send {left %x%}
Send {down}
}
Loop %y%
{
Send {up}
}
}
else
return