Autohotkey help

Started by mcgif, January 04, 2010, 02:49:26 PM

Previous topic - Next topic

mcgif

OK, so for starters I hope I'm posting in the right sub-forum. I searched for similar threads, but found nothing...

I was trying to make simple script in autohotkey to have 180 rotation button on TF, and failed. I did research and tried different things, and the script seems to be working in windows etc, but not on TF.

I use Windows Viste (;l) and google chrome.

Current version of my code looks like this


Shift::
Send {Up}
Sleep 25
Send {Up}
return


I'm pretty sure that I'm doing sth stupid in here, or maybe I should call Up key in a different way to make it work on TF...

Any hints ?

Thx in advance c:

Someone2knoe

You were on the right track by adding 25 delay.

The problem is TF also checks for how long the key is being held down, and since autohotkey presses
the key extremely fast it ignores it.


setkeydelay 25,25

Shift::
send {up}{up}
return


The first number in setkeydelay is the delay between the keypresses
The second number is how long the key will be held down.

You can play with the numbers, but that should work perfectly.

mcgif

#2
god I love you

thx mate !


if only TF would distinguish left shift from the right one... psh, now I have to find a different key for hold...

thx again

edit:


25/25 wasn't working every time, but 30/30 seems to work perfectly

Someone2knoe

#3
Haha it can't distinguish between the different shifts, but autohotkey can.

example:
LShift::up
RShift::down


and then each shift will do something different

mcgif

#4
yeah I know, but still on TF there is only one SHIFT and that's it ;/

so if LShift = hold and RShift = 180 rotate, if i press RShift it will use hold AND double rotate ;/

yet another reason to hate TF

And I'm using the same keyboard setup in all Tetris games.

Someone2knoe

#5
tell me what you want all your controls set up as and i'll script it

edit:

actually just do this, set your hold key on TF to a button you dont use.

For example I will use P

then script

LShift::P


then Lshift will hold,  Rshift will do 180

mcgif

hahah god now i feel so stupid

thx man. that was so simple in a way... sigh, but you can't expect too much from a guy who sleeps 4 hours a day ;p

thx again, you made my day (or rather night 2 am)

Someone2knoe

haha no problem, glad i could help

Sisu

#8
This worked for me:


setkeydelay 50,50

S2k is pro.  

Anybody with other settings that work for TF 180 rotate?
Anybody need help getting TF 180 rotate to work for them?

Profane

i want to 180 rotate with A so what do i set my script as?

gif

Quote from: Profane
i want to 180 rotate with A so what do i set my script as?


my guess would be


setkeydelay 25,25

a::
send {up}{up}
return

(implying that up is one of your rotates. but if you use different button for rotate, you need to change the up up part.)

tell me which keys do you use for rotating

Profane

i use s to rotate and d to rotate the other way

do i need to change the up up to 's' 'd'

gif

setkeydelay 50,50

a::
send {d 2}
return


Profane