Setup Notepad++ for AutoHotkey

Scripting and setups with Notepad++ and AutoHotkey.
User avatar
rediffusion
Posts: 58
Joined: 15 Mar 2019, 05:16

Re: Setup Notepad++ for AutoHotkey

09 Dec 2019, 12:34

@jNizM
TextFX (x86) brings a number of useful features.
About this plugin here's an interesting topic.
User avatar
rediffusion
Posts: 58
Joined: 15 Mar 2019, 05:16

Re: Setup Notepad++ for AutoHotkey

15 Dec 2019, 03:00

@jNizM

In start post... This link doesn't work.

@AHKxx

Code: Select all

^':: Send {LEFT 1}"{RIGHT 1}  ;"
Where do I put this line?

@ry3ks3u_m4dd0ns

I liked this `theme` how to put it on, how to use it?

@Masonjar13

What kind of script it is? does that give me some privileges? I have the plugins "RunMe" and "Run Script" which is added via Menu > Run > Run... F5

▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
Question for all:

How to change double click `Selection color`? Right now it's dark green, screenshot:
Leli196
Posts: 215
Joined: 29 Aug 2015, 05:47
Location: Germany

Re: Setup Notepad++ for AutoHotkey

18 Dec 2019, 09:47

Is there no way to get AutoComplete to display the calltips for commands? The file contains them, but I do not get them to show up, except for functions.
zLynde
Posts: 4
Joined: 18 Feb 2019, 00:02

Re: Setup Notepad++ for AutoHotkey

31 Dec 2019, 00:39

Just FYI, since I spent way too long looking for a solution:

In the current version of Notepad++ (7.8.2), there is a folder called autoCompletion, where you'll need to save the autocompletion xml file, instead of the plugins\APIs folder that was referenced in the original post.

If this post saves one person 5 minutes of confusion, it will have been worth it. Cheers!
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Setup Notepad++ for AutoHotkey

31 Dec 2019, 03:26

Thanks a lot for the hint. The keywords are now shown for AutoCompletion and for function parameters the calltip for the parameters are shown after an opening parentheses is typed.
But I couldn't invoke the command parameters (e.g. ON or OFF for AutoTrim). They are specified in the xml. Have you found a way to have them show/used?
ciao
toralf
Leli196
Posts: 215
Joined: 29 Aug 2015, 05:47
Location: Germany

Re: Setup Notepad++ for AutoHotkey

31 Dec 2019, 05:20

I did not, I think it is not possible.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Setup Notepad++ for AutoHotkey

05 Feb 2020, 10:16

Update on GitHub
- N++ Path in installation guid (readme)
- Links (readme)
- More functions and commands (udl)
- Transparent Background for light and dark mode (udl)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Setup Notepad++ for AutoHotkey

31 Mar 2020, 10:19

User @TheArkive wrote a nice script which enables calltips in notepad++ (and notepad), please see CallTipsForAll v1. The script requires AHK v2 [a108] but yields calltips for both v1 (default) and v2 (if wanted).

Also, many thanks to @jNizM for this guide, I use it every time I install notepad++ on a new computer or reinstalls windows.

Cheers.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Setup Notepad++ for AutoHotkey

01 Apr 2020, 02:21

Update on GitHub
- added commands Switch and Case (udl)

@Helgef Thank you my friend ;)
I wish I was as active as I was 2-3 years ago.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
hardcider09
Posts: 2
Joined: 10 May 2020, 10:24

Re: Setup Notepad++ for AutoHotkey

10 May 2020, 12:13

I had been using userDefineLang_AHK.xml with Notepad++ for years but just a few weeks ago I started having a problems with it.

I'm not sure what's the cause.

After I install userDefineLang_AHK.xml, sometimes it works fine. But then other times usually after a few days some strange things start happening:

The next time I go to edit a script, the highlighting is changed and wrong. For example, some lines are green that shouldn't be. Other coloring is wrong as well. When I open the Language pull down menu to check to make sure AutoHotkey is chosen, it is...and if I choose it again by clicking on it, Notepad++ pages down the script some amount of lines.

Could it be something is getting "corrupted"?

I'm using Notepad++v7.8.5 64-bit Build time: Mar 4 2020 - 11:08:34
Windows 10 Pro Version 1909 64-bit

Any advice is much appreciated.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Setup Notepad++ for AutoHotkey

11 May 2020, 02:11

I have also noticed this since a few versions of Notepad++. They will have patched something broken.
Mostly it helps to click on "Language -> AutoHotkey". After that the highlight is correct again.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
hardcider09
Posts: 2
Joined: 10 May 2020, 10:24

Re: Setup Notepad++ for AutoHotkey

12 May 2020, 05:53

Yes, I end up clicking on "Language -> AutoHotkey" and it fixes it temporarily. Thank you for confirming it is not just me who is having this problem.
User avatar
slyfox1186
Posts: 52
Joined: 28 Oct 2018, 23:56

