It is currently October 23rd, 2018, 10:56 pm


All times are UTC




Post new topic Reply to topic  [ 22 posts ] 
Author Message
 Post subject: Instructional: Autohotkey
PostPosted: May 29th, 2011, 6:15 am 
SupOP
User avatar

Joined: May 27th, 2011, 7:09 pm
Posts: 33
Yo guys! As some of you know, I was the first to bring autohotkey to this server all those months ago, and I'm going to make it standard for all veterans+ again! Here's why its useful:

* Really fast commands (such as copy/paste)
* Fast patrolling
* Easy speeches
* Useful real world applications
* Fun trolling friends

So now that you realize that you can't live without it, how do you get it? Simple!
Go to this link and click the installer for autohotkey_L. It'll download fast, and just run the installer. After you run the installer, load up the program from your start menu. You should see a green box next in your toolbar next to your block with an H on it. That means the script is currently running.

It should also prompt you with a "Do you want to create an example script". Say yes. It'll load notepad. This is where you can put the code for the actual script. If you don't get that, then right click on the green box and press "Edit" and it'll give you a notepad file as well.

Depending on how much of a programmer you are, you can use this program for anything from simple tasks to extremely powerful and important tools to ruthlessly trolling your friends. I'll start you off with a demo program. You should delete everything in the text file it auto-created for you, and put this in (I'll explain it too):
Code:
^p::
IfWinActive, Minecraft
{
SendEvent t
sleep, 50
SendEvent /pat{Enter}
}
return

In this code, the ^p:: is like saying "When I press control and then p", so this code is designated to run when you press ctrl-p.
It will only run this if the window title says minecraft as well, so no messing with hotkeys elsewhere! (thanks to Hafnium)
It will then send the t letter, to open your chat log, and then wait a bit for the client to catch up (50 milliseconds). After that, it'll use the open text box to type /pat and then press the enter key.
The purpose of this macro is to make patrolling easier. Rather than type t/pat yourself, all you have to do is press ctrl-p. You can change the ctrl-p to anything you want. I also use the grave key (the ` key) to patrol. If you wanted to do that, your code would instead look like this:
Code:
`::
IfWinActive, Minecraft
{
SendEvent t
sleep, 50
SendEvent /pat{Enter}
}
return

Simple, right?
So how do you run this program? After you've pasted it in the notepad, save the document and then right click your green button in the toolbar. Click the "Reload the script" option and your script will be running. After that, you can press ctrl-p to patrol any time! You can also pause the script by right clicking and choosing the "suspend hotkeys" option.

"OK, that is too simple. Where is all of the rest of the things you promised me?" You ask.

Well, here are some other useful commands of mine, which you can just plop into the text file:
Code:
^c::
IfWinActive, Minecraft
{
SendEvent t
Sleep, 50
SendEvent /copy{Enter}
}
return

^z::
IfWinActive, Minecraft
{
SendEvent t
sleep, 50
SendEvent /undo{Enter}
}
return

^v::
IfWinActive, Minecraft
{
SendEvent t
sleep, 50
SendEvent /paste{Enter}
}
return

^t::
IfWinActive, Minecraft
{
SendEvent t
sleep, 50
SendEvent /c air{Enter}
}
return

^b::
IfWinActive, Minecraft
{
SendEvent t
sleep, 50
SendEvent /measure{Enter}
}
return

^i::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent If I see see you spleefing or griefing /{Enter}
sleep, 100
SendEvent tor tunneling, /{Enter}
sleep, 100
SendEvent t I will kick you from the server.{Enter}
}
return

^o::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent If you are being griefed, get the name /{Enter}
sleep, 100
SendEvent tof your griefer and say it in the chat /{Enter}
sleep, 100
SendEvent tand we will attend to you as soon /{Enter}
sleep, 100
SendEvent tas we can.{Enter}
}
return

XButton2::
IfWinActive, Minecraft
{
Loop, 20
SendEvent {Click}
}
return


All is fine and good, but that last one is unique to having an awesome mouse. What it'll do is to click (read: delete a block) really, really fast. This not only allows me to cheat at spleef (click with the power of a THOUSAND SUNS), but also allows me to delete anything I create really fast with minimal clicking.

