Setup Notepad++ for AutoHotkey

Discuss features, issues, about Editors for AHK
User avatar
boiler
Posts: 1983
Joined: 21 Dec 2014, 02:44

Re: Setup Notepad++ for AutoHotkey

19 Feb 2017, 10:29

jNizM wrote:[Auto-Completion]
1. Download AutoHotkey.xml as raw (Right-click and choosing save as target...)
2. Save it to the right location (C:\Program Files (x86)\Notepad++\plugins\APIs\)
3. Start Notepad++ and click on Menu Settings --> Preferences
4. Click on Auto-Completion and activate Enable auto-completion on each input
5. (recommendation: From 2th character, Function completion, Function parameters hint on input)

- Autocomplete ( Download | Preview )

I had always thought that the function parameters hint functionality must only work for functions, since that's the only time I was able to activate them (after typing the function name and the open parenthesis), but now I went in and looked at jNizM's xml file, and I see it has all the parameter definitions for commands as well. Is there a way to activate the parameter hints for commands? If so, I never knew you could, and now that I see the info is there, I can't figure out how to make them appear.
KusochekDobra
Posts: 13
Joined: 25 Apr 2016, 18:00

Re: Setup Notepad++ for AutoHotkey

26 Feb 2017, 17:38

boiler wrote:
KusochekDobra wrote:Hello everyone!
I use "notepad++ v7.2.2" and do not understand, how to install plugin FunctionList. Zip with all content "notepad++" now a have this plugin and him "functionlist.xml" do not have a rule for AHK, described in "FunctionListRule.xml" in the plugin located in "sourceforge.net". Rule in this thread - is not working properly showing everything, including variable after a name which is a sign ":".
Help me in this question please. And sorry for my bad english.

Did you edit the file functionList.xml as was described in the other thread? Perhaps you didnn't add the new information in the correct location in that file. Can you post the contents of your function list.xml file? Please put it between tags.

Im insert new code from last example this thread.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


It is working better, but I think, it is no perfect result.
User avatar
jNizM
Posts: 2294
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
Contact:

Re: Setup Notepad++ for AutoHotkey

09 Mar 2017, 10:15

Update:
- Renew the whole first post
- Tested up to Notepad++ v7.3.3 (64-Bit)
- Added in first post Hotstrings (by Helgef)
- Added FunctionList (by ahkDustVorteX / Nightwolf85)

pm me for spelling and grammar failure
[AHK] 1.1.26.01 x64 Unicode | [WIN] 10 Pro (Version 1703) x64
My GitHub Profile | Donations are appreciated if I could help you
User avatar
kczx3
Posts: 422
Joined: 06 Oct 2015, 21:39

Re: Setup Notepad++ for AutoHotkey

15 Mar 2017, 09:31

Somehow my code folding has broken in NP++ with AHK. No matter what I change in the Folding in Code Style boxes the folding points do not show up. Anyone have any thoughts besides reinstalling NP++ freshly?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
hoppfrosch
Posts: 303
Joined: 07 Oct 2013, 04:05
GitHub: hoppfrosch
Location: Rhine-Maine-Area, Hesse, Germany
Contact:

Re: Setup Notepad++ for AutoHotkey

17 Mar 2017, 02:39

What also might be a worth to be mentioned on the first topic of this thread:

How to debug AHK-scripts using Notepad++?

Within Autohotkey documentation there is a special page on "Debugger Clients".
On this page there's a special section on Notepad++ DBGp Plugin. (The provided link there points to an invalid URL - I just corrected the URL and made a pull request ... - everything else there still works as described ...)
User avatar
kczx3
Posts: 422
Joined: 06 Oct 2015, 21:39

Re: Setup Notepad++ for AutoHotkey

17 Mar 2017, 06:43

kczx3 wrote:Somehow my code folding has broken in NP++ with AHK. No matter what I change in the Folding in Code Style boxes the folding points do not show up. Anyone have any thoughts besides reinstalling NP++ freshly?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Looks like I had to remove the curly braces from delimiter 1 and move to Folding code 1.
KusochekDobra
Posts: 13
Joined: 25 Apr 2016, 18:00

Re: Setup Notepad++ for AutoHotkey

31 Mar 2017, 18:32

Thanks all for your serious approach to this business!
ry3ks3u_m4dd0ns
Posts: 18
Joined: 29 Mar 2017, 09:23

Re: Setup Notepad++ for AutoHotkey

01 Apr 2017, 17:33

Alright, this works fine on the latest version of NPP at the time I made this post, but now something wrong's happening.

At least I think it's wrong.

So, I made a script before installing the user defined language, and after I did, I restarted NPP and selected AutoHotKey on Language, to be greeted with this:

Image
azzendix
Posts: 1
Joined: 04 Apr 2017, 20:21

Re: Setup Notepad++ for AutoHotkey

04 Apr 2017, 23:35

@ry3ks3u_m4dd0ns

That's because it made for the white color theme(default theme). You can fix it by changing the background color to match your current theme.
Open userDefineLang.xml and change from bgColor="FFFFFF" to bgColor="112435".

I did it for myself already. Here is it.
jNizM AutoHotkey Syntax-Highlighting - For Ruby Blue: https://pastebin.com/BP7McfjB
User avatar
jNizM
Posts: 2294
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
Contact:

Re: Setup Notepad++ for AutoHotkey

21 Apr 2017, 08:00

Update:
- Added MsgBox Creator (by boiler) into others
- Added Run script (by boiler) into others
[AHK] 1.1.26.01 x64 Unicode | [WIN] 10 Pro (Version 1703) x64
My GitHub Profile | Donations are appreciated if I could help you
User avatar
fischgeek
Posts: 407
Joined: 29 Jan 2014, 21:39

Re: Setup Notepad++ for AutoHotkey

04 Jul 2017, 20:25

I have this all working. I'm just wondering, has anyone been able to get parameter hints working on a comma separated command (ex. IniWrite)?
User avatar
boiler
Posts: 1983
Joined: 21 Dec 2014, 02:44

Re: Setup Notepad++ for AutoHotkey

04 Jul 2017, 20:49

No, I believe Notepad++ will only trigger that for functions (on an open parenthesis character). You might be interested these parameter expander tools that will work for functions, commands, and directives: this one from Helgef and one I made.
User avatar
fischgeek
Posts: 407
Joined: 29 Jan 2014, 21:39

Re: Setup Notepad++ for AutoHotkey

05 Jul 2017, 14:28

Thanks! Though, both solutions are nice, it's too much deletion for my liking. I'm currently implementing something like this at the moment. It seems to be doing what I want so far.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Maestr0
Posts: 4
Joined: 05 Dec 2013, 17:43

Re: Setup Notepad++ for AutoHotkey

11 Jul 2017, 12:16

I'm using NPP 7.4.2 32-bit on a 64-bit system (for plugin reasons). I get an error message when I try to import your file: "Fail to import."

When I try importing this one, it worked just fine: http://notepad-plus.sourceforge.net/com ... hotkey.xml
Asmodeus
Posts: 40
Joined: 19 Oct 2015, 15:53

Re: Setup Notepad++ for AutoHotkey

04 Aug 2017, 18:07

I like to setup a complete portable solution, so I downloaded ahk / notepad++ portable.

I followed the setup tutorial, everything (Syntax-Highlighting, Auto-Completion, [Hotstrings]) works.

How to setup "RunMe" / "boiler Run" without registering the ahk file extension in Windows?

I have the same issue with Notepad2-mod. Execute will pop up a Dialog "Windows cannot open this file: test.ahk"
User avatar
Masonjar13
Posts: 1135
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Setup Notepad++ for AutoHotkey

04 Aug 2017, 19:17

Asmodeus wrote:I like to setup a complete portable solution, so I downloaded ahk / notepad++ portable.

I accomplished this by making a compiled AHK script that runs the selected script as a parameter to the AutoHotkey executable. You can set it up to work with 32/64-bit (separately or dynamically), drag-n-drop onto the compiled script (pretty much the same as dropping it onto the AutoHotkey executable itself), make a GUI for it, etc.. I used fileSelectFile myself, easy enough.
Asmodeus
Posts: 40
Joined: 19 Oct 2015, 15:53

Re: Setup Notepad++ for AutoHotkey

05 Aug 2017, 17:40

Masonjar13 wrote:I accomplished this by making a compiled AHK script that runs the selected script as a parameter to the AutoHotkey executable.


do you mind sharing the source code?

I believe this could be pretty useful for other portable apps affectionados.
User avatar
Masonjar13
Posts: 1135
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Setup Notepad++ for AutoHotkey

05 Aug 2017, 19:11

Sure, here you go. Made a whole UI for it, I guess. Made this quite a while ago (compiled Aug '15). Had to pull it out and re-format it, didn't have it saved anywhere. And, as I mentioned, only really useful if it's compiled. I recommend compiling it as a 32-bit so it will run on 32 and 64.

Note: I had it set up in the same directory as the AHK executables, and you can put your stdlib there as well. I also only kept the Unicode versions in, so if someone wants to use the ANSI version, they'll have to add that in.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Asmodeus
Posts: 40
Joined: 19 Oct 2015, 15:53

Re: Setup Notepad++ for AutoHotkey

06 Aug 2017, 16:19

thanks for the code, i learned some things from it. though i compiled it as recommended but i still get the message "Windows can't open this file".
i've downloaded and unpacked ahk portable in C:\AutoHotkey folder and put your compiled code in the same directory.
Image
as mentioned my goal is to execute code without installing ahk using an editor like notepad++portable/notepad2-mod.
code execution should run in the background without showing any gui.

this simple code works, a script can be run without installation / registering the file extension for shell execution.

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance Force
#NoTrayIcon
run, C:\AutoHotkey\AutoHotkeyU32.exe "C:\AutoHotkey\test1.ahk"
ExitApp


it should be pretty easy, if i knew how make it generic :headwall:
User avatar
Masonjar13
Posts: 1135
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Setup Notepad++ for AutoHotkey

06 Aug 2017, 18:09

I'm fully aware of what you asked.. There was evidently a bug. Though, literally only one line needed to change. For user friendliness, I changed two lines: line 4, allows for easier changing of AHK directory, and line 40 (39 previously).

Return to “Editors”

Who is online

Users browsing this forum: No registered users and 1 guest