Need a Little Help for creating Script

Get help with using AutoHotkey and its commands and hotkeys
noobgraphicartist
Posts: 51
Joined: 12 Jan 2015, 18:36

Need a Little Help for creating Script

21 Apr 2017, 07:14

i need a little help creating a complicated script
basically i want to create a script like this

example
if i press letter 'W' then it will send W
but when I hit W again for the second time , it will not send or do anything because
the last previous keyboard pressed is 'W'

more clarification or example
you cannot type
WWHEAT , WWAR

ps : If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
i really dont want to use this command

i hope someone can help :(
Last edited by noobgraphicartist on 21 Apr 2017, 07:33, edited 1 time in total.
WalkerOfTheDay
Posts: 70
Joined: 24 Mar 2016, 03:01

Re: Need a Little Help for creating Script

21 Apr 2017, 07:32

Not sure what you are trying to accomplish, but:



turns WW into W when you type it.
noobgraphicartist
Posts: 51
Joined: 12 Jan 2015, 18:36

Re: Need a Little Help for creating Script

21 Apr 2017, 07:37

WalkerOfTheDay wrote:Not sure what you are trying to accomplish, but:



turns WW into W when you type it.


thanks for fast reply
sadly this is not im looking for

to elaborate more
i am going to use the script mainly for Zbrush

in Zbrush when i assigned W as keyboard shortcut key for ZADD
the function is toggling in cycle mode ( ON / OFF)
which i really dont want

i want to disable the OFF

so i come up with the idea and dont know if its possible in AHK

if i press letter 'W' then it will send W
but when I hit W again for the second time , it will not send or do anything because
the last previous keyboard pressed is 'W'
User avatar
jeeswg
Posts: 738
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Need a Little Help for creating Script

21 Apr 2017, 14:51

I have a few ideas that might be useful:

The hotkeys may interfere with hotstrings.

This prevents any letter, or its capital being repeated.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



This prevents w, or its capital being repeated. If any of q/e/r/t/y is pressed, they work as normal, but allow w to be pressed once more, although you will still not be able to repeat w.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Based on the problem you described, something like this may be desirable. You can only press w once per window, although if the window title changes, you will be able to press w once more.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



More simply, you can only press w once per window.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: Flipeador, magicinmath, Marcosa1020 and 10 guests