It is currently Tue Apr 23, 2019 11:17 am



Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3, 4  Next
 AutoHotkey Guide 
Author Message
Commissioner
User avatar

Joined: Fri Jul 13, 2012 11:23 am
Posts: 2684
Post Re: AutoHotkey Guide
Instructions weren't clear enough. Got my dick stuck in the toaster.

JK, nice guide


Fri May 08, 2015 6:45 pm
Profile
Sergeant
User avatar

Joined: Sat Jul 09, 2011 3:15 pm
Posts: 244
Location: Tunisia
Gender: Male
Personal Text: Enjoying the finest things in life
Post Re: AutoHotkey Guide
Sea I simply use this cmd for a rdm lotto number with one button press each gameday (two acutally, alt+l for me) and it works as a charm

!l::
random, lotto, 1, 150
sendinput t/lotto %lotto%{enter}
return

hm well , I recently lost my fishlog that my friend made me years ago, ive never been into AHK sooo
cld u tell me how exactly can I stop the loop? i mean i used to press f3 to launch it and it used to automatically and infinitely fish each 10sec(the time needed between two fish attempts WHEN u have a Rod) and I press f10 when I wanted to completely stop the loop.
Copy paste here the cmd needed if u dnt mind and thanks!

_________________
Image


Wed May 27, 2015 6:14 am
Profile
Commissioner
User avatar

Joined: Wed Oct 30, 2013 7:32 pm
Posts: 2476
Location: Serbia
Gender: Male
Post Re: AutoHotkey Guide
Great guide.
I was always wondering how to do random vehc but was too lazy to look it up.


Wed Jun 03, 2015 10:59 am
Profile
Captain

Joined: Tue Aug 14, 2012 7:36 am
Posts: 892
Gender: Male
Personal Text: straight out africa, no shame, no guilt.
Post Re: AutoHotkey Guide
how to use the numbers above azertyuiop


Thu Jul 16, 2015 8:16 am
Profile
CnR Admin
User avatar

Joined: Sun Aug 01, 2010 12:49 am
Posts: 1077
Location: woust
Gender: Male
Post Re: AutoHotkey Guide
ColgateCnR wrote:
how to use the numbers above azertyuiop

Just type the number without any prefixes, like this:

Code:
1:: SendInput t/lock{Enter}


or if you want to use a key combination, you can do something like this (SHIFT + 1):

Code:
+1:: SendInput t/lock{Enter}

_________________
Once the one demon gets in he brings his friends in as well, and once they grab ahold of you, they take control of you, then you're not yourself anymore, then you destroy yourself, and you destroy other people, and you are in bondage, you cannot do anything about it - you become a captive of satan


Thu Jul 16, 2015 8:26 am
Profile WWW
Captain

Joined: Tue Aug 14, 2012 7:36 am
Posts: 892
Gender: Male
Personal Text: straight out africa, no shame, no guilt.
Post Re: AutoHotkey Guide
not working, can you make one and upload it please


Thu Jul 16, 2015 8:32 am
Profile
Captain

Joined: Tue Aug 14, 2012 7:36 am
Posts: 892
Gender: Male
Personal Text: straight out africa, no shame, no guilt.
Post Re: AutoHotkey Guide
jawher7 wrote:
Sea I simply use this cmd for a rdm lotto number with one button press each gameday (two acutally, alt+l for me) and it works as a charm

!l::
random, lotto, 1, 150
sendinput t/lotto %lotto%{enter}
return

hm well , I recently lost my fishlog that my friend made me years ago, ive never been into AHK sooo
cld u tell me how exactly can I stop the loop? i mean i used to press f3 to launch it and it used to automatically and infinitely fish each 10sec(the time needed between two fish attempts WHEN u have a Rod) and I press f10 when I wanted to completely stop the loop.
Copy paste here the cmd needed if u dnt mind and thanks!


"my friend made me''? you never been here when anonybus was playing regulary 8)

anyways, here it is

(put a key to activate it)::

stopfish = false

random, fishsleep, 8000, 8500

loop

{

sendinput %finvtoggle%t/fish{enter}

sleep, %fishsleep%

if stopfish = true

break

}

return


(put a key to desactivate it)::

stopfish = true

return


!f12::

if finv =

finv = false

if finv = false

{

finvtoggle = t/finv{enter}

finv = true

}

else if finv = true

{

finvtoggle =
finv = false
}
return


Thu Jul 16, 2015 9:04 am
Profile
Lieutenant
User avatar

Joined: Mon Dec 19, 2011 12:46 pm
Posts: 409
Gender: Male
Post Re: AutoHotkey Guide
Nice guide, Thanks!

_________________
Age is something that doesn't matter, unless you are a cheese.