Re: Setup Notepad++ for AutoHotkey

02 Jun 2020, 14:29

Hey I made a fork off of your Lazy Default Theme to be used with Dracula's Notepad++ color theme.

You can get the Dracula theme at: https://draculatheme.com/notepad-plus-plus/

My theme fork: https://pastebin.com/zbGwzee0

Check it out and tell me what you think.

Screen shots: https://imgur.com/a/d8L2EAe

FYI: Not sure how to fix the links at this time...
Last edited by gregster on 02 Jun 2020, 15:42, edited 1 time in total.
Gedrean
Posts: 22
Joined: 02 Jun 2019, 09:10

Re: Setup Notepad++ for AutoHotkey

20 Jul 2020, 16:30

@jNizM

Hey, I thought I'd suggest this:

In your Github page, your readme.md suggests the following lines for making a .reg file (and the corresponding AHK script)...

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command]
@="C:\\Program Files (x86)\\Notepad++\\notepad++.exe %1"

and

RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Program Files (x86)\Notepad++\notepad++.exe `%1

--

I recommend changing the %1 in the Reg script to \"%1\" (backslash+doublequote+%1+backslash+doublequote).
I'm not sure the appropriate escape sequence in the AHK script, it's been a while since I've thought of it.

Anyhow, this change fixes issues with paths with special characters or spaces.

I didn't think it appropriate to do a full fork and pull just for this.
User avatar
raron
Posts: 37
Joined: 11 Aug 2014, 00:50

Re: Setup Notepad++ for AutoHotkey

05 Aug 2020, 11:59

I made me a shortcut from Notepad++ to run AutoHotKey scripts directly. I haven't looked at all pages here, so maybe it's mentioned somewhere. I just thought I'd put it up here just in case it's of any use.
In addition I added a custom toolbar button to press.

Description
EDIT 2: Additional - Sure it might not be that useful as it isn't exactly difficult having Windows Explorer up and double-clicking a file... it's just an alternative.
Last edited by raron on 04 Sep 2021, 10:15, edited 1 time in total.
User avatar
lmstearn
Posts: 688
Joined: 11 Aug 2016, 02:32
Contact:

Re: Setup Notepad++ for AutoHotkey

16 Oct 2020, 09:43

There's something about the N++ file handling that can go off- particularly if it is active or launched when the internet is out or you change device or after it updates, the styles are not honoured in the gui. Been happening for yonks. Tonight, I opened it after some hiatus, and all the styles and langs and colours were gone - and those ridiculous line numbers popped up again. What worked here was simply navigating to C:\Users\UserName\AppData\Roaming\Notepad++ in the import dialog and importing userDefineLang.xml from there and then restarting N++.
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
rbhall52
Posts: 3
Joined: 03 Feb 2016, 18:51

Re: Setup Notepad++ for AutoHotkey

24 Feb 2021, 11:25

jNizM wrote:
01 Oct 2013, 04:15
Default Editor
Set Notepad++ as default Editor for AutoHotkey Scripts (right click -> edit script)

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command]
@="C:\\Program Files (x86)\\Notepad++\\notepad++.exe %1"

Code: Select all

RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Program Files (x86)\Notepad++\notepad++.exe `%1

Your solution to make notepad++ the default editor for autohotkey scripts has an error in it, at least for windows 10. It should read @="C:\\Program Files (x86)\\Notepad++\\notepad++.exe" "%1", with %1 enclosed in separate quotes, and the first double quote after ".exe". Without this change, the defalt editor remains windows notepad.
Last edited by gregster on 24 Feb 2021, 12:46, edited 1 time in total.
Reason: Massive quote reduced to sth more reasonable.
don_dolarson
Posts: 21
Joined: 29 Oct 2019, 12:56

Re: Setup Notepad++ for AutoHotkey

07 Mar 2021, 18:34

Not working. Tried both default and lazy versions on 7.8.9 and 7.9.3 versions of Notepad++ with and w/o administrator privileges. Getting a "Fail to import" error.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Setup Notepad++ for AutoHotkey

09 Mar 2021, 06:32

I tried it today with a fresh install of win10 and n++ 7.9.3 and the import works as expected.
copy the "userDefineLang_AHK.xml" into "C:\Program Files\Notepad++\" and than import as new lang
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
sofista
Posts: 645
Joined: 24 Feb 2020, 13:59
Location: Buenos Aires

Re: Setup Notepad++ for AutoHotkey

09 Mar 2021, 08:56

@don_dolarson , @jNizM

If problems persist, this worked for me for the current portable version (7.9.3) and Windows 7 (it should be the same for Windows 10):

quit Notepad++, copy the userDefineLang_AHK.xml file and paste into the userDefineLangs directory. Restart Notepad++. AutoHotkey should be listed under the Language menu.

Return to “Notepad++”

Who is online

Users browsing this forum: No registered users and 7 guests