Complete Noob - GUI button to toggle shift

Ask gaming related questions
damon4949
Posts: 1
Joined: 18 Jan 2018, 02:34

Complete Noob - GUI button to toggle shift

18 Jan 2018, 02:38

I've made my button and labelled it ect but the guide I was following didn't show how to toggle holding the shift key down when the button is clicked and I'm really confused as to how labels and functions are used to do this


All I want is when I click the button, it holds shift until I click the button again

Cheers :)
User avatar
StundeR
Posts: 18
Joined: 03 Aug 2016, 10:05

Re: Complete Noob - GUI button to toggle shift

19 Jan 2018, 12:10

Code: Select all

toggled = 0
Gui, Add, Button, gLabel, Toggle
Gui, Show, w150 h100
return
Label:
if (toggled = 0){
	toggled = 1
	Send, {LShift down}
	}
else if (toggled = 1){
	toggled = 0
	Send, {LShift up}
	}
return
Hi

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 23 guests