Thu Jul 16, 2015 9:37 am
Profile
Commissioner
User avatar

Joined: Wed Jan 30, 2013 4:35 am
Posts: 3046
Location: Croatia
Gender: Male
Personal Text: Crazy Insane or Insane Crazy?
Post Re: AutoHotkey Guide
SEA wrote:
Papi wrote:
For e.g if my 'z' key is for /sit 8.
If i'm typing a sentence and i use z in chatbox, will that z alphabet be replaced by /sit 8 command?

Yes, because AHK doesn't detect whether the chat box is open or not.

Yes it does, if you program it to do so:

Just copy paste this into your file and you're good to go
Code:
#UseHook

t::
Suspend On
SendInput t
Hotkey, Enter, On
Hotkey, Escape, On
Hotkey, t, Off
return

NumpadEnter::
Enter::
Suspend Permit
Suspend Off
SendInput {Enter}
Hotkey, t, On
Hotkey, Enter, Off
Hotkey, Escape, Off
return

Escape::
Suspend Permit
Suspend Off
SendInput {Escape}
Hotkey, t, On
Hotkey, Enter, Off
Hotkey, Escape, Off
return

_________________
Image


Thu Jul 16, 2015 7:22 pm
Profile WWW
Commissioner

Joined: Fri Jan 06, 2012 4:52 am
Posts: 2997
Post Re: AutoHotkey Guide
I know this is kind of a bump, but since I've been asked a few questions regarding ahk, I'll post answers here.
Papi wrote:
For e.g if my 'z' key is for /sit 8.
If i'm typing a sentence and i use z in chatbox, will that z alphabet be replaced by /sit 8 command?

In order to avoid "linking" binds as said in your example, you have to use $-sign in front of every key you want to bind.

Example 1:
Code:
1::Sendinput t/lk{enter}
return

3::Sendinput t/dance 1{enter}
return

This set of binds does the following: When you press number 1 (above Q letter on the keyboard), it'll execute /lk command for you. But, if you press number 3, it'll execute /dance t/lk. So, this is good to avoid, because it obviously reduces number of keys we can use.

Example 2: But if you do it this way (with $-sign):
Code:
$1::Sendinput t/lk{enter}
return

$3::Sendinput t/dance 1{enter}
return

This way you'll avoid underlined part from above, which means pressing 1 means /lk, and pressing 3 means /dance 1 (without that 1 being "converted" into /lk).


Another note: Some people say they're having troubles with having chatbox open. There are 2 ways to work around this, and here I'll explain them. TR3's code works as well, but there are a few solutions which are a bit more simple.
1. Making togglable ON/OFF key for your keybinds (using 2 keys)
Code:
$F10::
   Suspend
   Suspend Off
return

$F11::
   Suspend On
return

Pressing F10 key will turn your keybinder ON, meaning your keybinds will work everywhere (yes, even when you open the chat box).
Pressing F11 key will suspend (read "pause"/disable) your keybinder.
Why is this good? Let's say you want to chat normally and be idle in CH. You press F11, and you can do whatever you like with your keyboard, without worrying if it'll write some nonsense on the chat. Once you are about to stop chatting, or just want to exit CH, you can press F10 once, and your binds are ready. If you feel like opening the chatbox again, press F11 again prior to doing so.

2. Making togglable ON/OFF key for your keybinds (using 1 key)
Code:
$F10::
   Suspend Toggle
return

As you can read from this simple code, it works like this: press F10 to toggle your script on/off.

2. Making "automatic" turn on/off key
This will rely on the fact chatbox can be opened by pressing either F6 or t, and closed by pressing either ESC or enter. Therefore we can write this:
Code:
~t::
   Suspend On
   return   
~F6::
   Suspend On
   return
~enter::
   Suspend Off
   return
~Esc::
   Suspend Off
   return

~ sign represents ahk's function which will NOT block that key's native function. It's somewhat similar to $-sign.
For more information, visit ahk's page on suspend command.

I've been also asked how to read chatlog. First of all, I don't support fully-automated gameplay. Secondly, I have 2 versions of how to read chatlog, and set your bind according to it, but the code is not "that" simple. I mean, it's not complicated, but I don't think pasting it here would help much.


As in real life, in programming idea is the main thing you start from. I don't think ahk is some serious programming, but still... it can be quite interesting once you realise the syntax and some other stuff. Regarding ahk, there are some interesting functions/commands which can be used in great number of ways. So start up your imagination, and be creative, that's all you need to make a decent keybinder, all by yourself.

_________________
I'm not playing other games || not using social media || not having a steam/whatever account.


Thu Oct 20, 2016 6:12 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page Previous  1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users 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

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
Localized by Maël Soucaze © 2010 phpBB.fr