Jump to content

Join our Slack

Talk to other users and have a great time
Slack Server

Welcome to our Community

Click here to get your Exiled Bot license
Donation Store
Sign in to follow this  
hamncheese

How to Install and use Autohotkey or AHK, for your Script

Recommended Posts

i made this small guide because ive met quite a number of ppl who dont know how to use script with this bot.

most ppl in this forum would use script based on Autohotkey program, so when someone said script it usually meant Autohotkey / AHK

 

 

General Installation Tutorial

 

1. Download and Install AHK

so, first step Google AHK or Autohotkey and Download

 

lU69wYM.png

 

go to http://www.autohotkey.com/

click download

select the approriate version for your VM or Bot system

so if your VM is win 7, 64bit download the 64bit ver

ZGO6WYx.png

 

and of course install the AHK

for ppl who like to keep their AHK files in their Main system / Host and VM access the AHK files through Shared Folders

i would suggest installing AHK in your HOST and your VM

 

2. Creating / Copying a script

now for my example im going to use the most widely used script : Chat Channel Advertising / Spamming

 

**ps: this script mostly will not hinders your Toon activities, u can kill, cast skill, pick up stuff, open stash, etc while this script spamms the trade chat

 

F9 = will Reload the script and stops the spamming

F10 = Panic button, if the script went haywire and cause your pc to the brink of blowing up, F10 will force close this script

 

F8 =  run script

 

F9::Reload 
F10::Exitapp






F8::
SendMode Input
Loop
{


Send {ENTER}    
Send /trade 100
Send {ENTER}
sleep, 1000
Send {ENTER}
Send /trade %A_Index%
Send {ENTER}
Sleep, 1000
Send {ENTER}    
Send {Up 3}
Send {ENTER}
sleep, 1000
Send {ENTER}    
Send /trade 100
Send {ENTER}
sleep 1000
If A_Index = 10
Break
else
Sleep, 1000
}

Copy the above code and paste it into your prefered text editor ex: Notepad

 

Save the file to Desktop (u can move it later to wherever u like)

click Save as Type  > All files

name the file : Trade Spam.ahk

 

fYsuptp.png

 

 

u should see this kind of icon in your Desktop

right : icon have red H, this means the file is AHK file and ready for launch

hxUcR5z.png

 

wrong : icon looks like a normal Notepad files, this means u need to change the extension from .txt to .ahk

MEjifLK.png

 

3. Running Your Script

double click the files (with red H) u just saved and if all goes well u should see this icon on your taskbar (lower right corner) 

 

6iUrj0n.png

 

Congratulation your script is now running and ready for execution

 

Script Specific Parts

This tutorial will cover on How To use the above example script specifically, other scripts may have different how-to

to use this script : 

 

1. in game, type anything u want to the trade channel 

and press enter

fGB8IHc.png

 

2. Press F8

3. make some coffe + bagel and enjoy your afternoon tea while the script looks for potential customer

4. when a potential customer Whisper / PM you, pres F9 to stop the script

5. if something went wrong and the script refused your command to stop and starts killing kittens immedeately press F10

 

Thats is for now, if ppl like my guide, i will update this guide / tutorial with more info such as : 

How to get good looking and easy readable text editor for AHK 

IJBEjtT.png

Edited by hamncheese
  • Upvote 1

Share this post


Link to post
Share on other sites

as per request im adding a rough code AHK based for a simple 

Auto Level Skill Gem

this small script will 

- scan your right side of the window every 5 Second

- if it found the + sign, script will click it

 

i know my code is hideous lol

please be gentle i am no coder just someone who likes to tinker with stuff   :P

GoSub, Loop1
SetTimer, Loop1, 5000 ; change this timer to your liking

Loop1:
ImagePath = Z:\POE\Path Of Exile\Image ;u need to change this to the folder where you saved the image file
ImageName = gem.bmp ; change this to your image filename
{
	ImageSearch, gemx, gemy, 752, 179, 788, 444, *n *50 %ImagePath%\%ImageName% 
	{ 
		if ErrorLevel = 0 
		{ 
			TrayTip,, level up gem 
			click, %gemx%, %gemy% 
			return 
		} 
	}
}
	

now u need 1 more thing

a screenshot of your + sign for level up

here is mine 

iozywlb.png

and this is the link for the file in case u want to try using this one

 

but i would suggest u create your own screenshot as the resolution and whatnot might be different

heres how u do it

1. go to one of your VM / POE window

 

2. press Princtsreen

 

3. open Microsot Paint

 

4. press Ctrl+V

or click Paste

and u should see your screenshot

something like this 

*** in this example im goind to use a Greyed out + sign because i dont have any toon with Yellow + sign atm

but the principle stays the same ***

s9TZbiY.png

 

 

5. Zoom in to that + Sign (Maximum Zoom)

rfkPWAf.png

 

6. Now were going to Cut the + Sign and we want the to cut as small as possible

sg3bQT4.png

 

 

7. save the image as 24bit BMP

and youre done, dont forget to change the directory to the where u keep your image file

and u can do this for every image you need to scan/look

Edited by hamncheese

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...