Содержание
- AHK: Выдает ошибку «Invalid hotkey»
- Сообщения 2
- 1 Тема от d1md1m 2011-01-16 22:59:49 (изменено: d1md1m, 2011-01-21 22:02:03)
- Тема: AHK: Выдает ошибку «Invalid hotkey»
- 2 Ответ от YMP 2011-01-17 07:39:58
- Re: AHK: Выдает ошибку «Invalid hotkey»
- Error: Invalid hotkey / The program will exit.
- Please help! Invalid hotkey!
- Invalid Hotkey
- Please help! Invalid hotkey!
AHK: Выдает ошибку «Invalid hotkey»
Чтобы отправить ответ, вы должны войти или зарегистрироваться
Сообщения 2
1 Тема от d1md1m 2011-01-16 22:59:49 (изменено: d1md1m, 2011-01-21 22:02:03)
Тема: AHK: Выдает ошибку «Invalid hotkey»
Добрый день.
Я только начал изучать AutoHotkey.
Установил у себя версию v1.0.91.05.
Со странички начал обучение. При создании скрипта ввел строку
При запуске выводится сообщение:
Line text: #z::Run www.google.com
Error: Invalid hotkey
Если же при создании скрипта ввести
то такие строки работают.
Устанавливал ранние версии AutoHotkey, то такая же история
2 Ответ от YMP 2011-01-17 07:39:58
- YMP
- Разработчик
- Неактивен
- Рейтинг : [ 137 | 0 ]
Re: AHK: Выдает ошибку «Invalid hotkey»
Видимо, язык ввода по умолчанию в системе русский. В русской раскладке нет клавиши «z», она там называется «я». Можно использовать виртуальный код клавиши.
Источник
Error: Invalid hotkey / The program will exit.
I have a very basic problem. I entered an Invalid Hotkey into the script of AutoHotkey, and the program will no longer run. I don’t seem to be able to undo the error. Below is the long version.
I wanted to change the right-hand «command» key on my iMac (just right of the space bar) to operate as a right-mouse-click, since the Mac doesn’t have one. (I find this annoying when running Windows on Boot Camp.) Here’s what I did:
Downloaded and installed AutoHotkey.
Opened AutoHotkey
Drop-down menu: File/Edit Script.
Scrolled down to the bottom of the file, and added the following line:This didn’t seem to do anything, so I poked and hoped with the following:
Here’s what I got when it tried to process this command:
Line Text: R#::RButton
Error: Invalid hotkeyProblem — The program chokes on this command and will not run. When I try to open it, I get this error and the program exits. Without being able to run the program, I’m not sure how to Edit the Script back to something that it won’t choke on.
Tried to uninstall AutoHotkey and reinstall, but it still held the error.
Tried to do a System Restore to a time prior to installing AutoHotkey with the same result.
Tried to do a file search for any file with the following text in it «R#::RButton» and came up empty.
I don’t know where to go from here. AutoHotkey will not run and I cannot undo the Invalid Script.
Источник
Please help! Invalid hotkey!
Please help!
I try launch this script:but AutoHotkey (Version 1.0.44.02) tell me following:
Error at line 1.
Line Text: ^!s::Run calc.exe
Error: Invalid hotkey.The program will exit.
Sorry for my bad english =)
- Members
- 148 posts
- Last active: Jan 14 2007 02:00 AM
- Joined: 16 Dec 2005
I think its is because the notepad you use save it as unicode.
AHk only parse ASCII.
so open your script in Microsoft Notepad, and «save-as»
under Encoding: select «ANSI»the script should now work 😉
- Administrators
- 9115 posts
- Last active:
- Joined: 26 Dec 2005
- Guests
- Last active:
- Joined: —
I use Far Manager =)
I try use NotePad^!s::Run calc.exe — it’s example from AutoHotkey Tutorial
- Administrators
- 9115 posts
- Last active:
- Joined: 26 Dec 2005
Dear denvist,
Lets try to isolate the problem.
Does changing the hotkey help?Or is it the same with any hotkey?
Regards,
- Guests
- Last active:
- Joined: —
For example:
i want following:
Shift + Alt = Calc.exeIn tutorial wrote
^!c::Run calc.exe
IT’S DON’T WORK =(if i try launch this script
#space::Run www.google.comhe work successfully =)
- Guests
- Last active:
- Joined: —
- Administrators
- 9115 posts
- Last active:
- Joined: 26 Dec 2005
Dear Denvist,
work? 🙄
Regards,- Guests
- Last active:
- Joined: —
- Guests
- Last active:
- Joined: —
- Members
- 148 posts
- Last active: Jan 14 2007 02:00 AM
- Joined: 16 Dec 2005
- Guests
- Last active:
- Joined: —
everything is mixed up 😆
But problem still not resolve 😥Источник
Invalid Hotkey
I’ve had this script that I’ve used for awhile, and all of a sudden it stopped working.
I keep getting an invalid hokey error message.
Here is the script;
Here is the error message;
I tried re-installing authotkey, it didn’t help.
I am using Windows 7 Home Premium Service Pack 1.
- Members
- 2166 posts
- Last active: Jun 11 2015 05:33 PM
- Joined: 05 Sep 2009
What do you mean with all those
[Emoticon Database]
—> Download the latest version of AutoHotkey from here- Moderators
- 4323 posts
- Last active: Jan 28 2016 01:38 AM
- Joined: 08 Apr 2009
Spam detected!
In fact, yes, all his posts seem to be spam.EDIT: Thanks Guest, I almost forgout about the [!] «Report this post» button.
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
- Guests
- Last active:
- Joined: —
- Members
- 443 posts
- Last active: Feb 11 2014 12:07 AM
- Joined: 26 Jan 2012
What do you mean with all those Use the right key of the pair. This symbol is ignored on Windows 95/98/ME.
I think that this issue was a caused by the fact that I changed the default input language on my computer.
I switched it back to English and the script works now.Источник
Please help! Invalid hotkey!
Chris Mallet is the developer of AutHotkey software, and the Site administrator of this forum.
Regards,
- Members
- 814 posts
- Last active: May 03 2009 03:28 PM
- Joined: 24 Sep 2004
does #space::Run Calc.exe work?
What system (version, language) do you use?
- Guests
- Last active:
- Joined: —
but this code
don’t work
OS — WinXP SP2- Guests
- Last active:
- Joined: —
- Guests
- Last active:
- Joined: —
Autohotkey still tell following:
Error at line 1.Line Text: +!s::Run calc.exe
Error: Invalid hotkey.The program will exit.
- Moderators
- 6850 posts
- Last active: Jan 02 2012 10:09 PM
- Joined: 27 Dec 2005
PhiLho/KM64.png»/> vPhiLho := RegExReplace ( «Philippe Lhoste», «^(w<3>)w*s+b(w<3>)w*$», «$1$2» )
- Guests
- Last active:
- Joined: —
everything is mixed up 😆
But problem still not resolve 😥
I can’t run script
+!s::Run Calc.exe
Why?- Guests
- Last active:
- Joined: —
- Members
- 814 posts
- Last active: May 03 2009 03:28 PM
- Joined: 24 Sep 2004
I think it’s a language-issue. I know that there were problems with other languages.
- Administrators
- 10727 posts
- Last active:
- Joined: 02 Mar 2004
To create a hotkey, the program consults the current keyboard layout to determine if the key exists. If there is no matching virtual key code (that is, there’s no matching key on the keyboard), there is no way to activate that hotkey.
The typical way to solve this is by choosing a different default keyboard layout for the entire system, or using the Hotkey command to create the hotkey dynamically after the script launches and after you change the script itself to some other keyboard layout.
Источник
I’m trying to set up my function keys to adjust volume (like it did on my laptop), but I can’t seem to get it to work. It just keeps saying invalid hotkey on line F5. Here’s my code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
BackspaceF9::
Volume_Down
BackspaceF10::
Volume_Up
BackspaceF11::
Volume_Mute
What am I doing wrong?
Karan
55.5k20 gold badges117 silver badges188 bronze badges
asked May 6, 2015 at 6:24
1
Use an Ampersand if you intend to combine Backspace and the Function keys. See AutoHotkey help topic for Hotkeys.
answered Sep 26, 2015 at 7:55
JJohnston2JJohnston2
1,7548 silver badges6 bronze badges
For those who find this later, for google reasons or anything, while the comments helped, I largely had to re-do the code from scratch. If you want the CSP equivalent of a private layer in Procreate, or if you want to use CSPs recording features without your reference layers showing up, download autohotkey and this script, then set the following settings.
- CTRL and Numpad+ to zoom in
- CTRL and Numpad- to zoom out
- Middle Mouse button to pan.
Then do the following, put a reference of some sort on both pages, a large checkerboard, a dot with a few lines through it, whatever. Then line up both windows so that they’re showing exactly same thing, only use middle mouse button to pan, and CTRL+ and CTRL- to zoom in and out.
This is my first autohotkey script, and I’m trying to link up two different windows of an art program, so that when I pan one canvas, it pans the other. I would like it to be as pixel precise as possible, but I’m getting an error on Line 1 that says it’s an invalid hotkey, I’ve tried removing the variables, and moving the commas around, but I’m not sure what I’m doing wrong.
Here is my code. for purposes, I’ll explain the button combinations.
Space + L Mouse Button together lets me pan the canvas, I need to know where the cursor is when I release one or the other.
LCtrl + Numpad5 disables click through on WindowTop which I use to overlay with transparency one window over the other.
LCtrl + Tab switches between the two canvasses in the app
#IfWinActive ahk_exe CLIPStudioPaint.exe
; coordmode
Coordmode, Mouse, Screen
t := 0
;Below line starts script, and declares The Starting Coordinates
WinTitle = 3DLayer
SetTitleMatchMode, 2
^F9::
WinSet,Transparent, Off
^F11::
WinSet, ExStyle, -0x20, % WinTitle
return
^F10::
WinSet, ExStyle, +0x20, % WinTitle
WinSet, Transparent, 128, % WinTitle
return
~MButton::
if (t = 0)
{
MouseGetPos, MouseStartX, MouseStartY
t := 1
}
return
~MButton up::
;When MButton is released, records mouse ending positions
MouseGetpos, MouseEndX, MouseEndY
;Blocks input in case I move mouse or touch keyboard while it's running
BlockInput, On
; switches canvas
Send ^{TAB}
; set window for click through
WinTitle = 3DLayer
SetTitleMatchMode, 2
; Disables Click Through
WinSet, ExStyle, -0x20, % WinTitle
; drag
MouseClickDrag, M, MouseStartX, MouseStartY, MouseEndX, MouseEndY
;Re-enables Click Through
WinSet, ExStyle, +0x20, % WinTitle
Winset, Transparent, 150, % WinTitle
;Turns inputs back on, so that I can resume using the art program
Send ^{TAB}
BlockInput, Off
t := 0
return
~^NumpadAdd::
BlockInput, On
; Get Mouse Position
MouseGetPos, ScrollX, ScrollY
;Block input, then switch canvases
Send ^{Tab}
sleep 50
; Disables Click Through
WinSet, ExStyle, -0x20, % WinTitle
; Move Mouse where it needs to be then scroll
MouseMove, ScrollX, ScrollY
Send ^{NumpadAdd}
;Re-enables Click Through
WinSet, ExStyle, +0x20, % WinTitle
Winset, Transparent, 150, % WinTitle
;Turns inputs back on, so that I can resume using the art program
Send ^{TAB}
BlockInput, Off
return
~^NumpadSub::
BlockInput, On
; Get Mouse Position
MouseGetPos, ScrollX, ScrollY
;Block input, then switch canvases
Send ^{Tab}
sleep 50
; Disables Click Through
WinSet, ExStyle, -0x20, % WinTitle
; Move Mouse where it needs to be then scroll
MouseMove, ScrollX, ScrollY
Send ^{NumpadSub}
;Re-enables Click Through
WinSet, ExStyle, +0x20, % WinTitle
Winset, Transparent, 150, % WinTitle
;Turns inputs back on, so that I can resume using the art program
Send ^{TAB}
BlockInput, Off
return