Sublime, AHK Studio, Notepad++ or others?

Discuss features, issues, about Editors for AHK
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 09:08

What you suggest I use to program with Autohotkey?
Please tell me pros and cons.

Thanks in advance.

Votes:
Notepad ++ 2
Pros:
RunMe plugin (It executes the current file using its shell association. Very useful to run scripts during/after editing.)
Cons:

AHK Studio 1

Pros:
1. Pure AHK solution
2. Written specifically for AHK development
3. Neat features [Code Vault, MsgBox Creator, Gists/Github, FTP(I believe) +more]
4. Responsive developer
5. Has been in devlopment for years (from ScriptWriter(using HEDIT.dll), then upgraded to Scilexer.dll, then now)
Cons:
1. This is complete rewrite so some features are not available yet
Last edited by empardopo on 26 Oct 2013, 02:53, edited 4 times in total.
Everything is possible!
User avatar
jNizM
Posts: 2681
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 09:11

If you use Notepad++ see here --> Setup Notepad++ for AutoHotkey
[AHK] 1.1.33.02 x64 Unicode | [WIN] 10 Pro (Version 20H2) x64 | [GitHub] Profile
Donations are appreciated if I could help you
User avatar
Grendahl
Posts: 159
Joined: 30 Sep 2013, 08:21

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 10:04

+1 for Notepad++
Especially with the RunMe plugin.
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 10:09

Grendahl wrote:+1 for Notepad++
Especially with the RunMe plugin.
RunMe plugin? What is this? To run script?
Everything is possible!
User avatar
Grendahl
Posts: 159
Joined: 30 Sep 2013, 08:21

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 10:34

It executes the current file using its shell association. Very useful to run scripts during/after editing.
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 10:46

I'm going to test Notepad++ although today I've discovered AHK Studio and It looks very nice.
Thanks!
Everything is possible!
User avatar
Grendahl
Posts: 159
Joined: 30 Sep 2013, 08:21

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 10:49

Make sure you follow the link that jNizM posted. :)
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 12:16

I've followed this link and now I have some problems.
I posted my problems in this link.

Thanks!
Everything is possible!
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 14:11

Sublime Text (2|3) +1
Pros:
1. Sublime Text is easy to extend(using Python). The API provides access to most of Sublime Text's core features. With a little bit of Python Kung Fu you can bend it to your liking
2. Avi has a neat package for AHK - Sublime4AutoHotkey - http://www.ahkscript.org/boards/viewtop ... =2009#p675
3. Or you can use my custom AHK plugin here: http://www.ahkscript.org/boards/viewtop ... =2009#p467
It can(by passing different arguments):
  • Run AHK code from the active view/tab, works for both saved and unsaved(useful for quick test scripts) file(s) - no temp file created for the latter :D
  • Run AHK from file (pass the path to the AHK script - I use this feature to open some AHK tools like: GUI Creator, RegEx Tester, etc.)
  • Run AHK code from string (pass a string containing AHK code - useful for small(or large) code snippets: show/hide Sublime window, make Sublime window transparent, +anything you can imagine)
  • Open AHK CHM documentation - I am currently working on extending the plugin using HTMLHelp API to incorporate context help
  • Run Window Spy
**You can bind the command to a hotkey, context menu, menu bar, Command Palette, call from Sublime console. Its behavior depends on the type of argument(s) you pass.
**When running unsaved(AHK file not created yet) AHK code from the active view/tab, the plugin appends a 'print(string)' function to your script. Calling this function from within your script will display the string passed to Sublime Text's console. Useful for debugging, no more MsgBoxes. -- I use this as an alternative to DebugView, no need to have another window in the background.
Cons:
1. Not free, but unlimited testing period

AHK Studio +1
Pros:
1. Pure AHK solution
2. Written specifically for AHK development
3. Neat features [Code Vault, MsgBox Creator, Gists/Github, FTP(I believe) +more]
4. Responsive developer
5. Has been in devlopment for years (from ScriptWriter(using HEDIT.dll), then upgraded to Scilexer.dll, then now)
Cons:
1. This is complete rewrite so some features are not available yet

Notepad++
Pros:
1. Powerful
2. I haven't really used it that much
Cons:
--
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 15:37

Uff, thanks!
But now I have more doubts. Very interesting the package Sublime4AutoHotkey.

Thanks!
Everything is possible!
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

25 Oct 2013, 20:36

I've been testing sublime 3 but I have a problem. I want to run a script like this.
My problem is that when I press CTRL+Shift+B to run my script ahk I get this
Writing file /C/Archivos de programa/Sublime Text 3/Avis_Sublime4Autohotkey/temp/default1.ahk with encoding UTF-8 (atomic)
Unable to find target command: ahkcompile
If I press CTRL+B I get
Writing file /C/Archivos de programa/Sublime Text 3/Avis_Sublime4Autohotkey/temp/default1.ahk with encoding UTF-8 (atomic)
Unable to find target command: ahkrun
The above message I can see in the Show console.

Any help please?
Thanks in advance.
Everything is possible!
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Sublime, AHK Studio, Notepad++ or others?

26 Oct 2013, 00:42