This isn't laziness, its efficiency. You should learn how to do this as well!


Last edited by Stop_Sign on May 30th, 2011, 5:11 am, edited 1 time in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: May 29th, 2011, 8:38 am 
SupOP
User avatar

Joined: May 24th, 2011, 3:44 am
Posts: 294
thanks

_________________
Aleries: What OS is your server running on?
FierceReacter: 5


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: May 29th, 2011, 8:41 am 
#J
User avatar

Joined: May 26th, 2011, 6:32 pm
Posts: 65
Excellent guide, Stop_Sign! I've always been too lazy to explore macros using software since my mouse/keyboard came with a nice, friendly UI for these features. I will be sure to inform new builders curious about this to check out your guide.

A word of caution - using an auto mouse clicker is a very fun way to build and extremely satisfying to use; however, it may trigger an autokick from the server "for suspected griefing" if your rank isn't high enough. On Spa.net you had to be above the vet rank (mason, op, etc) to bypass it. I'm not sure if it's the same here.

I challenge thee to a 20 layer speed spleef duel!

_________________
You look around on Middle-Earth
as if she for no purpose bore you,
as if you were her first-born birth,
and none had lived before you.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: May 29th, 2011, 3:15 pm 
Owner
User avatar

Joined: May 21st, 2011, 10:51 pm
Posts: 604
Code:
Numpad0::
IfWinActive, Minecraft
{
Send t
Sleep 100
Send /patrol{Enter}
}
return


I really like the window functionality of autohotkey. Keeps me from pasting into other chat.

_________________
The first law of thermodynamics states that you don't discuss thermodynamics.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: May 29th, 2011, 5:37 pm 
User avatar

Joined: May 24th, 2011, 1:37 am
Posts: 329
Location: Sealand
Thanks for the guide, Stop! Should be useful for a lot of people. One thing I do recommend, however, is that you use Code tags for the scripts, to make it easier to read.

Hafnium wrote:
Code:
Numpad0::
IfWinActive, Minecraft
{
Send t
Sleep 100
Send /patrol{Enter}
}
return


I really like the window functionality of autohotkey. Keeps me from pasting into other chat.


Hafnium, you are a life saver.

_________________
<CMB> KingCrab72: Some mixture and contrast would be nice tbh Ollie
<Ollieboy> Some mixture and contrast of your face on my penis would also be nice


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: May 30th, 2011, 5:11 am 
SupOP
User avatar

Joined: May 27th, 2011, 7:09 pm
Posts: 33
OK. Updated with suggestions.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 4th, 2011, 9:06 am 
Trustee
User avatar

Joined: May 24th, 2011, 1:40 pm
Posts: 1766
Location: Leiden, Zuid Holland
sticky sticky sticky this mess!

_________________
Ferrisbuler2: i will stay but i might not post cus of ollieboy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 6th, 2011, 6:27 pm 
SupOP
User avatar

Joined: May 28th, 2011, 12:16 am
Posts: 325
Sometimes when I use the autohotkey to do 1 button patrol, it just types pat in chat. Any way to fix that?

_________________
_Snivy_: is desosus a bot?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 7th, 2011, 4:23 pm 
Trustee
User avatar

Joined: May 24th, 2011, 12:29 am
Posts: 371
Location: Stuttgart
Desosus wrote:
Sometimes when I use the autohotkey to do 1 button patrol, it just types pat in chat. Any way to fix that?


Try increasing the sleep time.

_________________
[02:27] <+FCB2> MainTrain97: my dad is an arkansas goveren
[02:27] <+FCB2> MainTrain97: and iwe are suing skittles
[02:29] <+FCB2> MainTrain97: and we may file a lawsuit against fcraft


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 7th, 2011, 4:53 pm 
SupOP

Joined: May 23rd, 2011, 11:46 pm
Posts: 173
It's based on which WoM version you're using. At least with 1.6.3 all you need to do is put a sleep between the "t" and the "/patrol", but if you're using later versions they may have changed that. Try putting a "Sleep 10" between each letter.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 19th, 2011, 6:15 am 
SupOP
User avatar

