Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

Post your working scripts, libraries and tools for AHK v1.1 and older
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

25 Jul 2019, 15:36

Might be a useful idea to allow string manipulations like that, I'll think about it (suggestions welcome)

You can solve your problem using Functions which are different compared to Plugins - http://lintalist.github.io/#Functions

1. User defined function(s)

In plugins\MyFunctions.ahk you can add your own functions - these won't be overwritten during updates.

So in MyFunctions.ahk add the following functions:

Code: Select all

StrUpper(in)
	{
	 StringUpper, in, in
	 return in
	}
Save the file. Restart Lintalist.

2. AHK Functions

In this case https://www.autohotkey.com/docs/commands/RegExReplace.htm

Just to note, if your input has certain characters it may fail e.g. {}[],&% etc so the StrUpper example above might be "best" - see edit

If you added StrUpper() to MyFunctions.ahk, the following test snippet

snippet test:

Code: Select all

text1 [[StrUpper([[Input=code1]])]]

text2 [[RegExReplace("[[Input=code2]]",".+","$U{0}")]]
should work and uppercase your input.

Edit: added "" around [[input=code2]]
shipaddicted
Posts: 89
Joined: 15 Jul 2016, 19:57

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

26 Jul 2019, 11:03

list wrote:
25 Jul 2019, 15:36
Might be a useful idea to allow string manipulations like that, I'll think about it (suggestions welcome)

You can solve your problem using Functions which are different compared to Plugins - http://lintalist.github.io/#Functions

1. User defined function(s)

In plugins\MyFunctions.ahk you can add your own functions - these won't be overwritten during updates.

So in MyFunctions.ahk add the following functions:

Code: Select all

StrUpper(in)
	{
	 StringUpper, in, in
	 return in
	}
Save the file. Restart Lintalist.
YES!!! Works beautifully!! You are SO incredibly awesome!

I hadn't gotten as far as trying to use functions yet ... I'm still in the Fundamental LintaList Learning Stage ... :D
shipaddicted
Posts: 89
Joined: 15 Jul 2016, 19:57

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

26 Jul 2019, 11:59

I did add one tiny little addition to the function --

Code: Select all

StrUpper(in)
	{
	 StringUpper, in, in
	 return Trim(in)
	}
So now I can be even lazier and not worry about leaving a space at the end of my Input. :D
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

03 Nov 2019, 04:38

v1.9.9 - String, Query plugins - shortcuts for first 10 results, various fixes

* New: Search GUI shortcuts for first 10 search result (Alt+1..0) - show numbers as text and/or icons.
* New: String plugin to transform text (upper, lower, sentence, title case, trim...)
* New: Query plugin and QueryDelimiter setting. Use (parts of) search query in Snippets.[1]
* New: Editor - 'shortcuts' (Keyboard accelerators) for the (Edit) controls.
* Change: removed Pgdown and Pgup hotkeys, no longer worked correctly and not all that useful
* Change/fix: Change how columns are set for listview to prevent accidental hiding of columns
* Fix: Choice plugin Cancel/Esc not storing position properly
* Fix: Pausing / Enabling Shortcuts didn't work correctly, worked only after restart
* Update TitleCase() to v1.2

See https://github.com/lintalist/lintalist/blob/master/changelog.md for details.

[1] See https://lintalist.github.io/#query-plugin - think of it as a shorthand for Input you enter directly in the search box
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

03 Nov 2019, 08:25

Lintalist v1.9.9 tested on AHK 1.1.28.02 Unicode x32 WIN_7 64bit

Error at line 49 in #include file "XXX\lintalist\include\SetIcon.ahk".
Error: This line does not contain a recognized action.
Line Text: Switch ShortCutSearchGuiCounter

for info:
v1.9.9 is no longer compatible with previous versions of AHK (before 1.1.31)
(use of switch)
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

03 Nov 2019, 14:54

That's correct, I've added a note to the "releases" on GH about that. In general it is advised to upgrade AHK if you're not using the lintalist.exe (which is just a renamed autohotkey.exe), especially for AltGr keyboard users given the recent bug fixes in AHK.
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

03 Nov 2019, 18:15

list wrote:
03 Nov 2019, 14:54
In general it is advised to upgrade AHK if you're not using the lintalist.exe
OK, done :thumbup:

