Setup Notepad++ for AutoHotkey

Scripting and setups with Notepad++ and AutoHotkey.
majidmetal
Posts: 1
Joined: 16 Oct 2017, 05:54
Contact:

Re: Setup Notepad++ for AutoHotkey

16 Oct 2017, 06:01

It work, thank you very much...
User avatar
lmstearn
Posts: 688
Joined: 11 Aug 2016, 02:32
Contact:

Re: Setup Notepad++ for AutoHotkey

17 Nov 2017, 10:42

ry3ks3u_m4dd0ns wrote: Image
It's an aeons old design issue in N++ that this is only corrected when Global overrides on the background is selected. But that interferes with other languages one might have set up in N++ having different backgrounds.
It might be a better idea for each language to be allocated a global override check or not with an extra option for currently loaded. i.e. One may desire to "preview a theme" in the original theme without the "override for all" having unintended effects on text display.

Edit: In actual fact, for a dark themed N++ I use Hinkerlodens XML for many other languages. :P

Something happens with N++ (runas invoker) if active when closed by Windows 10 in an reboot/update. The themes in Roaming are replaced by default ones. When exactly? There's nothing in the Windows Logs to indicate abnormality and there is no log N++ has of its own. And from where do these files come from? Not the N++ application directory as the filedates are older.
Anyhow the new userDefineLang.xml has been backed up in the cloud now if that was the problem. Just to share with anyone using it that perhaps N++ requires some more refinement in that area.
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
THX1138
Posts: 63
Joined: 25 Jul 2017, 00:36

Re: Setup Notepad++ for AutoHotkey

05 Dec 2017, 15:15

How do you use the RegWrite code? I tried putting it into the Windows 10 Powershell and it was rejected. I tried deleting one of the two consecutive commas and I tried putting the file path in quotation marks.

Code: Select all

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Program Files (x86)\Notepad++\no
tepad++.exe `%1
At line:1 char:60
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Progr ...
+                                                            ~
Missing expression after ',' in pipeline element.
At line:1 char:60
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Progr ...
+                                                            ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpression

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, C:\Program Files (x86)\Notepad++\not
epad++.exe `%1
x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:79
+ ... R, AutoHotkeyScript\Shell\Edit\Command, C:\Program Files (x86)\Notepa ...
+                                                               ~~~
    + CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, "C:\Program Files (x86)\Notepad++\no