Joined: May 27th, 2011, 7:09 pm
Posts: 33
prototypedesign wrote:
It's based on which WoM version you're using. At least with 1.6.3 all you need to do is put a sleep between the "t" and the "/patrol", but if you're using later versions they may have changed that. Try putting a "Sleep 10" between each letter.


Yea. With 1.6.3 I didn't need any sleep time and it worked just fine. The sleep time here is to fix the problem Desosus is describing. If you're still having the problem, maybe your computer is slower than mine and you need more sleep time. No big deal.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 19th, 2011, 6:28 am 
SupOP
User avatar

Joined: May 28th, 2011, 12:16 am
Posts: 325
Yeah, I fixed it a while ago. Works fine now.

_________________
_Snivy_: is desosus a bot?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: July 5th, 2011, 11:55 am 

Joined: June 9th, 2011, 9:02 pm
Posts: 2
Nice guide. I used Autohotkey before too, and to all: in that manner u can use autohotkey for nearly everything with just i few lines of code. the helpfile of AHK is also really helpfull if u want to write more scripts.

but now i have my logitech G11 with specials keys for exact this porpous :D


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: July 8th, 2011, 6:26 pm 
SupOP
User avatar

Joined: May 27th, 2011, 7:09 pm
Posts: 33
Shurtugal_Morzan wrote:
Nice guide. I used Autohotkey before too, and to all: in that manner u can use autohotkey for nearly everything with just i few lines of code. the helpfile of AHK is also really helpfull if u want to write more scripts.


Yea I like to use it for messing with online games as well. For example, in this game, you have to just type all the numbers (1, 2, 3, 4, ...) to a hundred. Instead of that, I wrote a script that beats the game in 2 seconds. I use it at work as well to auto-type my password I have to type every time I load my program. Efficiency!

Code:
!3::
SendEvent {Click}
x = 1
loop, 100
{
SendEvent %x%
x++
}


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: July 9th, 2011, 2:42 am 
OP

Joined: June 27th, 2011, 3:44 am
Posts: 89
Stop_Sign wrote:
Shurtugal_Morzan wrote:
Nice guide. I used Autohotkey before too, and to all: in that manner u can use autohotkey for nearly everything with just i few lines of code. the helpfile of AHK is also really helpfull if u want to write more scripts.


Yea I like to use it for messing with online games as well. For example, in this game, you have to just type all the numbers (1, 2, 3, 4, ...) to a hundred. Instead of that, I wrote a script that beats the game in 2 seconds. I use it at work as well to auto-type my password I have to type every time I load my program. Efficiency Security!

Code:
!3::
SendEvent {Click}
x = 1
loop, 100
{
SendEvent %x%
x++
}

_________________
>l>


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: July 11th, 2011, 12:51 am 
OP
User avatar

Joined: June 1st, 2011, 2:50 pm
Posts: 63
Location: Georgia, USA
Ummm i didnt know vets could patrol

_________________
+Fricksion: What if...
+Fricksion: What if Grant works for the NSA
+Fricksion: Do not trust Grant
200419110: D:
+Fricksion: Agent 200419110, do not make me say your real codename.
+Fricksion: Agent hotbabe69ladiesdude, please report.
200419110: omg


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: July 25th, 2011, 6:00 pm 
SupOP

Joined: June 3rd, 2011, 6:53 pm
Posts: 348
Just added a fast few things, please say if it doesn't or if it is grammatical wrong. It helps with teaching builders, very usefull.

Show
Quote:
^h::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent Welcome, as builder you need to /{Enter}
sleep, 100
SendEvent tknow the rules, you can find /{Enter}
sleep, 100
SendEvent tthe rules on forum.fcraft.net /{Enter}
sleep, 100
SendEvent tplease look at it later.{Enter}
}
return

^e::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent Now i gonna learn you a few /{Enter}
sleep, 100
SendEvent tcommands, never abuse them /{Enter}
sleep, 100
SendEvent tthen you will get a demotion /{Enter}
sleep, 100
SendEvent tor even a ban.{Enter}
}
return

^l::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent First command is /c, type this /{Enter}
sleep, 100
SendEvent tafter that (right)click on /{Enter}
sleep, 100
SendEvent tthe two red blocks .{Enter}
}
return

