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 

Changing the on/off button for script

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
HardstyleX
Guest





PostPosted: Sat Oct 10, 2009 4:13 am    Post subject: Changing the on/off button for script Reply with quote

Hi all,

I was just wondering how to change the on and off button for a script i got. It was an exe and i converted it back to an ahK but i cant find where to change the on/off. I know the key is numlock but i want to change it to delete. I will post a copy of the script. Anyhelp would be appreciated.

Code:
 SetBatchLines -1
Numlock::
  Suspend
  Var:=!Var
  If Var
    {
      SoundBeep, 300, 600
      Sleep 10
    }
  Else
    SoundBeep,1000 , 600
Return






SetBatchLines -1
$*LButton::

{

Loop
{
MouseClick, Left,,, 1, 0
SetMouseDelay, 47
GetKeyState, state, LBUTTON, P
if state = U
{
Break
}

}


}
Return






SetBatchLines -1
SayToAll(a_szMessage)
{
   SetKeyDelay, 25.00,25.00
   SendInput {J Down}
   Sleep 50.00
   SendInput {J Up}
   Send %a_szMessage%{Enter}
}
SayToSquad(a_szMessage)
{
   SetKeyDelay, 25.00,25.00
   SendInput {L Down}
   Sleep 50.00
   SendInput {L Up}
   Send %a_szMessage%{Enter}
}
SayToTeam(a_szMessage)
{
   SetKeyDelay, 25.00,25.00
   SendInput {K Down}
   Sleep 50.00
   SendInput {K Up}
   Send %a_szMessage%{Enter}
}
$*~Numpad1::
$*~NumpadEnd::
   SayToAll("Ready")
Return

$*~Numpad2::
$*~NumpadDown::
   SayToAll("GO")
Return

$*~Numpad3::
$*~NumpadPgDn::
   SayToAll("One Second, Not Ready")
Return

$*~Numpad4::
$*~NumpadLeft::
   SayToTeam("LEFT")
Return

$*~Numpad5::
$*~NumpadClear::
   SayToTeam("MIDDLE")
Return

$*~Numpad6::
$*~NumpadRight::
   SayToTeam("RIGHT")
Return

$*~Numpad7::
$*~NumpadHome::
   SayToTeam("BLOCKED")
Return

$*~Numpad8::
$*~NumpadUp::
   SayToTeam("BUG")
Return

$*~Numpad9::
$*~NumpadPgUp::
x+=1
If Mod(x,2)
{
   SayToAll("lol")
}
Else
{
   SayToAll("Lmao")
}
Return

$*~NumpadDot::
$*~NumpadDel::
   SayToAll("-RoFlCoPT3R*")
Return

$*~Numpad0::
$*~NumpadIns::
{
   SendInput {j down}
   Sleep 30.00
   SendInput {j up}
   Send,|
   Sleep 40.00
   Send,<
   Sleep 40.00
   Send,0
   Sleep 40.00
   Send,S
   Sleep 40.00
   Send, H
   Sleep 40.00
   Send,3
   Sleep 40.00
   Send,R
   Sleep 40.00
   SendInput {Space down}
   Sleep 40.00
   SendInput {Space up}
   Sleep 40.00
   Send,D
   Sleep 40.00
   Send,3
   Sleep 40.00
   Send,L
   Sleep 40.00
   Send,U
   Sleep 40.00
   Send,X
   Sleep 40.00
   Send,3
   Sleep 40.00
   SendInput {Space down}
   Sleep 40.00
   SendInput {Space up}
   Sleep 40.00
   Send,O
   Sleep 40.00
   Send,\
   Sleep 40.00
   Send,/
   Sleep 40.00
   Send,\
   Sleep 40.00
   Send,/
   Sleep 40.00
   Send,n
   Sleep 40.00
   Send,A
   Sleep 40.00
   Send,g
   Sleep 40.00
   Send,E
   Sleep 40.00
   SendInput {Return down}
   Sleep 40.00
   SendInput {Return up}
}
Return


$*~\::
{
SendInput {j down}
Sleep 30.00
SendInput {j up}
Sleep 40.00
SendInput {Space down}
Sleep 40.00
SendInput {Space up}
Send,=
Sleep 40.00
Send,U
Sleep 40.00
Send,[
Sleep 40.00
Send,c
Sleep 40.00
Send,]
Sleep 40.00
Send,=
Sleep 40.00
SendInput {Space down}
Sleep 40.00
SendInput {Space up}
Sleep 40.00
Send,U
Sleep 40.00
Send,p
Sleep 40.00
Send,p
Sleep 40.00
Send,e
Sleep 40.00
Send,r
Sleep 40.00
Send,C
Sleep 40.00
Send,r
Sleep 40.00
Send,u
Sleep 40.00
Send,s
Sleep 40.00
Send,t
Sleep 40.00
SendInput {Space down}
Sleep 40.00
SendInput {Space up}
Send,N
Sleep 40.00
Send,O
Sleep 40.00
Send,R
Sleep 40.00
Send,T
Sleep 40.00
Send,H
Sleep 40.00
Send,A
Sleep 40.00
Send,M
Sleep 40.00
Send,E
Sleep 40.00
Send,R
Sleep 40.00
Send,I
Sleep 40.00
Send,C
Sleep 40.00
Send,A
Sleep 40.00
SendInput {Return down}
Sleep 40.00
SendInput {Return up}
}
Return
Back to top
rocknrollgolfer



Joined: 03 Oct 2009
Posts: 8

PostPosted: Sat Oct 10, 2009 4:48 am    Post subject: Reply with quote

Is this a trick question? Razz

The second line where it says NumLock:: is what defines the button. Change it to Delete::.
Back to top
View user's profile Send private message
HardstyleX
Guest





PostPosted: Sat Oct 10, 2009 5:54 am    Post subject: Reply with quote

I tried thta before but it didnt work. It works now. Thanks a bunch Smile
Back to top
Display posts from previous:   
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