English main discussion
Offline
Posts: 8 Joined: Sat Mar 21, 2026 9:09 am
Post
by Native2904 » Sat May 16, 2026 8:01 am
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
Post
by ewild » Sat May 16, 2026 10:12 pm
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 am Please 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
Post
by Native2904 » Sun May 17, 2026 1:23 pm
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
Post
by Native2904 » Sun May 17, 2026 1:23 pm
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")