^p::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent The commands you learned are /{Enter}
sleep, 100
SendEvent tforbidden in main and guest /{Enter}
sleep, 100
SendEvent tonly use them if you help /{Enter}
sleep, 100
SendEvent ta guest. {Enter}
}
return

^i::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent Now i will learn you the /{Enter}
sleep, 100
SendEvent tkick command, only /{Enter}
sleep, 100
SendEvent tuse this command if /{Enter}
sleep, 100
SendEvent tthere is no veteran+. {Enter}
}
return

^n::
IfWinActive, Minecraft
{
SendEvent t
sleep, 100
SendEvent Now you are free to go. /{Enter}
sleep, 100
SendEvent t as builder you can /{Enter}
sleep, 100
SendEvent tbuild in builder worlds /{Enter}
sleep, 100
SendEvent t(type /worlds to see worlds) {Enter}
}
return


Top
Offline Profile  
Reply with quote  
 Post subject: .
PostPosted: February 26th, 2012, 9:33 pm 
OP
User avatar

Joined: February 9th, 2012, 2:09 pm
Posts: 151
Be that way.

_________________
<+FCB>Arvarna: i think your banhammer needs a downgrade


Last edited by LiamRayStanley on February 26th, 2012, 10:28 pm, edited 1 time in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: February 26th, 2012, 9:55 pm 
User avatar

Joined: May 25th, 2011, 4:00 pm
Posts: 381
Location: #fCraft
LiamRayStanley wrote:
Code:
...
SendEvent tSpamming, or Tunneling, we will KICK U /{Enter}
SendEvent tOr even BAN U from our Server.{Enter}
...
SendEvent /me said GTFO, or We'll Troll You.{Enter}
...
SendEvent That was just amazing...{Enter}
...
SendEvent /me Smacks his face on his keyboard...{Enter}
...

That is more of a spam script..

_________________
Life is a endless pleasure!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 19th, 2012, 6:54 am 
Trustee
User avatar

Joined: December 17th, 2011, 12:27 am
Posts: 218
Location: UK
Places a block around you in mid air when you type '/.place'. Doesn't work if you move while it's executing the commands which could only be fixed with a smaller sleep which I can't seam to get working.

Code:
::.place::
IfWinActive Minecraft  Coords
{
sleep 50
send c {enter}
sleep 50
send t
sleep 50
send /m {enter}
sleep 50
send t
sleep 50
send /m {enter}
}
else
send .place
return

_________________
["hip","hip"]


Last edited by Ninjacat101 on June 19th, 2012, 11:06 am, edited 2 times in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 19th, 2012, 9:08 am 
Trustee
User avatar

Joined: July 26th, 2011, 11:34 pm
Posts: 289
Ninjacat101 wrote:
Doesn't work if you move while it's executing the commands which could only be fixed with a smaller sleep which I can't seam to get working.

Minecraft calculates with 20ticks/seconds internally. I doubt you can lower the delay time any further.
I'm not familiar with AHK scripting, but isn't it possible to replace
Quote:
sleep 50
send /
sleep 50
send m
sleep 50
send {enter}

with
Quote:
sleep 50
send /m {enter}

or something alike?

_________________
The man in black fled across the desert, and the gunslinger followed.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Instructional: Autohotkey
PostPosted: June 19th, 2012, 11:05 am 
Trustee
User avatar

Joined: December 17th, 2011, 12:27 am
Posts: 218
Location: UK
Wundsalz wrote:
Ninjacat101 wrote:
Doesn't work if you move while it's executing the commands which could only be fixed with a smaller sleep which I can't seam to get working.

Minecraft calculates with 20ticks/seconds internally. I doubt you can lower the delay time any further.
I'm not familiar with AHK scripting, but isn't it possible to replace
Quote:
sleep 50
send /
sleep 50
send m
sleep 50
send {enter}

with
Quote:
sleep 50
send /m {enter}

or something alike?


Updated previous post :P It does work, although I added those sleeps when I had an issue with it doing things too quickly for minecraft to keep up.

_________________
["hip","hip"]


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net