Notepad++Folding breaking my Scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
pivotphone
Posts: 18
Joined: 03 Sep 2022, 12:09

Notepad++Folding breaking my Scripts

Post by pivotphone » 30 Jan 2023, 15:28

Hi guys,

My script file has started to get quite large. With a quick google, I have found Notepad++ has a function called "Folding" I am currently using { and }
to open and close the fold, but that seems to be breaking my script with the error

"Error at line XX

This line does not contain a recognised action.

Code: Select all

{;Window Minimise
^NumpadSub::
WinGet, active_id, ID, A
WinMinimize, ahk_id %active_id%
return
}
Any help would be really appreciated!

User avatar
mikeyww
Posts: 26882
Joined: 09 Sep 2014, 18:38

Re: Notepad++Folding breaking my Scripts

Post by mikeyww » 30 Jan 2023, 15:36

If you remove the extraneous braces, the problem will disappear! It's best to avoid these, and let the AHK interpreter do its job properly. Use AHK syntax, not your own.

There are lots of ways to "delineate" code, including the following.
1. Functions & subroutines
2. Comment blocks
3. #Include files

Post Reply

Return to “Ask for Help (v1)”