AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

To suspend a suspend key and macro?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
WasItYou



Joined: 20 Nov 2009
Posts: 3

PostPosted: Fri Nov 20, 2009 3:46 pm    Post subject: To suspend a suspend key and macro? Reply with quote

Hello.

I have been thinking this for a while and now I gave up. I'm pretty lost with this so, now I need some help.

Home is ment to be as main swich, it shut downs the whole macro.

This is should to be working ingame:

Code:
Pause::Pause


Home::Suspend

*Rbutton::Suspend


End::

{
Sleep 500
Suspend
}


*Lbutton::

Loop
{
GetKeyState, state, Lbutton, P
if state=U
break
Sendinput {Click down}
Sleep 30
Sendinput {Click up}
Sleep 30
}

Return


This should go like this:

1. From Home, you can stop whole macro and suspend all hotkeys and keys.
2. Rbutton swiches between suspend macro on Lbutton On/Off and works as a button ingame same time, BUT when you press Home, it should stop working as suspend key, but it still need to be working ingame normally.
3. End suspends macro on Lbutton and I have it working as it should be.
4. Lbutton works as a autoclicker, it works and is ment to be suspended from Home, Rbutton and End. This button is also needed as ingame button while suspended.

All this happens ingame.

Problem is that Home doesn't suspend all, so it doesn't work as main swich.

Ask, if I wasn't clear enough.
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 1770
Location: MN, USA

PostPosted: Fri Nov 20, 2009 5:53 pm    Post subject: Reply with quote

AHK Help File wrote:
Any hotkey/hotstring subroutine whose very first line is Suspend... will be exempt from suspension.

I think this is what you want. It sounds like End and RButton should do the same thing?
Code:
Pause::Pause

Home::Suspend

End::
*Rbutton::
Sleep,500
Suspend
return

*Lbutton::
Loop {
 GetKeyState, state, Lbutton, P
 if state=U
 break
 Sendinput {Click down}
 Sleep 30
 Sendinput {Click up}
 Sleep 30
}
return

_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
WasItYou



Joined: 20 Nov 2009
Posts: 3

PostPosted: Fri Nov 20, 2009 6:35 pm    Post subject: Reply with quote

jaco0646 wrote:
AHK Help File wrote:
Any hotkey/hotstring subroutine whose very first line is Suspend... will be exempt from suspension.

I think this is what you want. It sounds like End and RButton should do the same thing?


They should not do the same thing. End is doing right thing now.

So is it possible to make Lbuttons doings inactive when I press once Rbutton and when I press Rbutton again Lbuttons doings are active again?

Like this:

Press Home - Suspend Off
Press Rbutton - Activates autoklicker
Lbutton active - Autoklicker On
Press again Rbutton - Disables autoklicker
Lbutton active - Autoklicker off
Press again Rbutton - Activates autoklicker
Lbutton active - Autoklicker on
etc.
Press Home - Suspend On

And I have to press Lbutton and Rbutton by myself every time.
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 1770
Location: MN, USA

PostPosted: Fri Nov 20, 2009 7:22 pm    Post subject: Reply with quote

Code:
Pause::Pause
Home::Suspend

End::Hotkey, ~*Lbutton, Off
~*Rbutton::Hotkey, ~*Lbutton, Toggle

~*Lbutton::
Loop {
 GetKeyState, state, Lbutton, P
 if state=U
 break
 Sendinput {Click down}
 Sleep 30
 Sendinput {Click up}
 Sleep 30
}
return

_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
WasItYou



Joined: 20 Nov 2009
Posts: 3

PostPosted: Fri Nov 20, 2009 8:43 pm    Post subject: Reply with quote

Perfect!

Code:
Pause::Pause
Home::Suspend

~*End::Hotkey, ~*Lbutton, On
~*Del::Hotkey, ~*Lbutton, Off
~*Rbutton::Hotkey, ~*Lbutton, Toggle

Return

~*Lbutton::
Loop {
 GetKeyState, state, Lbutton, P
 if state=U
 break
 Sendinput {Click down}
 Sleep 30
 Sendinput {Click up}
 Sleep 30
}
return


This one is the correct one.
Thank you and your great help!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group