Search found 453 matches
- 21 May 2019, 16:32
- Forum: Ask for Help (v1)
- Topic: rctrl button key hotkey
- Replies: 2
- Views: 805
Re: rctrl button key hotkey
Just map a key or key combination to RControl, like so: +^LControl::RControl. If that doesn't work, you might try using these key codes for RControl: vkA3, sc11D
- 20 May 2019, 17:21
- Forum: Ask for Help (v1)
- Topic: Mouse key toggle
- Replies: 2
- Views: 714
Re: Mouse key toggle
Try this:
Code: Select all
#ifWinActive BlaBlaBla
XButton1::
send, {XButton1 down}
KeyWait, XButton1
send, {XButton1 up}
return
- 13 May 2019, 05:15
- Forum: Ask for Help (v1)
- Topic: How to use RawRead (a newbie question) Topic is solved
- Replies: 2
- Views: 1063
Re: How to use RawRead (a newbie question) Topic is solved
You don't have Size defined anywhere, so it's equal to 0 when VarSetCapacity() uses it, which makes Data too small of a variable. I think that what you meant to do was VarSetCapacity(Data, FileS), was it not? That makes your code work.
- 11 May 2019, 19:34
- Forum: Ask for Help (v1)
- Topic: Hold Control will not work
- Replies: 2
- Views: 1608
Re: Hold Control will not work
It works but is undone the moment that you release Ctrl. If you remove the ^ from the hotkey, it'll work.
- 11 May 2019, 15:43
- Forum: Ask for Help (v1)
- Topic: How to incorporate .ini files? (Help please)
- Replies: 22
- Views: 6230
Re: How to incorporate .ini files? (Help please)
Yes, put it in place of your X1, Y1, X2 and Y2 assignments. Your INI file looks correct, as well.
Thanks, but my help is free.
Thanks, but my help is free.
- 10 May 2019, 20:54
- Forum: Ask for Help (v1)
- Topic: Hotkey should run ONLY in Fullscreen mode Topic is solved
- Replies: 20
- Views: 7357
Re: Hotkey should run ONLY in Fullscreen mode Topic is solved
I just noticed your MsgBox % isFullScreen ? "Full Screen" : "Windowed" line, which is probably messing it up. Either remove that or try: #If WinActive("ahk_exe XYplorer") and isFullScreen = "Full Screen" 1::F8 or #If WinActive("ahk_exe XYplorer") and isWindowFullScreen("ahk_exe XYplorer") 1::F8 The ...
- 10 May 2019, 20:09
- Forum: Ask for Help (v1)
- Topic: GUI help
- Replies: 4
- Views: 1081
Re: GUI help
You will need to include the images when you distribute the script. You can either leave them as is or, if you plan to compile your script into an executable, you can use the FileInstall command to embed them in the executable and extract them when the executable is run.
- 10 May 2019, 20:06
- Forum: Ask for Help (v1)
- Topic: Hotkey should run ONLY in Fullscreen mode Topic is solved
- Replies: 20
- Views: 7357
Re: Hotkey should run ONLY in Fullscreen mode Topic is solved
You need to use the #If directives with hotkeys. Try this: #If WinActive("ahk_exe XYplorer") and isFullScreen 1::F8 Also, just FYI, when you use If(), what goes inside the parentheses must be in expression syntax, which means no % signs around variables (unless you're double dereferencing, but that'...
- 10 May 2019, 19:57
- Forum: Ask for Help (v1)
- Topic: How to incorporate .ini files? (Help please)
- Replies: 22
- Views: 6230
Re: How to incorporate .ini files? (Help please)
If you mean that you're trying to do something like ra== in your INI file and it's not working, try replacing the Array := StrSplit(A_LoopField, "=") line with Array := StrSplit(A_LoopField, "=", , 2) . Yes, you can make the display area customizable according to values in an INI file. You can just ...
- 09 May 2019, 21:57
- Forum: Ask for Help (v1)
- Topic: Trying to combine 2 autohotkey scripts
- Replies: 5
- Views: 1400
Re: Trying to combine 2 autohotkey scripts
I didn't realize that, gregster. Thanks for pointing that out. Unfortunately, it doesn't do my scripts any good because I use expressions and variables and can't convert my #If WinActive()s to #IfWinActive, but, for simple scripts, it might help (then again, for simple scripts, the performance impro...
- 09 May 2019, 18:24
- Forum: Ask for Help (v1)
- Topic: Trying to combine 2 autohotkey scripts
- Replies: 5
- Views: 1400
Re: Trying to combine 2 autohotkey scripts
I, personally, would use #If WinActive() instead of #IfWinActive . It uses expression syntax, which is forward planning, and the WinActive() function supports variables and the ExcludeTitle and ExcludeText parameters. BTW, when you use #Include, the included script is merged at that place and AHK tr...
- 09 May 2019, 18:05
- Forum: Ask for Help (v1)
- Topic: How to incorporate .ini files? (Help please)
- Replies: 22
- Views: 6230
Re: How to incorporate .ini files? (Help please)
Yes, just remove your SPELL_KEYMAP := {stuff} assignment and put the code that I gave (or the simpler code that A_AhkUser gave) below it, like so: #NoEnv #SingleInstance Force SendMode Input SetBatchLines -1 CoordMode Pixel *1::SetTimer WatchSpells, 10 *1 Up::SetTimer WatchSpells, Off WatchSpells() ...
- 08 May 2019, 07:28
- Forum: Ask for Help (v1)
- Topic: A_priorkey = "WheelDown"
- Replies: 5
- Views: 1747
Re: A_priorkey = "WheelDown"
Actually, not the most recent/button press, but " (t)he most recently executed hotkey or non-auto-replace hotstring ". Since there is no hotkey defined in the code in the first post, it would always be blank. So, we are back at using the Wheeldown hotkey in the first place (I am not sure, if the or...
- 08 May 2019, 01:33
- Forum: Ask for Help (v1)
- Topic: Trying to combine 2 autohotkey scripts
- Replies: 5
- Views: 1400
Re: Trying to combine 2 autohotkey scripts
If your WinWaits in the hotkeys script are just used to determine when the hotkeys trigger, you should use the #If directive, instead. For example: #If WinActive("My App") ; Put hotkeys for My App here #If WinActive("My Other App") ; Put hotkeys for My Other App here Those can be safely merged into ...
- 08 May 2019, 01:27
- Forum: Ask for Help (v1)
- Topic: A_priorkey = "WheelDown"
- Replies: 5
- Views: 1747
Re: A_priorkey = "WheelDown"
It seems like what you need is A_ThisHotkey. It holds the most recent hotkey press. A_PriorKey, as gregster pointed out, holds the second most recent press. Edit: I was thinking of A_PriorHotkey. I mixed that up with A_PriorKey.
- 07 May 2019, 20:58
- Forum: Ask for Help (v1)
- Topic: Continue a loop from Function
- Replies: 1
- Views: 543
Re: Continue a loop from Function
Do you mean that, if the user chooses No, the call to Function3 should be skipped and the loop started from the top? If so, you can accomplish it like this: Loop, 5 { Function1() If Function2() Continue Function3() } Function1() { Msgbox, This is a good day. } Function2() { msgbox, 4,, Are you sure ...
- 07 May 2019, 19:19
- Forum: Ask for Help (v1)
- Topic: Press 1 key then another while in game.
- Replies: 3
- Views: 909
Re: Press 1 key then another while in game.
Is this all that you need?
Code: Select all
~F::
Sleep, 5000
Send, {F9}
Return
- 07 May 2019, 17:10
- Forum: Ask for Help (v1)
- Topic: cant open %appdata%
- Replies: 4
- Views: 2743
Re: cant open %appdata%
It's likely because you have #NoEnv at the top of your script. That's recommended for new scripts and is automatically added when you choose to create a new AutoHotkey script. %appdata% is an environment variable and #NoEnv disables direct support for them for performance reasons. Either remove that...
- 06 May 2019, 23:18
- Forum: Ask for Help (v1)
- Topic: How to incorporate .ini files? (Help please)
- Replies: 22
- Views: 6230
Re: How to incorporate .ini files? (Help please)
I shoud mention the following a one-liner string hack by Helgef : SetWorkingDir % A_ScriptDir IniRead, SPELLS, SPELL_KEYMAP.ini, SPELL_KEYMAP SPELL_KEYMAP := Object(StrSplit(SPELLS, ["=", "`n"])*) MsgBox % SPELL_KEYMAP.re That's quite nifty. I didn't realize that you could use Object that way. I'll...
- 06 May 2019, 18:55
- Forum: Ask for Help (v1)
- Topic: How to incorporate .ini files? (Help please)
- Replies: 22
- Views: 6230
Re: How to incorporate .ini files? (Help please)
First, create the INI files, like so: [SPELL_KEYMAP] ra=1 sh=2 fe=3 re=4 ri=5 th=6 ti=7 Name that file SPELL_KEYMAP.ini (or change the filename in the following). Then, you could use the following to read all of the values at once: IniRead, SPELLS, SPELL_KEYMAP.ini, SPELL_KEYMAP ; Read all keys from...