Need help from anybody familiar with AHK script - Overclock.net - An Overclocking Community

Forum Jump: 

Need help from anybody familiar with AHK script

 
Thread Tools
post #1 of 6 (permalink) Old 08-28-2016, 03:31 PM - Thread Starter
New to Overclock.net
 
Avalar's Avatar
 
Join Date: Apr 2016
Posts: 2,152
Rep: 37 (Unique: 27)
I wanted to add a fairly simple process to this AHK script that I have.
Code:
; <COMPILER: v1.1.24.00>
Hotkey, *lbutton, Toggle
~\::Hotkey, *lbutton, Toggle
*lbutton::
While GetKeyState("lbutton", "P")
{
Send,{lbutton}
Random, delay, 35, 110
Sleep %delay%
}
return

It's an autoclicker, of sorts. What I wanted to add was a hotkey that, when pushed, will disable the left mouse button from clicking automatically for 7 seconds.

Everything I own or have used extensively in an alphabetical list. Ask me anything! ^-^
CPU
Ryzen 1600
Motherboard
ASRock AB350
GPU
Asus Strix GTX 1070
RAM
G-Skill 2x8GB 3200MHz
Hard Drive
Samsung 850 EVO 1TB
Power Supply
EVGA 500BQ
Cooling
Cryorig H7
Case
Rosewill Viper Z
Operating System
Windows 10 Pro
Monitor
Acer GN246HL
Keyboard
Corsair K65
Mouse
Too many
Mousepad
Too many
Audio
SHP9500
▲ hide details ▲
Avalar is offline  
Sponsored Links
Advertisement
 
post #2 of 6 (permalink) Old 08-28-2016, 07:27 PM
New001
 
Join Date: Feb 2016
Posts: 2,668
Hi,
For all things programming, your best place to find answers is IRC!
https://autohotkey.com/board/topic/24883-join-the-autohotkey-irc-channel/

There is an irc channel on the freenode network (most coding related channels can be found on this network) and it will be full of people who are into using AutoHotKey. You should be able to get answers to your questions quite quickly depending on your timezone.
Paste your code into a pastebin-type site, pastie.org or similar, and flick it to them over IRC and see what they say smile.gif
spinFX is offline  
post #3 of 6 (permalink) Old 08-28-2016, 08:35 PM - Thread Starter
New to Overclock.net
 
Avalar's Avatar
 
Join Date: Apr 2016
Posts: 2,152
Rep: 37 (Unique: 27)
Quote:
Originally Posted by spinFX View Post

Hi,
For all things programming, your best place to find answers is IRC!
https://autohotkey.com/board/topic/24883-join-the-autohotkey-irc-channel/

There is an irc channel on the freenode network (most coding related channels can be found on this network) and it will be full of people who are into using AutoHotKey. You should be able to get answers to your questions quite quickly depending on your timezone.
Paste your code into a pastebin-type site, pastie.org or similar, and flick it to them over IRC and see what they say smile.gif

I did actually already try them lol. Unfortunately, they weren't very much help. I was greeted by a couple of guys who could do nothing but condescend and insult me on my lack of knowledge. I only asked them to explain, what should be, an extremely simple script, but I guess they couldn't be bothered.

I wasn't looking forward to learning the entire language, because I don't plan on using AHK anymore after I've figured this out.

Everything I own or have used extensively in an alphabetical list. Ask me anything! ^-^
CPU
Ryzen 1600
Motherboard
ASRock AB350
GPU
Asus Strix GTX 1070
RAM
G-Skill 2x8GB 3200MHz
Hard Drive
Samsung 850 EVO 1TB
Power Supply
EVGA 500BQ
Cooling
Cryorig H7
Case
Rosewill Viper Z
Operating System
Windows 10 Pro
Monitor
Acer GN246HL
Keyboard
Corsair K65
Mouse
Too many
Mousepad
Too many
Audio
SHP9500
▲ hide details ▲
Avalar is offline  
Sponsored Links
Advertisement
 
