Page 1 of 1
How to combine two commands in one button
Posted: Sat May 16, 2026 8:01 am
by Native2904
Hi,
i wanted to ask if someone can explain me, how i can combine two commands in one button.
I have a button that search the content of the Clipboard on my drive..
Code: Select all
"Everything search with clipboard..." Exec('"C:\Everything\Everything.exe" -s* clipboard:') Icon("C:\Everything\Icons\Magnifier.ico")
but i can't combine that with the Copy command (4154).
How do that work?
Thank you in advance!
Re: How to combine two commands in one button
Posted: Sat May 16, 2026 10:12 pm
by ewild
Native2904
I asked a similar question a while ago.
ewild wrote: ↑Tue Mar 17, 2026 1:27 am
Instructor
Please consider adding the 'commands chain' functionality to the ContextMenu plugin (and maybe to the Toolbar plugin as well), that would allow executing several commands in a sequence, one after another, within a single menu item call.
The syntax could be pretty simple: a comma-separated list of commands.
An example:
Code: Select all
"Lines: sort A-Z" Call("Format::LineSortStrAsc"), Call("Scripts::Main",1,"fixLines.js","blank") Icon("%a\AkelFiles\Plugs\Format.dll") # sort ascending, then remove leading blank lines
And the answer has been as follows:
Instructor wrote: ↑Tue Mar 31, 2026 10:07 pm
ewild wrote: ↑Tue Mar 17, 2026 1:27 amPlease consider adding the 'commands chain' functionality ...
Use EvalCmd.js:
Code: Select all
Call("Scripts::Main", 1, "EvalCmd.js", `AkelPad.Call("Format::LineSortStrAsc"); AkelPad.Call("Scripts::Main",1,"fixLines.js","blank");`)
Re: How to combine two commands in one button
Posted: Sun May 17, 2026 1:23 pm
by Native2904
Thank you very much. That works very well.
But it must have a little pause to copy all the content in the clipboard.
Code: Select all
"Everything search with clipboard..." Call("Scripts::Main", 1, "EvalCmd.js", `AkelPad.Command(4154); WScript.Sleep(450); AkelPad.Exec('"C:\\Everything\\Everything.exe" -s* clipboard:');`) Icon("C:\\Everything\\Icons\\Magnifier.ico")