Hello everyone, great forum! Just a question...
Is it possible to assign a shortcut key for "Copy Shortcut Target Item" command? It seems there is no command in the command list. Thank you
Create shortcut for "Copy Shortcut Target Item" command - Is it possible?
-
mu-sick
- Posts: 37
- Joined: 08 Dec 2016 07:31
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Create shortcut for "Copy Shortcut Target Item" command - Is it possible?
As long as that command isn't given a command id (through Don) you could only use a user defined command,
assign a keyboard shortcut to it and use a script (and the whole thing is only valid for the pro version...):
assign a keyboard shortcut to it and use a script (and the whole thing is only valid for the pro version...):
Code: Select all
copy property("#LinkTarget", <curitem>);One of my scripts helped you out? Please donate via Paypal
-
mu-sick
- Posts: 37
- Joined: 08 Dec 2016 07:31
Re: Create shortcut for "Copy Shortcut Target Item" command - Is it possible?
Thank you for the prompt reply! How to change <curitem> to copy linktarget from all selected items? I have tried <allitems> and < selitems> but it doesn't work...highend wrote:As long as that command isn't given a command id (through Don) you could only use a user defined command,
assign a keyboard shortcut to it and use a script (and the whole thing is only valid for the pro version...):Code: Select all
copy property("#LinkTarget", <curitem>);
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Create shortcut for "Copy Shortcut Target Item" command - Is it possible?
property() is a single item operation. So you need to do this in a loop
Code: Select all
$items = "";
foreach($item, <get SelectedItemsPathNames |>) {
if (gpc($item, "ext") != "lnk") { continue; }
$items = $items . property("#LinkTarget", $item) . "|";
}
copy $items;
One of my scripts helped you out? Please donate via Paypal
-
mu-sick
- Posts: 37
- Joined: 08 Dec 2016 07:31
Re: Create shortcut for "Copy Shortcut Target Item" command - Is it possible?
This is great! Thank you very much!highend wrote:property() is a single item operation. So you need to do this in a loopCode: Select all
$items = ""; foreach($item, <get SelectedItemsPathNames |>) { if (gpc($item, "ext") != "lnk") { continue; } $items = $items . property("#LinkTarget", $item) . "|"; } copy $items;
XYplorer Beta Club