post #4 of 6 (permalink) Old 09-02-2016, 11:30 PM - Thread Starter
New to Overclock.net
 
Avalar's Avatar
 
Join Date: Apr 2016
Posts: 2,152
Rep: 37 (Unique: 27)
So can anybody still help with this? I'm not closer to solving it, lol. I added another hotkey, but I have no clue how to do anything with it.
Code:
; <COMPILER: v1.1.24.00>
Hotkey, *lbutton, Toggle
~\::Hotkey, *lbutton, Toggle
F8::Hotkey, *lbutton, Toggle
*lbutton::
While GetKeyState("lbutton", "P")
{
Send,{lbutton}
Random, delay, 35, 110
Sleep %delay%
}
return

Everything I own or have used extensively in an alphabetical list. Ask me anything! ^-^
CPU
Ryzen 1600
Motherboard
ASRock AB350
GPU
Asus Strix GTX 1070
RAM
G-Skill 2x8GB 3200MHz
Hard Drive
Samsung 850 EVO 1TB
Power Supply
EVGA 500BQ
Cooling
Cryorig H7
Case
Rosewill Viper Z
Operating System
Windows 10 Pro
Monitor
Acer GN246HL
Keyboard
Corsair K65
Mouse
Too many
Mousepad
Too many
Audio
SHP9500
▲ hide details ▲
Avalar is offline  
post #5 of 6 (permalink) Old 10-18-2016, 12:10 AM
New to Overclock.net
 
Join Date: Jul 2009
Location: Perth, WA
Posts: 106
Rep: 8 (Unique: 8)
Probably too late to help you sorry tongue.gif but something like this should easily do it. I set the hotkey to F3 below to disable left click for 7 seconds.
Code:
f3::
Hotkey,lbutton,DoesNothing,On
SetTimer, DisableFor,7000
return

DoesNothing:
;Nothing at all!
return

DisableFor:
Hotkey,lbutton,DoesNothing,Off
return


Hotkey, *lbutton, Toggle
~\::Hotkey, *lbutton, Toggle
*lbutton::
While GetKeyState("lbutton", "P")
{
Send,{lbutton}
Random, delay, 35, 110
Sleep %delay%
}
return

Big lez is love
cheers.gifAUSSIE OCN CLUBcheers.gif
S0ULphIRE is offline  
post #6 of 6 (permalink) Old 10-18-2016, 01:45 PM - Thread Starter
New to Overclock.net
 
Avalar's Avatar
 
Join Date: Apr 2016
Posts: 2,152
Rep: 37 (Unique: 27)
Quote:
Originally Posted by S0ULphIRE View Post

Probably too late to help you sorry tongue.gif but something like this should easily do it. I set the hotkey to F3 below to disable left click for 7 seconds.
Code:
f3::
Hotkey,lbutton,DoesNothing,On
SetTimer, DisableFor,7000
return

DoesNothing:
;Nothing at all!
return

DisableFor:
Hotkey,lbutton,DoesNothing,Off
return


Hotkey, *lbutton, Toggle
~\::Hotkey, *lbutton, Toggle
*lbutton::
While GetKeyState("lbutton", "P")
{
Send,{lbutton}
Random, delay, 35, 110
Sleep %delay%
}
return

Lol hey, thanks for the reply. Eventually, I did figure out roughly what to do, but I'll definitely try this when I get home to my PC, just out of curiosity. tongue.gif

Everything I own or have used extensively in an alphabetical list. Ask me anything! ^-^
CPU
Ryzen 1600
Motherboard
ASRock AB350
GPU
Asus Strix GTX 1070
RAM
G-Skill 2x8GB 3200MHz
Hard Drive
Samsung 850 EVO 1TB
Power Supply
EVGA 500BQ
Cooling
Cryorig H7
Case
Rosewill Viper Z
Operating System
Windows 10 Pro
Monitor
Acer GN246HL
Keyboard
Corsair K65
Mouse
Too many
Mousepad
Too many
Audio
SHP9500
▲ hide details ▲
Avalar is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off