tepad++.exe" `%1
RegWrite : The term 'RegWrite' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, "C:\Progr ...
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (RegWrite:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32>
RiseUp
Posts: 28
Joined: 01 Oct 2013, 21:27

Re: Setup Notepad++ for AutoHotkey

05 Dec 2017, 17:28

THX1138 wrote:How do you use the RegWrite code? I tried putting it into the Windows 10 Powershell and it was rejected. I tried deleting one of the two consecutive commas and I tried putting the file path in quotation marks.

Code: Select all

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Program Files (x86)\Notepad++\no
tepad++.exe `%1
At line:1 char:60
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Progr ...
+                                                            ~
Missing expression after ',' in pipeline element.
At line:1 char:60
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Progr ...
+                                                            ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpression

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, C:\Program Files (x86)\Notepad++\not
epad++.exe `%1
x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:79
+ ... R, AutoHotkeyScript\Shell\Edit\Command, C:\Program Files (x86)\Notepa ...
+                                                               ~~~
    + CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, "C:\Program Files (x86)\Notepad++\no
tepad++.exe" `%1
RegWrite : The term 'RegWrite' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, "C:\Progr ...
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (RegWrite:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32>
Isn't that RegWrite line of code meant for running as an AHK script to have AutoHotkey perform the registry edit?
THX1138
Posts: 63
Joined: 25 Jul 2017, 00:36

Re: Setup Notepad++ for AutoHotkey

05 Dec 2017, 21:53

RiseUp wrote:
THX1138 wrote:How do you use the RegWrite code? I tried putting it into the Windows 10 Powershell and it was rejected. I tried deleting one of the two consecutive commas and I tried putting the file path in quotation marks.

Code: Select all

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Program Files (x86)\Notepad++\no
tepad++.exe `%1
At line:1 char:60
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Progr ...
+                                                            ~
Missing expression after ',' in pipeline element.
At line:1 char:60
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command,, C:\Progr ...
+                                                            ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpression

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, C:\Program Files (x86)\Notepad++\not
epad++.exe `%1
x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:79
+ ... R, AutoHotkeyScript\Shell\Edit\Command, C:\Program Files (x86)\Notepa ...
+                                                               ~~~
    + CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32> RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, "C:\Program Files (x86)\Notepad++\no
tepad++.exe" `%1
RegWrite : The term 'RegWrite' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ RegWrite REG_SZ, HKCR, AutoHotkeyScript\Shell\Edit\Command, "C:\Progr ...
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (RegWrite:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32>
Isn't that RegWrite line of code meant for running as an AHK script to have AutoHotkey perform the registry edit?
Well it doesn't work in an AHK script either.
RiseUp
Posts: 28
Joined: 01 Oct 2013, 21:27

Re: Setup Notepad++ for AutoHotkey

06 Dec 2017, 13:01

THX1138 wrote:Well it doesn't work in an AHK script either.
When you say, "it doesn't work", what happens? Do you get an error message?

Also, are you sure the path to your Notepad++ executable is correct?
THX1138
Posts: 63
Joined: 25 Jul 2017, 00:36

Re: Setup Notepad++ for AutoHotkey

06 Dec 2017, 15:42

There is no error message. When I say it doesn't work, I mean that when I choose 'edit script' from the tasktray AHK icon context menu, the script opens in MS Notepad as it does by default.

The path to the Notepad++ executable is correct.
RiseUp
Posts: 28
Joined: 01 Oct 2013, 21:27

Re: Setup Notepad++ for AutoHotkey

06 Dec 2017, 16:09

Are you comfortable with using regedit.exe? If so, here's how my entry appears in regedit if you want to try the same setup:
Image


If that doesn't work, the next step would be to use the full path to notepad++ in the "Data" section of that registry key, which would then need to be quoted because it probably contains spaces. In that case, maybe try this:

Code: Select all

"C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"
Finally, have you restarted the PC after you made the changes? I'm not sure if it's required, but it's probably worth a shot.
User avatar
Scr1pter
Posts: 1271
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Setup Notepad++ for AutoHotkey

08 Feb 2018, 05:45

How does the RunMe work?
I added it in the Plugin folder of NPP and see the icon.
Furthermore I set that ahk files get opened with Ahk2Exe.
But when I click on the RunMe icon in NPP, it just says:
Image
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Setup Notepad++ for AutoHotkey

08 Feb 2018, 15:44

.... Um, AHK files aren't ran with Ahk2Exe.exe... They are ran with AutoHotkey.exe
User avatar
Scr1pter
Posts: 1271
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Setup Notepad++ for AutoHotkey

08 Feb 2018, 16:34

Ok, thanks for that information!
I was always wondering why guys said there was some Window Spy when right-clicking on a script.
For me there was only Pause, Suspend and exit.

Why is there ahk2exe anyway?
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
User avatar
Trogluddite
Posts: 8
Joined: 23 Mar 2018, 06:42

Re: Setup Notepad++ for AutoHotkey

24 Mar 2018, 16:27

Scr1pter wrote:Why is there ahk2exe anyway?
ahk2exe takes an AHK script, processes it, and outputs an .exe file version of the script. This is handy if you want to make your script into a single file which can be used on a PC which doesn't have AHK installed on it.
bmilcs
Posts: 11
Joined: 27 Feb 2017, 13:54

Re: Setup Notepad++ for AutoHotkey

16 May 2018, 10:37

Not sure why, but I cannot get Autocompletion to work.

I've followed the instructions to a T, several times over the past few months, and still... nothing.

I've quadruple checked the Notepad++ settings, I've pasted it to the right folder, and so on.

Do you think it may be an %appdata% issue? Is it not looking to the program directory?
brown
Posts: 1
Joined: 28 Jul 2018, 06:50

Re: Setup Notepad++ for AutoHotkey

28 Jul 2018, 07:40

Hi guys,

I don't know if you'll find this useful. I just combine a script I got from the forums and SetTitleMatchMode and then be able to use other text editors without messing with the registry or anything:

Code: Select all

; Reload Script
$^s::
SetTitleMatchMode 2
IfWinActive, scriptname.ahk
{
   Send, ^s
   SplashTextOn,,20,,Updating
   Sleep,500
   SplashTextOff
   Reload
}
else
   Send, ^s
return
The first time though, you'd have to right click the tray icon to reload script. After that, a simple control-S would suffice.
d3daim
Posts: 1
Joined: 21 Aug 2018, 16:25

Re: Setup Notepad++ for AutoHotkey

21 Aug 2018, 16:31

HinkerLoden wrote:I was really going crazy. I want to add a new style and nothing happens. First the update to the version v.6.9.1 added the style correct.
I created a new Syntax-Highlightning file based on the Lazy one. But i completely redesigned it to a eye friendly dark background and i try to pick colours that not bite each other.

HinkerLoden.zip

Just gimme a feedback if you try this out. I added all Commands and some Control parameter. But the parameter are the next thing i want to fit in.

is used theTechmantium Theme/ Style or use any other dark theme.

( select the Standard-Backgroundcolor global override to get it right )

Bild 1.png

Bild 2.png

1. Group - bright Blue
Commands with parameters
2. Group - Purple
INPUT _ OUTPUT Commands
3. Group - Dark Yellow
Build-In Variables + Call Stats
4. Group - Dark Green
Window Specific Command and ParametersControl
Peripherie Calls - GetKeyState / ImageSearch / ...
5. Group - red
Gui and Input Flow
6. Group - Pink
Script Environment
7. Group - Bright Green
Basic Script Syntax + Loop parse / Read Vars
8. Group - Dark Blue
Internal Functions
Really like this syntax highlighting vs the OP
CloakerSmoker
Posts: 33
Joined: 07 Sep 2018, 15:54

Re: Setup Notepad++ for AutoHotkey

09 Mar 2019, 04:55

Does anyone know if it's possible to get the DBGp plugin to work in Notepad++ v7.6.3 (64 bit), or know the last version of N++ that it worked for?
I'm loving the new plugin manager in N++, but I've recently gotten into the habit of using DBGp so much that I'm willing to install an older version just so it works again.
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Setup Notepad++ for AutoHotkey

09 Mar 2019, 05:06

Iirc the 64Bit version of n++ had some issues. Don’t know if this is still the case. But it might be worth a trial with the 32 Bit Version.
I have an older 32 bit version of n++ with the debugger running. But do not know the version out of my head
ciao
toralf
anotherautohotkeyusr
Posts: 21
Joined: 27 Oct 2015, 18:45

Re: Setup Notepad++ for AutoHotkey

11 Mar 2019, 00:20

I also use the LanguageHelp plugin from https://sites.google.com/site/fstellari/nppplugins to provide context sensitive searching of the AutoHotkey help file.


moderation note: fixed legitimate link that was altered by forum spam filter - gregster
wei9133
Posts: 11
Joined: 08 Sep 2014, 13:01

Re: Setup Notepad++ for AutoHotkey

05 Jun 2019, 12:26

Auto-Completion is not run
notepad++ 7.7 zip
2.png
2.png (59.95 KiB) Viewed 15149 times
4.png
4.png (76.18 KiB) Viewed 15149 times
3.png
3.png (70 KiB) Viewed 15149 times
path is
Notepad++ 7.7\autoCompletion\AutoHotkey.xml
where is error

Return to “Notepad++”

Who is online

Users browsing this forum: No registered users and 2 guests