Search found 38 matches

by Hajdes
10 Aug 2021, 05:48
Forum: Ask for Help (v1)
Topic: Toggle hotkey on/off problem
Replies: 16
Views: 869

Re: Toggle hotkey on/off problem

Thank you for explaining. I understand what you wrote, but I do not follow your script so well, so I cannot adjust it. Sorry about that. I was providing a script as a way to demonstrate how you can use hotkeys to change the suspension state, in a way that might be more reliable than your script. Th...
by Hajdes
09 Aug 2021, 17:35
Forum: Ask for Help (v1)
Topic: Toggle hotkey on/off problem
Replies: 16
Views: 869

Re: Toggle hotkey on/off problem

You can change it to a toggle: LabelKey = F6 Gosub, ~Enter ~Esc:: ~Enter:: Suspend, Permit Hotkey, %LabelKey%, Label, On SoundBeep, 1500 Return ~t:: ~y:: Suspend, Permit Hotkey, %LabelKey%, Off Return Label: Suspend SoundBeep, 1000 Return No I can't because your code is dedicated to only my explain...
by Hajdes
09 Aug 2021, 12:26
Forum: Ask for Help (v1)
Topic: Toggle hotkey on/off problem
Replies: 16
Views: 869

Re: Toggle hotkey on/off problem

I am not following your description of what the script should do. In particular, "until I click enter/esc F6 shouldn't work but if I click F6 it unsuspend script" sounds like a contradiction. As you clarify in brief form such as "If _____, then _______; next, _________", etc., please also translate...
by Hajdes
09 Aug 2021, 11:47
Forum: Ask for Help (v1)
Topic: Toggle hotkey on/off problem
Replies: 16
Views: 869

Re: Toggle hotkey on/off problem

