SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

The popular SciTE-based AutoHotkey Script Editor
guest3456
Posts: 3453
Joined: 09 Oct 2013, 10:31

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

09 Sep 2014, 03:43

dretax wrote:Your programm successfully deleted everything from the installed folder. I had it installed to a directoy, and when i updated it, it WIPED EVERYTHING from the folder. I LOST EVERYTHING.

I can't even recover the files with recuva.....
yikes. thats horrible

User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

10 Sep 2014, 13:04

I'd like to be able to run highlighted text. (so instead of running the entire file, it will only run the text that is highlighted.) Ideally this would also be working from a file that has NOT been saved. Is there anyway to get SciTE to do this?

On this page http://www.scintilla.org/SciTEDoc.html I found this text:

On Windows, the optional command.input property specifies text that will be piped to the command. This may reference other properties; for example, command.input.0.*.cc=$(CurrentSelection) would pipe the current selection to the command processes. The command.input property is only supported for subsystem 0 (command line programs).

This seems close to what I want however I'm not sure how to get it to run in AutoHotKey.
Any help / hints would be greatly appreciated!
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
guest3456
Posts: 3453
Joined: 09 Oct 2013, 10:31

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

10 Sep 2014, 16:02

Joetazz wrote:I'd like to be able to run highlighted text. (so instead of running the entire file, it will only run the text that is highlighted.) Ideally this would also be working from a file that has NOT been saved. Is there anyway to get SciTE to do this?
we're on an AHK forum, why not just do it in AHK in 30 seconds?

Code: Select all

Send, ^c
FileAppend
RunWait
FileDelete

User avatar
joedf
Posts: 8937
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

11 Sep 2014, 00:24

Adding on... You can customize the toolbar for a button, that will do what you want, also you can use the COM interface for scite4ahk, see here: http://fincs.ahk4.net/scite4ahk/pages/comiface.htm
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

11 Sep 2014, 07:33

I'd like something more elegant than just sending keystrokes saving the file/then running it. One of the main reasons is I want to keep it in the active window so I can monitor out Output pane for errors, etc. (WHile my main use of SciTE is w/AutoHotKey, I also use it for Python and much of the Python output is also put there)

@joedf- I don't unerstand how I could create a button that would execute the highlighted text. Can you give me an example? On a second note- I wasn't aware of the COM interface and spent the last hour reviewing. Very very cool!

