whenever I autostart my script along the Windows boot, I get following error message: However, in line 84 I do not have "NumpadRight", I actually don't have it anywhere in the code. Below you can see my complete code, with the private information removed (they did not contain it and please scroll down a bit). Do you know any other reasons why this error could appear?
This should be line 84:
Code: Select all
NumpadLeft::Run, Chrome.exe "https://todoist.com/"
Code: Select all
^,::Send <
^.::Send >
Capslock & v:: ; Caplock v;CTRL+SHIFT+V
ClipSaved := ClipboardAll ;save original clipboard contents
clipboard = %clipboard% ;remove formatting
Send ^v ;send the Ctrl+V command
Clipboard := ClipSaved ;restore the original clipboard contents
ClipSaved = ;clear the variable
Return
;Puts the current windows on 80% width and opens notepad on the right of window: CONTROL+Shift+1
^+1::
DetectHiddenWindows,on
SetWinDelay,0
F1::
Keywait,F1
WinGetPos,,,,H,AHK_class Shell_TrayWnd
WinGet,ID,ID,A
WinGet,Size,MinMax,A
If Size = 1
WinRestore,A
WinMove,A,,-8,-8,% A_ScreenWidth - ((A_ScreenWidth * 20) / 100),% 16 + A_ScreenHeight - H
WinGetPos,X,Y,W,H,A
Run,C:\Windows\System32\notepad.exe,,Hide,PID
WinWait,ahk_pid %PID%
WinMove,ahk_pid %PID%,,% A_ScreenWidth,% Y + 2,% A_ScreenWidth - W + 28,% H + 2
WinShow,ahk_pid %PID%
; WinMove,ahk_pid %PID%,,% W - 21,% Y + 2,% A_ScreenWidth - W + 28,% H + 2
;-------- Remove this part if you don't want the animation and uncomment the line above
M := A_ScreenWidth
Loop
{
M -= 100
If (M < W - 21)
Break
WinMove,ahk_pid %PID%,,% M
Sleep,10
}
; ----------------------
WinActivate,ahk_pid %PID%
WinWaitClose,ahk_pid %PID%
WinMaximize,ahk_id %ID%
Return
;NumpadIns::Run, Chrome.exe "http://www.freecollocation.com/search?word="
NumpadIns::
IF !WinActive("ahk_exe Chrome.exe")
Run, Chrome.exe "http://www.freecollocation.com/search?word="
Else
{ ;open the website in the current tab
SetKeyDelay, 200
Send, ^l^a
SendInput, http://www.freecollocation.com/search?word=
Send, {Return}
}
Return
NumpadDown::Run, Chrome.exe "https://web.whatsapp.com/"
; 4:
NumpadLeft::Run, Chrome.exe "https://todoist.com/"
NumpadClear:: ;5 on NumPad
send ^c
ClipWait,2
Clipboard := StrReplace(Clipboard, " ", "%20")
Run, Chrome.exe "https://www.google.com/search?q="%Clipboard%
return
NumpadHome:: ;7 on NumPad
myPath := "C:\Users\Alexa\hotkeys.ahk"
SplitPath, myPath,,,,fName
Run,% "notepad.exe " . myPath
If WinExist(fName)
WinActivate
Return
NumpadUp:: ; 8 on NumPad; opens the currently selected link in Chrome
send ^c
ClipWait,2
Run, Chrome.exe %Clipboard%
return
Numpad9::Run, Chrome.exe "https://www.linguee.de/deutsch-englisch/search?source=auto&query=" ; don't use 1 to keep this free for end ;9 on NumPad
;Use keyboard for arrows:
Capslock & j::Send {Left}
Capslock & i::Send {Up}
Capslock & k::Send {Down}
Capslock & l::Send {Right}
;Align elements in PowerPoint by CTRL+Shift+l/r/u/d keys:
#IfWinActive, ahk_exe POWERPNT.EXE
^!l::Send, !jdaal
^!r::Send, !jdaar
^!u::Send, !jdaat
^!d::Send, !jdaab
;^!right::
;ppt := ComObjActive("PowerPoint.Application")
;ppt.ActiveWindow.Selection.ShapeRange.Align(2, 0)
;Return
;^!left::
;ppt := ComObjActive("PowerPoint.Application")
;ppt.ActiveWindow.Selection.ShapeRange.Align(0, 0)
;Return