Thank you for explaining. To disable the hotkey that you added, you can add the following to any subroutine where you would like the disabling to occur. Hotkey, %LabelKey%, Off I know it and I added it to the label: if(A_IsSuspended){ if (GetKeyState("t", "P") || GetKeyState("y", "P")) Hotkey, %Lab...
by Hajdes
09 Aug 2021, 11:35
Forum: Ask for Help (v1)
Topic: Toggle hotkey on/off problem
Replies: 16
Views: 869

Re: Toggle hotkey on/off problem

I am not following your description of what the script should do. In particular, "until I click enter/esc F6 shouldn't work but if I click F6 it unsuspend script" sounds like a contradiction. As you clarify in brief form such as "If _____, then _______; next, _________", etc., please also translate...
by Hajdes
09 Aug 2021, 11:15
Forum: Ask for Help (v1)
Topic: Problem with break loop by click key Topic is solved
Replies: 3
Views: 632

Re: Problem with break loop by click key Topic is solved

I believe that AHK v2 can terminate threads (I am told). In v1.x, some methods are listed below. 1. Add conditional statements to the thread that act according to a variable set by the triggered hotkey. 2. Reload the script. 3. Run the subroutine as a separate script that can be WinClose d. 4. Paus...
by Hajdes
09 Aug 2021, 10:44
Forum: Ask for Help (v1)
Topic: Problem with break loop by click key Topic is solved
Replies: 3
Views: 632

Problem with break loop by click key Topic is solved

Hello, I have got problem with code bellow (RMB Break doesn't work), I want to break the loop in LabelA by clicking RMB key. Any ideas how to do it? global klub global czy:= false global abc:= 0 ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Hotkey, %La...
by Hajdes
09 Aug 2021, 09:52
Forum: Gaming Help (v1)
Topic: Run, ExitApp problem, make code shorter.
Replies: 2
Views: 287

Re: Run, ExitApp problem, make code shorter.

Rohwedder wrote:
09 Aug 2021, 09:16
Hallo,
The RButton hotkey triggers only in an active GTA5.exe window and if(abc=1) || (abc=2)

Code: Select all

; ...
#IfWinActive, ahk_exe GTA5.exe
; ...
~RButton::
if(abc=1) || (abc=2)
{
	Run script.ahk
	eksit()
	return
}
Yes I know but in LabelB where abc=2 rmb don't work
by Hajdes
09 Aug 2021, 08:03
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

This does not seem to be your real script. In any case, you can fix the flow. Read: #IfWinActive . It applies only to hotkeys & hotstrings. You would not have two of these directives on consecutive lines, because the first one would not have any effect. Shorten your script so that you can test the ...
by Hajdes
09 Aug 2021, 07:56
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

I do not understand it and cannot test it. My advice is to test your script in Notepad to see whether it works there. That will help you to understand whether the problem is the script or the game. Of course, closing this script with the tray icon is tricky, because your right button is mapped. You...
by Hajdes
09 Aug 2021, 07:49
Forum: Gaming Help (v1)
Topic: Run, ExitApp problem, make code shorter.
Replies: 2
Views: 287

Run, ExitApp problem, make code shorter.

#SingleInstance, Force Global PhoneDelay := 500 global k global c:= false global abc:= 0 LabelKeyB = Numpad1 LabelKeyC = Numpad2 ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Hotkey, %LabelKeyB%, LabelB Hotkey, %LabelKeyC%, LabelC return ;@@@@@@@@@@@@...
by Hajdes
08 Aug 2021, 06:26
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

mikeyww wrote:
08 Aug 2021, 06:10
What happens when you run the script? What should happen instead?
It is running normaly but the rmb/esc/backspace/m don't work, but when I put abc=2 1/2/3 line/s down script is going crazy he is sending msgbox after starting label
by Hajdes
08 Aug 2021, 05:48
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

I do not understand it and cannot test it. My advice is to test your script in Notepad to see whether it works there. That will help you to understand whether the problem is the script or the game. Of course, closing this script with the tray icon is tricky, because your right button is mapped. You...
by Hajdes
07 Aug 2021, 15:34
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

If you want the context to apply to everything, you can do something like this. Adjust as needed. LabelKey := "Numpad0", LabelNumber := 10 Hotkey, %LabelKey%, Label, On #If WinActive("ahk_class grcWindow") || WinActive("ahk_exe GTA5.exe") ~BackSpace:: ~RButton:: ~Escape:: ~m::Reload Label: SoundBee...
by Hajdes
07 Aug 2021, 09:08
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

I do not see a function here. You could try something like this: LabelKey := "Numpad0", LabelNumber := 10 Hotkey, If, WinActive("ahk_class grcWindow") || WinActive("ahk_exe GTA5.exe") Hotkey, %LabelKey%, Label, On Hotkey, If ~BackSpace:: ~RButton:: ~Escape:: ~m::Reload Label: SoundBeep, 300, 100 Ph...
by Hajdes
07 Aug 2021, 08:39
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

I do not see a function here. You could try something like this: LabelKey := "Numpad0", LabelNumber := 10 Hotkey, If, WinActive("ahk_class grcWindow") || WinActive("ahk_exe GTA5.exe") Hotkey, %LabelKey%, Label, On Hotkey, If ~BackSpace:: ~RButton:: ~Escape:: ~m::Reload Label: SoundBeep, 300, 100 Ph...
by Hajdes
07 Aug 2021, 08:19
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

Post your script here. LabelKey = Numpad0 LabelNumber = 10 #IfWinActive ahk_class grcWindow #IfWinActive, ahk_exe GTA5.exe Hotkey, %LabelKey%, Label Label: SoundBeep, 300, 100 PhoneUp() Send {Right}{Up}{Enter} a := 0 while(LabelNumber>a) { Send {Up} a := a+1 } Send {Enter} return ~BackSpace:: Reloa...
by Hajdes
07 Aug 2021, 08:08
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

This script alone sends random key strokes? No other scripts are running? This is your exact code? What is an example of your output? Maybe not random but it isn't sending my combination (Send {Down 5}{Enter}{Up 5}{Right}{Enter}) it send only 2 last/ 1 last key/s no full combination, any ideas ? No...
by Hajdes
06 Aug 2021, 17:50
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

No, but here is a working approach to reloading. LabelKey = F7 ; F7 = Start the loop Hotkey, %LabelKey%, Label, On SoundBeep, 1500 F3::Reload ; F3 = Stop the loop Label: ; Activated by F7 Loop { Send x Sleep, 100 } Return But when I start label and during it is sending keystrokes I reload the scrip...
by Hajdes
06 Aug 2021, 15:42
Forum: Gaming Help (v1)
Topic: Stop label/send keystrokes Topic is solved
Replies: 23
Views: 1598

Re: Stop label/send keystrokes Topic is solved

Example of a hotkey toggle via different keys: LabelKey = F7 Gosub, F4 F3:: ; Disable F7 Hotkey, %LabelKey%, Off SoundBeep, 1000 Return F4:: ; Enable F7 Hotkey, %LabelKey%, Label, On SoundBeep, 1500 Return Label: ; Activated by F7 Send x Return Ok but it will work (stop the label) during the label ...

Go to advanced search