Help on Simple Script Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
SkyBreather11

Help on Simple Script

25 May 2016, 13:42

LButton::
Send, {n down}
Send, {RButton down}
Send, {RButton up}
Send, {n up}

x::
Pause
Return

Anyone know on how I could fix this? Everytime I press left click, it makes it so the script is paused, but everytime I press left click again it unpauses. I was hoping to try to make it so when I Left click it sends those down and up, along with X being the toggle on and off for it. Anyone know how? If so, please tell me what to add to my script and where if that's okay with you.
User avatar
rootmos
Posts: 35
Joined: 11 Mar 2016, 04:38
Location: Sweden
Contact:

Re: Help on Simple Script  Topic is solved

25 May 2016, 13:50

You can toggle the hotkeys for Lbutton with this code:

Code: Select all

F1::Hotkey,Lbutton,Toggle
Look at me, I am your god now.
SkyBreather
Posts: 12
Joined: 25 May 2016, 13:37

Re: Help on Simple Script

25 May 2016, 13:54

rootmos wrote:You can toggle the hotkeys for Lbutton with this code:

Code: Select all

F1::Hotkey,Lbutton,Toggle
Sorry, I wasn't clear enough on my part. My bad. What I meant was like I want to be able to toggle the script on and off with X, because what happens is that I'm not able to left click. For some reason the hotkey for Left click connects with the hotkey of X and I'm not able to left click at all. What happens is that when I left click, It pauses the script and then unpauses it. It does the commands that the hotkey X does. I'm just wondering if there's anyway for me to separate the 2 from each others commands. Do you know how to fix it?
Last edited by SkyBreather on 25 May 2016, 14:01, edited 1 time in total.
User avatar
rootmos
Posts: 35
Joined: 11 Mar 2016, 04:38
Location: Sweden
Contact:

Re: Help on Simple Script

25 May 2016, 13:59

I think I understand, it seems like you missed the Return command in the end dof the Lbutton:: code
Sorry, I wasn't clear enough on my part. My bad. What I meant was like I want to be able to toggle the script on and off with X, because what happens is that I'm not able to left click. For some reason the script connects with the X and what it does. Do you know how to fix it?

Code: Select all

LButton::
Send, {n down}
Send, {RButton down}
Send, {RButton up}
Send, {n up}
Return

x::
;Hotkey,Lbutton,Toggle
Pause
Return
Or instead of pause you can just toggle the single hotkey instead of pausing the whole script! Just a tip if you want to add more hotkeys :)
Look at me, I am your god now.
SkyBreather
Posts: 12
Joined: 25 May 2016, 13:37

Re: Help on Simple Script

25 May 2016, 14:02

rootmos wrote:I think I understand, it seems like you missed the Return command in the end dof the Lbutton:: code
Sorry, I wasn't clear enough on my part. My bad. What I meant was like I want to be able to toggle the script on and off with X, because what happens is that I'm not able to left click. For some reason the script connects with the X and what it does. Do you know how to fix it?

Code: Select all

LButton::
Send, {n down}
Send, {RButton down}
Send, {RButton up}
Send, {n up}
Return

x::
;Hotkey,Lbutton,Toggle
Pause
Return
Or instead of pause you can just toggle the single hotkey instead of pausing the whole script! Just a tip if you want to add more hotkeys :)
Thanks so much!
SkyBreather
Posts: 12
Joined: 25 May 2016, 13:37

Re: Help on Simple Script

25 May 2016, 14:05

rootmos wrote:I think I understand, it seems like you missed the Return command in the end dof the Lbutton:: code
Sorry, I wasn't clear enough on my part. My bad. What I meant was like I want to be able to toggle the script on and off with X, because what happens is that I'm not able to left click. For some reason the script connects with the X and what it does. Do you know how to fix it?

Code: Select all

LButton::
Send, {n down}
Send, {RButton down}
Send, {RButton up}
Send, {n up}
Return

x::
;Hotkey,Lbutton,Toggle
Pause
Return
Or instead of pause you can just toggle the single hotkey instead of pausing the whole script! Just a tip if you want to add more hotkeys :)
Nevermind, It's still glitching out. IDK why. I press X and then when I left click, it reactivates the script on and then off again.

EDIT: OH NOW I REALISE MY PROBLEM, I can't have them in same script XD

EDIT AGAIN: Nope, still not working.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Help on Simple Script

25 May 2016, 14:15

Try Suspend.
Please excuse my spelling I am dyslexic.
SkyBreather
Posts: 12
Joined: 25 May 2016, 13:37

Re: Help on Simple Script

25 May 2016, 14:17

Capn Odin wrote:Try Suspend.
Fixed it, thank you. For those looking at this, Here's the outcome of my script now.

LButton::
Send, {n down}
Send, {RButton down}
Send, {RButton up}
Send, {n up}
Return

x::
;Hotkey,LButton,Toggle
Suspend
Return
User avatar
rootmos
Posts: 35
Joined: 11 Mar 2016, 04:38
Location: Sweden
Contact:

Re: Help on Simple Script

25 May 2016, 14:22

You can remove

Code: Select all

;Hotkey,LButton,Toggle
if you want, it's just a comment. :)
Look at me, I am your god now.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], mstrauss2021, Spawnova, william_ahk and 363 guests