Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Creating a Script (Holding down Shift)


  • Please log in to reply
4 replies to this topic
dormaine
  • Members
  • 2 posts
  • Last active: Aug 23 2014 11:49 PM
  • Joined: 21 Aug 2014

Hello all,

 

 Want to achieve the following command, any help would be greatly appreciated!

 

Pressing Shift will hold "Shift" permanantly
Pressing 2 will disable "Shift" and able to use "2" normally

Once "2" Is used "Perma Shift" would kick in again.

In a way only pressing "2" would disable Shift for a while while the rest of the key would still be able to work with "Perma Shift"

 

Thanks!
 



flyingDman
  • Spam Officer
  • 2186 posts
  • Last active: Nov 07 2015 08:15 AM
  • Joined: 27 Feb 2009

Try this:

$shift:: send {shift down}

@:: send {shift up}

Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”


dormaine
  • Members
  • 2 posts
  • Last active: Aug 23 2014 11:49 PM
  • Joined: 21 Aug 2014

Works perfectly!

 

However is it possible after usage of "2" that it will automatically goes back to perma "Shift mode" instead of manually pressing Shift again to activate "Perma Shift"?

 

Thanks a lot!



flyingDman
  • Spam Officer
  • 2186 posts
  • Last active: Nov 07 2015 08:15 AM
  • Joined: 27 Feb 2009

You can simply do @:: send 2 but you'll need to have a key to get out of "perma shift"


Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”


Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013
$shift::send {shift down}

$@::send {shift up}

$2::
	send, 2
	sleep, 20
	send, {shift down}
return

OnExit:
      if GetKeyState("LShift")
         Send, {Blind}{LShift Up}
ExitApp