You are here: PSPad forum > English discussion forum > Request: adding Autohotkey as scripting language

Request: adding Autohotkey as scripting language

#1 Request: adding Autohotkey as scripting language

Posted by: haichen | Date: 2015-10-16 09:39 | IP: IP Logged

May be this could be done because there is a Autohotkey.dll which could be adressed by COM.
www.autohotkey.net

Autohotkey is a very powerful and easy to use Scriptlanguage.
ahkscript.org

haichen

Options: Reply | Quote | Up ^


#2 Re: Request: adding Autohotkey as scripting language

Posted by: pspad | Date: 2015-10-16 09:54 | IP: IP Logged

What it should bring to PSPad?
Any idea what should Autohotkey do in PSPad?

Options: Reply | Quote | Up ^


#3 Re: Request: adding Autohotkey as scripting language

Posted by: haichen | Date: 2015-10-16 10:59 | IP: IP Logged

I mostly work with AHK to manipulate text.
It's the easyness to get what you want.

Examples:
MyVar = 5,3,7,9,1,13,999,-4
Sort MyVar, N D, ; Sort numerically, use comma as delimiter.
MsgBox %MyVar% ; The result is -4,1,3,5,7,9,13,999

; Remove all CR+LF's from the clipboard contents:
StringReplace, clipboard, clipboard, `r`n, , All

; Replace all spaces with pluses:
StringReplace, NewStr, OldStr, %A_SPACE%, +, All

Colors = red,green,blue
StringSplit, ColorArray, Colors, `,
Loop, %ColorArray0%
{
this_color := ColorArray%a_index%
MsgBox, Color number %a_index% is %this_color%.
}

String = This is a test.
StringLeft, OutputVar, String, 4 ; Stores the string "This" in OutputVar.
StringRight, OutputVar, String, 5 ; Stores the string "test." in OutputVar.

Functions like
InStr(Haystack, Needle [, CaseSensitive = false, StartingPos = 1, Occurrence = 1])

SubStr(String, StartingPos [, Length])

RegExMatch(Haystack, NeedleRegEx [, UnquotedOutputVar = "", StartingPos = 1])
AHK is very well documented and has a friendyl community.
ahkscript.org

Of course you can do this things in vb or js or other scriptlanguages.
So i can understand if this would not get it on your to do list.
But i hope
smiling smiley

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR