Hallo. I dont know Eng so much. I need to run 2 macros in 1 script with toggle key, i have a script but its not working. Msgbox saying to me "Line 23 SendTheKey - Error: Duplicate label - Program will exit."
Code
LShift::
RepeatKey := !RepeatKey
If RepeatKey
SetTimer, SendTheKey, 20
Else
SetTimer, SendTheKey, Off
Return
SendTheKey:
SendInput 7
SendInput 7
SendInput 8
Return
RShift::
RepeatKey := !RepeatKey
If RepeatKey
SetTimer, SendTheKey, 100
Else
SetTimer, SendTheKey, Off
Return
SendTheKey: line 23 is here
SendInput z
SendInput 3
SendInput z
SendInput 3
Return
2 Macros in 1 Script With Toggle Topic is solved
-
- Posts: 22
- Joined: 12 Sep 2017, 03:13
Re: 2 Macros in 1 Script With Toggle Topic is solved
Hi
The problem is duplicate label.
There can not be two identical to the address(SendTheKey:,SendTheKey1:)
Change the code to the following, you can successfully execute
The problem is duplicate label.
There can not be two identical to the address(SendTheKey:,SendTheKey1:)
Change the code to the following, you can successfully execute
Code: Select all
LShift::
RepeatKey := !RepeatKey
If RepeatKey
SetTimer, SendTheKey, 20
Else
SetTimer, SendTheKey, Off
Return
SendTheKey:
SendInput 7
SendInput 7
SendInput 8
Return
RShift::
RepeatKey := !RepeatKey
If RepeatKey
SetTimer, SendTheKey1, 100
Else
SetTimer, SendTheKey1, Off
Return
SendTheKey1:
SendInput z
SendInput 3
SendInput z
SendInput 3
Return
Re: 2 Macros in 1 Script With Toggle
thx its working ^-^yessorryno wrote:Hi
The problem is duplicate label.
There can not be two identical to the address(SendTheKey:,SendTheKey1:)
Change the code to the following, you can successfully execute
Code: Select all
LShift:: RepeatKey := !RepeatKey If RepeatKey SetTimer, SendTheKey, 20 Else SetTimer, SendTheKey, Off Return SendTheKey: SendInput 7 SendInput 7 SendInput 8 Return RShift:: RepeatKey := !RepeatKey If RepeatKey SetTimer, SendTheKey1, 100 Else SetTimer, SendTheKey1, Off Return SendTheKey1: SendInput z SendInput 3 SendInput z SendInput 3 Return
Who is online
Users browsing this forum: NexusP and 61 guests