BTW- yesterday I added the below functionality to my context menu where it will take the highlighted word and submit a google search to the ahkscript.org forum. Very cool stuff!
(please realize the below is grabbed from specific sections of my SciTEUser.properties file. I didn't want to copy/paste the whole thing here but you can merge it with my previous example earlier in this post. Can someone please explain why I have to list it in my context menu seciton ast 1141 but I need the command to be .41? I can't understand why I need to add 1100 to it...

Code: Select all

#Add below line to your customized context menu
Search AHK Forum|1141|\

# 1141 Google search selected item on ahkscript.org  -this needs to be below the above code/section
command.name.41.*=Google Search AutoHotKey.org
command.41.*="https://www.google.com/search?q=site:ahkscript.org+$(CurrentSelection)"
command.subsystem.41.*=2
command.quiet.41.*=1
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
dretax
Posts: 2
Joined: 08 Sep 2014, 05:57

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 06:04

guest3456 wrote:
dretax wrote:Your programm successfully deleted everything from the installed folder. I had it installed to a directoy, and when i updated it, it WIPED EVERYTHING from the folder. I LOST EVERYTHING.

I can't even recover the files with recuva.....
yikes. thats horrible
Yeah. I had like 4 big scripts, and I have to rewrite them...............

I Would recommend everyone to not use the installer in the same folder......
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 08:30

I was able to figure out how to highlight text and have SciTE run my Python code.

Code: Select all

#  1143  Run python code  http://stackoverflow.com/questions/14569977/submit-current-selection-to-r-from-scite
command.name.43.$(file.patterns.py)=Run Python code
command.mode.43.$(file.patterns.py)=subsystem:0,savebefore:no
command.43.$(file.patterns.py)="B:\progs\python27\Anaconda\pythonw.exe" 
command.input.43.$(file.patterns.py)=$(CurrentSelection)
command.shortcut.43.$(file.patterns.py)=Ctrl+r
However I can't figure out how to get it to do the same with AutoHotKey. Anybody have any suggestions? The following does NOT work.

Code: Select all

command.name.45.$(file.patterns.ahk)=Run AutoHotKey
command.mode.45.$(file.patterns.ahk=subsystem:1,savebefore:no
command.45.$(file.patterns.ahk)="B:\Progs\AutoHotkey_L\AutoHotkey.exe"
command.input.45.$(file.patterns.ahk)=$(CurrentSelection)
command.shortcut.45.$(file.patterns.ahk)=Ctrl+k
On this page http://www.scintilla.org/SciTEDoc.html there is info on what "subsystem" to use. I first tried 1 (as I do have windows pop-up) and that didn't work, then I tried all the others but nothing worked.
Any help would be greatly appreciated. I think this would be an AWESOME functionality. I'm already loving it with my Python code as I can test little snippets out easily.
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 15:48

dretax wrote:Your programm successfully deleted everything from the installed folder. I had it installed to a directoy, and when i updated it, it WIPED EVERYTHING from the folder. I LOST EVERYTHING.
I can't even recover the files with recuva.....
Yeah. I had like 4 big scripts, and I have to rewrite them...............
I Would recommend everyone to not use the installer in the same folder......
First of all, I'm sorry for your loss. However, you were never supposed to save your scripts in the SciTE program folder. That folder should only be modified by the SciTE4AutoHotkey installer and said installer wipes the folder by design before copying the new program files. Please save your scripts somewhere else, in a sane location.
Joetazz wrote:I'd like to be able to run highlighted text. (so instead of running the entire file, it will only run the text that is highlighted.) Ideally this would also be working from a file that has NOT been saved. Is there anyway to get SciTE to do this?
You cannot do it without an intermediary AutoHotkey script. The 'input' property of a command merely sets the data that will be written to the launched program's stdin. Some interpreters (such as that of python or other languages) are able to read the script from stdin (and is in fact the default behaviour when they are called with no arguments). AutoHotkey does not have this functionality. (lexikos: add AutoHotkey.exe /RunStdIn hint hint)
Joetazz wrote:

Code: Select all

# language 
menu.language=\
&AutoHotkey|ahk||\
&Lua|lua||\
&HTML|html||\
&INI and property files|ini||\
&Py|Python||\
&SPSS|sps||\
&Sql|sql||\
$(ext.menu.language)\
$(user.menu.language)
Don't do that. Please instead use the user.menu.language property, which was created for this purpose:

Code: Select all

user.menu.language=\
&HTML|html||\
&Py|Python||\
&SPSS|sps||\
&Sql|sql||
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 16:19

fincs- thank you very much for explaining the issue! I really think being able to submit highlighted text would be pretty darn awesome! I think I will develop a separate script to quickly save highlighted text then launch but I do hope, some day, we can get it integrated as you hinted.

y'all have an awesome weekend!
Joe
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 16:30

@fincsDon't do that. Please instead use the user.menu.language property, which was created for this purpose:
user.menu.language=\
&HTML|html||\
&Py|Python||\
&SPSS|sps||\
&Sql|sql||
I tried to swap out my code with your example but it no longer allows me to choose the languages from the Language menu. Should I be looking for it elsewhere?
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 16:33

It worked for me (I edited SciTEUser.properties). Try restarting SciTE and see if that works.
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

12 Sep 2014, 16:39

That is the file I edited as well and I was restarting SciTE every time. (I know most things don't require it but it became clear this did.

I'll play with it over the weekend. I'm sure I'll figure it out.

Thanks again for all your work on this! SciTE is really an amazing tool!
Regards,
Joe
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

13 Sep 2014, 03:55

fincs wrote:(lexikos: add AutoHotkey.exe /RunStdIn hint hint)
Do it yourself hint hint. :angel:
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

13 Sep 2014, 05:23

Joetazz wrote:I'd like to be able to run highlighted text. (so instead of running the entire file, it will only run the text that is highlighted.) Ideally this would also be working from a file that has NOT been saved. Is there anyway to get SciTE to do this?
Using S4AHK's COM interface and HotkeyIt's DynaRun you can create a plugin to achieve this. However, I would love for AHK to support AutoHotkey.exe /RunStdIn. :)
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

13 Sep 2014, 10:49

lexikos wrote:
fincs wrote:(lexikos: add AutoHotkey.exe /RunStdIn hint hint)
Do it yourself hint hint. :angel:
You lazy boy :angel:
https://github.com/Lexikos/AutoHotkey_L/pull/31
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

13 Sep 2014, 12:00

Thanks for this! I'm not a programmer and have learned nearly everything I know from reading the AutoHotKey forums. Am I understanding it correctly in that I will need to take the file you created and "compile" a custom build of AutoHotKey? I think I'm ready for this step, I just want to make sure I'm on the right trail.

Regards,
Joe
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
User avatar
joedf
Posts: 8937
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

16 Sep 2014, 01:04

Alright, here you go, Joetazz
Just took a 5min to create "SelectRun.ahk" for ya ;)

With a toolbar icon, and respects the set platform in scite. Even Im using it right now! :D
SelectRun.7z
(1.97 KiB) Downloaded 249 times
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: SciTE4AutoHotkey v3.0.06 [Updated August 18 2014]

16 Sep 2014, 07:05

Thanks joedf and pretty cool! :D I'll want to add it to my context menu as well as have a hotkey for launching it.

I believe you meant to have use edit UserToolbar.properties not "SciTEUserToolbar.properties". Also, for those of you that have moved the location of the default directories, you might need to play with it a bit as the locations where you need to place the files provided and the above toolbar will not be in the locations mentioned.
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!

Return to “SciTE4AutoHotkey”

Who is online

Users browsing this forum: No registered users and 13 guests