Just tested it, and realized what the problem was, it would only work when combined with the /new switch too, ie. /user is only resolved once on loading XY, or it could be parsed from <get copieddata 3> subsequently.
edit: A theoretically working, but messy solution:
Code: Select all
XYplorer.exe /user=%external_path% /feed="::if $P_hwnd == <hwnd> { $result = replace(substr(trim(gettoken(<get copieddata 3>, 2, '/')),5), chr(34));} else {perm $P_hwnd = <hwnd>; $result = <get cmdlineuser>;} text $result;"
edit2: actually, this is maybe a slightly cleaner way, but still not great:
Code: Select all
XYplorer.exe /feed="::if $P_hwnd == <hwnd> { $result = replace(gettoken(<get copieddata 3>, -1, '='), chr(34));} else {perm $P_hwnd = <hwnd>; $result = <get cmdlineuser>;} text $result;" /user=%external_path%