Suggestion/questions:
  • help wrote:Capslock = Open Lintalist searching window. If already active you can toggle between Wide and Narrow view.
    Is there a way to toggle between visible and hidden ? (I would like to use the same shortcut to actually hide and show lintalist) :think:
    _
  • Add a boolean option in the settings to show Lintalist always on top ( + icon to toggle in the menu bar )
    (it could be useful if you want to set or check the position of the cursor AFTER selecting the text you want to paste)
  • Lintalist shows the first line of a snippet (I want to use it to make a lintalist comment or title)
    for example insert lintalist title [[title=This first line will be visible in Lintalist but never copied or sent.]]
    Is there a way to do that? :think:
Regards
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

04 Nov 2019, 15:38

Thanks for the suggestions :)
SpeedMaster wrote:Is there a way to toggle between visible and hidden ? (I would like to use the same shortcut to actually hide and show lintalist) :think:
There is now https://github.com/lintalist/lintalist/tree/beta-1.9.9.10 :) See StartSearchHotkeyToggle setting - there is also a View menu in the search Gui
SpeedMaster wrote:[*] Add a boolean option in the settings to show Lintalist always on top ( + icon to toggle in the menu bar )
(it could be useful if you want to set or check the position of the cursor AFTER selecting the text you want to paste)
That might be useful addition, see beta above - View menu, shortcut key is Ctrl+T and there is (crude) "pin" button in the button bar. Note that after pasting a snippet the Gui will still hide as it normally would and it forgets the "Always on Top" setting e.g. you have to set it again when you open the Gui and want it to be on top again.
SpeedMaster wrote:[*] Lintalist shows the first line of a snippet (I want to use it to make a lintalist comment or title)
for example insert lintalist title [[title=This first line will be visible in Lintalist but never copied or sent.]]
Is there a way to do that?
I personally use Part2 or even the shorthand for such "notes" or "hints" - see here https://lintalist.github.io/#Part1-2
But in the beta 1.9.9.10 there is now a comment plugin, usage:
[[comment=add your text here which can be searched but all of it will be removed before pasting]]
Note that all of the above is only tested very briefly so I would recommend to try it in a new folder and copy your bundles to it (\bundles\*.txt) so you can experiment with it.
User avatar
boiler
Posts: 16768
Joined: 21 Dec 2014, 02:44

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

04 Nov 2019, 16:00

list wrote:
04 Nov 2019, 15:38
I personally use Part2 or even the shorthand for such "notes" or "hints" - see here https://lintalist.github.io/#Part1-2
That's how I use Part2 as well. As searchable as Part1, and I still see what will get pasted (at least the first line of it if multi-line) in Part1. It's perfect for me. But comments sounds like a nice addition.
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

05 Nov 2019, 05:11

Thank you for your quick answer and for this beta version (I already use it 8-) ).
here is what I was able to test:
  • using the same keyboard shortcuts to show and hide the window works very well. :clap: :thumbup:
  • the plugin to insert a comment is missing. ("comment.ahk" not found :cry: can you provide it?)
  • Toggle Wide/Narrow View in the menu does not work properly. (it hides the window instead of resizing it)
  • the always on top icon works but needs some adjustments (e. g. it should disable itself when editing or creating a snippet)
boiler wrote:
04 Nov 2019, 16:00
That's how I use Part2 as well
In fact the idea was to use both parts (one for the title and the other for the commentary)

Cheers
DRocks
Posts: 565
Joined: 08 May 2018, 10:20

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

05 Nov 2019, 07:02

Hello,
Heres my first impression regarding the presentation of Lintalist.

It looks phenomenal and id like to know more.
But there is TOO much information on the website to even think of reading it.
Id really recommend making a voice over video simple introduction as front page presentation every where you talk about Lintalist for ppl like me.

The no sound YouTube videos are something I CANT watch from whoever it is so no chance I will put in efforts to follow along.

You know this is just a friendly feedback so that you can do whatever you want with it :) I hope it helps and seriously this script looks awesome I just dont have any motivation to learn a tool that should help me save time but that is so complex to get a quick overview. It makes it a big draw back for me and id suppose for others too.

All my best wishes:)
Have a good day
Alex
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

05 Nov 2019, 12:32

@SpeedMaster that would indeed be useful - added it here https://raw.githubusercontent.com/lintalist/lintalist/beta-1.9.9.10/plugins/Comment.ahk where is the facepalm emoji when you need it (-‸ლ)
I'll look at your other feedback later.

@DRocks well, I agree the videos are a bit boring. But I think Lintalist is just like AHK, the basics is are very simple so you don't need to learn much at the start, later on you can discover more advanced features. If you just add a few texts/snippets to the default bundle you can already use it for canned email responses or pasting your signature in your email message(s) for example. I do consider converting the documentation (website) to a more "read the docs" like setup - something like https://keypirinha.com - so each "feature", plugin and setting can have its own documentation page with one or more examples if applicable. I tried the wiki https://github.com/lintalist/lintalist/wiki but I don't really like that (too much work doing it all online)
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

05 Nov 2019, 14:23

SpeedMaster wrote:[*]Toggle Wide/Narrow View in the menu does not work properly. (it hides the window instead of resizing it)
It did not work in combination with StartSearchHotkeyToggle=1 - now it should work in both cases.
SpeedMaster wrote:[*]the always on top icon works but needs some adjustments (e. g. it should disable itself when editing or creating a snippet)
That should be fixed for the Editor, Configuration, Bundle Properties, Counter and Local variable GUIs. If it doesn't let me know :)
SpeedMaster wrote:In fact the idea was to use both parts (one for the title and the other for the commentary)
Just to reiterate - you don't need the [[comment=]] as such if you are already are using Part2 but of course [[comment=]] will be visible in the Preview which may be easier to see or read. But it is easy to add to Lintalist, so for those that prefer to avoid using Part2 they can use [[comment=]]

Still at https://github.com/lintalist/lintalist/tree/beta-1.9.9.10
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

10 Nov 2019, 08:28

list wrote:
05 Nov 2019, 14:23
Toggle Wide/Narrow View... it should work in both cases.
ok working :thumbup:
list wrote:
05 Nov 2019, 14:23
the always on top... should be fixed
ok working :thumbup:
list wrote:
05 Nov 2019, 14:23
for those that prefer to avoid using Part2 they can use [[comment=]]
Ok, lintalist comments are well removed :thumbup:

Thank you for all these improvements. 8-)

Suggestion:
Adding a toggle icon to also remove AHK comments and bloc comments (; /* */) would be a good addition.
(Sometimes it is useful to paste a snippet with it's AHK comments and sometimes not)

Best regards
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

11 Nov 2019, 13:59

Thanks for the feedback & testing.
SpeedMaster wrote:
10 Nov 2019, 08:28
Suggestion:
Adding a toggle icon to also remove AHK comments and bloc comments (; /* */) would be a good addition.
(Sometimes it is useful to paste a snippet with it's AHK comments and sometimes not)
Perhaps this is too specific to add to lintalist, also because of various commenting styles in other languages. If you MUST have it I would probably do the following.

In lintalist https://github.com/lintalist/lintalist/blob/master/lintalist.ahk#L1009, or 1025 in the beta, change the FileAppend line so it insert a "LintaListGlobalScript" variable into each script

Code: Select all

FileAppend, % "LintaListGlobalScript=" LintaListGlobalScript "`n`n" Script, %TmpDir%\tmpScript.ahk, UTF-8 ; %
Then I would add the following to include\MyPlugins.ahk or include\MyFunctions.ahk

Code: Select all

#IfWinActive, ahk_group AppTitle   ; Hotkeys only work in the just created GUI
F12::
LintaListGlobalScript:="StripComments"
Gosub, Paste
LintaListGlobalScript:=""
Return
#IfWinActive
And then use the following script code for those snippets - remember you can use a local variable as script as well so that way it will work across bundles and you would only have to update one script to change it
script code:

Code: Select all

#NoEnv
#SingleInstance, force
SetBatchLines, -1
ListLines, off
LLInit()                            ; fake call to load global variables from Lintalist main script - see Docs
ClipSet("s",1,SendMethod,Clipboard) ; store current clipboard contents
ClearClipboard()                    ; clear it
MsgBox % LintaListGlobalScript
[[llpart1]]
If (LintaListGlobalScript = "StripComments")
	{
	 llpart1:=regexreplace(llpart1,"mU) `;.*(\r?\n)","$1")
	 llpart1:=regexreplace(llpart1,"msU)/\*.*\*\/")
	}
Clipboard:=llpart1
Sleep 200
SendKey(SendMethod, "^v")           ; paste changed clipboard using SendMethod defined by Lintalist settings
Clipboard:=ClipSet("g",1)           ; restore original clipboard contents
ExitApp
Now when you press ENTER or Alt-0..9 in the search gui it will paste with Comments, if you press F12 it will try to strip the comments before pasting the snippet

This does mean I need to add "LintaListGlobalScript" to the standard Lintalist but that might be a useful addition as other users may find it useful to pass on some info to script based on similar use cases.

Edit Much easier would be to copy the clip to the clipboard directly using the "alt-enter" shortcut/label like so, now you have the clipboard so you can use the regex codes from above to strip comments, example with F11

Code: Select all

#IfWinActive, ahk_group AppTitle   ; Hotkeys only work in the just created GUI
F11::
Gosub, !Enter
Sleep 500
MsgBox % clipboard ; just to illustrate
Return
#IfWinActive
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

17 Nov 2019, 07:58

list wrote:
11 Nov 2019, 13:59
Perhaps this is too specific to add to lintalist, also because of various commenting styles in other languages.
That's right. I forgot that this tool could also be used for other languages. :?
list wrote:
11 Nov 2019, 13:59
Much easier would be to copy the clip to the clipboard directly using the "alt-enter" shortcut/label like so, now you have the clipboard so you can use the regex codes from above to strip comments
Good idea and easy to implement. :thumbup:
Thanks for the regex. I put it in a function. 8-)
example:

Code: Select all

script=
(%
;FROM: http://www.autohotkey.com/forum/viewtopic.php?t=54713&postdays=0&postorder=asc&start=0
; EXAMPLES
/*
Rand() ; - A random float between 0.0 and 1.0 (many uses)
Rand(6) ; - A random integer between 1 and 6 (die roll)
Rand("") ; - New random seed (selected randomly)
Rand("", 12345) ; - New random seed (set explicitly)
Rand(50, 100) ; - Random integer between 50 and 100 (typical use)
*/

; RANDOM FUNCTION
Rand( a=0.0, b=1 ) { ; line

    /*
    IfEqual,a,,Ran,,% r := b = 1 ? Rand(0,0xFFFFFFFF) : b ;test a 0013215
    Return r ; test
    */
   IfEqual,a,,Random,,% r := b = 1 ? Rand(0,0xFFFFFFFF) : b ;test b 0013215
   Else Random,r,a,b
   Return r ; test
}


)

msgbox, % clipboard:=removecomments(script)

RemoveComments(scr) {
    scr:=regexreplace(scr,"mU)`;.*(\r?\n)","$1")
    scr:=regexreplace(scr,"msU)/\*.*\*\/")
    scr:=RegExReplace(scr, "\v+", "`n")
    scr:=RegExReplace(scr, "(^|\r?\n)\K(\s*\r?\n)+")
    scr:=RegExReplace(scr,"`n", "`r`n")
    return scr
}

Cheers,
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

15 Dec 2019, 06:29

v1.9.10 New comment plugin, Always on Top, Show/Hide Gui using StartSearchHotkey, other improvements - https://github.com/lintalist/lintalist/releases/tag/v1.9.10
  • New: Comment plugin - add comment to snippet which will be removed before pasting. Use as visual reminder or search aid.
  • New: On Top button/option in Search Window ctrl+t (per search)
  • New: Option to show/hide the Search Window with the same shortcut (StartSearchHotkeyToggle setting)
  • New: View menu in Search Window to toggle wide/narrow window and On Top
  • New: Make a 64-bit version available for download as well (a renamed AutoHotkeyU64.exe)
  • New: EditorAutoCloseBrackets setting to define some editor hotstrings, example [ -> [[|]]
  • Change: More flexible plugin check syntax in Editor (was too strict with regards to [[..]]). (EditorSnippetErrorCheck setting)
  • Fix/Change: Disable Search GUI shortcuts when using the non-default ColumnSort setting (NoSort)
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

15 Feb 2020, 10:02

Lintalist v1.9.11 @ https://github.com/lintalist/lintalist/releases
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

11 Apr 2020, 04:48

Lintalist v1.9.12 @ https://github.com/lintalist/lintalist/releases

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: JoeWinograd, TOTAL and 141 guests