How to combine two commands in one button

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 8
Joined: Sat Mar 21, 2026 9:09 am

How to combine two commands in one button

Post 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!

Offline
Posts: 87
Joined: Sat Jul 05, 2008 11:30 am
Location: Odesa, Ukraine

Re: How to combine two commands in one button

Post 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");`)

Offline
Posts: 8
Joined: Sat Mar 21, 2026 9:09 am

Re: How to combine two commands in one button

Post 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")

Offline
Posts: 8
Joined: Sat Mar 21, 2026 9:09 am

Re: How to combine two commands in one button

Post 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")
Post Reply