@empardopo
I. Donwload this and save it as ahk.py, put it in Sublime-Text-3-Dir\Data\Packages\AutoHotkey\
II. Then save the following as AutoHotkey.sublime-commands, put it in the same folder as above:

Code: Select all

[
	{
		"caption": "AutoHotkey: Documentation",
		"command": "ahk",
		"args": { "cmd": "$help" }
	},
	{
		"caption": "AutoHotkey: Window Spy",
		"command": "ahk",
		"args": { "cmd": "$win_spy" }
	},
	{
		"caption": "AutoHotkey: Build",
		"command": "ahk"
	}
]
III. Write any AHK code in Sublime Text
IV. Press Ctrl+Shift+p, the Command Palette should appear, type AutoHotkey: Build, select the item and it should run the code
V. If you want to bind the command to a hotkey, save the following as Default (Windows).sublime-keymap and put it in Sublime-Text-3-Dir\Data\Packages\User\: (you can change it to hotkey of your choice)

Code: Select all

[
	{
		"keys": ["f5"],
		"command": "ahk",
		"context": [
			{ "key": "selector", "operator": "equal", "operand": "source.ahk" },
		]
	},
	{
		"keys": ["f5"],
		"command": "ahk",
		"context": [
			{ "key": "selector", "operator": "equal", "operand": "text.plain" },
		]
	}
]
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

26 Oct 2013, 03:14

I followed the first 3 steps...
In the steps 4, It doesn't appear AutoHotkey: Build

Image

In the steps 5, not run the scripts when I press F5.

I don't know where I am wrong.
Everything is possible!
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Sublime, AHK Studio, Notepad++ or others?

26 Oct 2013, 03:20

The fact that it does not appear in the Command Palette, means that the plugin was not loaded.
Have you tried restarting Sublime Text? Open Sublime Console and look for the following: reloading plugin AutoHotkey.ahk - indicates that the plugin is successfully loaded. Make sure that you saved the Python script as ahk.py. Right click on this link and choose Save link as: https://raw.github.com/cocobelgica/ST-AHK/master/ahk.py
Here's a screenshot:
Image
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

26 Oct 2013, 03:54

I've followed your steps and It doesn't work!
I've put the ahk.py file in the path: C:\Archivos de programa\Sublime Text 3\Data\Packages\AutoHotkey

In my Console appear this
DPI scale: 1
startup, version: 3047 windows x32 channel: stable
executable: /C/Archivos de programa/Sublime Text 3/sublime_text.exe
working dir: /C/Archivos de programa/Sublime Text 3
packages path: /C/Archivos de programa/Sublime Text 3/Data/Packages
state path: /C/Archivos de programa/Sublime Text 3/Data/Local
hardware concurrency: 2
zip path: /C/Archivos de programa/Sublime Text 3/Packages
zip path: /C/Archivos de programa/Sublime Text 3/Data/Installed Packages
found 4 files for base name Default.sublime-keymap
found 1 files for base name Default.sublime-mousemap
found 3 files for base name Main.sublime-menu
loading bindings
loading pointer bindings
found 1 files for base name Default.sublime-theme
theme loaded
app ready
startup cache, total files: 154 cache hits: 154
pre session restore time: 0.155375
startup time: 0.171375
first paint time: 0.171375
launching: /C/Archivos de programa/Sublime Text 3/plugin_host.exe
unable to launch plugin_host
error: plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted
loaded 839 snippets
Incredible! Where is the problem?
Thanks very much for your help.
Everything is possible!
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Sublime, AHK Studio, Notepad++ or others?

26 Oct 2013, 03:56

As per Console: error: plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted
You would need to restart Sublime Text. Close it then open it again...
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

26 Oct 2013, 05:53

Thanks, thanks and thanks!!!!
When I install Sublime the file plugin_host.exe was detected as virus!
Image

I've stooped my antivirus and I set an exeption and now It works fine. I hope that file was a positive false!
Now, I can run my ahk scripts!!!!!!! Thanks!!!
Everything is possible!
jesseb
Posts: 10
Joined: 15 Oct 2013, 03:40

Re: Sublime, AHK Studio, Notepad++ or others?

28 Oct 2013, 15:09

I personally use http://fincs.ahk4.net/scite4ahk/
but haven't tried ahkstudio or sublime, never had any issues with scite4ahk, definitely makes writing code faster.
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Re: Sublime, AHK Studio, Notepad++ or others?

28 Oct 2013, 19:00

jessebarbier wrote:I personally use http://fincs.ahk4.net/scite4ahk/
but haven't tried ahkstudio or sublime, never had any issues with scite4ahk, definitely makes writing code faster.
Thanks for your info. It looks pretty good.
I like very much that scite has debug mode.

Greetings!
Everything is possible!
jesseb
Posts: 10
Joined: 15 Oct 2013, 03:40

Re: Sublime, AHK Studio, Notepad++ or others?

29 Oct 2013, 18:41

Definitely got some nice features, Love the auto indents, collapsing code braces, and quick run the most :D
Hope you enjoy, Good luck.

Return to “Editors”

Who is online

Users browsing this forum: No registered users and 3 guests