Page 2 of 16
Posted: 30 Jun 2008 19:54
by admin
Muroph wrote:Updated to v3.2 after the %temp% bug fix.
I see it's getting smaller...
when I'm back from the beach I will add a scripting command that will copy items directly into a variable, so you do not have to go the clipboard way:
Now:
Code: Select all
//copy items to clipboard and save in a variable
#101;
set $items, <clipboard>;
Then:
Posted: 01 Jul 2008 01:57
by Muroph
admin wrote:when I'm back from the beach I will add a scripting command that will copy items directly into a variable, so you do not have to go the clipboard way:
Now:
Code: Select all
//copy items to clipboard and save in a variable
#101;
set $items, <clipboard>;
Then:
if it's meant only to assign a variable value, i think it'd be better if it was actually a new variable (like the <curitem> var.) instead of a command.
this way you could use it directly.
if it were a command you'd have to create a variable in order to use it.
Code: Select all
getitems $items;
setkey $items, sec, asd.ini;
Posted: 01 Jul 2008 07:49
by admin
Muroph wrote:admin wrote:when I'm back from the beach I will add a scripting command that will copy items directly into a variable, so you do not have to go the clipboard way:
Now:
Code: Select all
//copy items to clipboard and save in a variable
#101;
set $items, <clipboard>;
Then:
if it's meant only to assign a variable value, i think it'd be better if it was actually a new variable (like the <curitem> var.) instead of a command.
this way you could use it directly.
if it were a command you'd have to create a variable in order to use it.
Code: Select all
getitems $items;
setkey $items, sec, asd.ini;
A command would allow for specifying a separator in an argument:
getitems output, [separator=CRLF]
Okay, one could also think about something like this:
<selitems [separator=CRLF]>
which would effectively be a function like:
result=selitems([separator=CRLF])
I've been thinking about functions anyway...
Posted: 03 Jul 2008 22:27
by Muroph
Updated to v4.1
TeraCopy Integration v4.1
You need XYplorer 7.30.0008 and Teracopy v2.0 beta3.
Now the script uses only one file.
Cut
Code: Select all
//copy list of items to a variable
#101;
set $items, <clipboard>;
//save list path
set $list, <xypath>\teracopylist.tmp;
//delete old list
setkey avoid possible, error, message, $list;
delete 0,0, $list;
//save operation and list of items
setkey move, teracopyop, tc, $list;
setkey <crlf>$items, teracopylist, tc, $list;
status TeraCopy: Cut, , ready;
Copy
Code: Select all
//copy list of items to a variable
#101;
set $items, <clipboard>;
//save list path
set $list, <xypath>\teracopylist.tmp;
//delete old list
setkey avoid possible, error, message, $list;
delete 0,0, $list;
//save operation and list of items
setkey copy, teracopyop, tc, $list;
setkey <crlf>$items, teracopylist, tc, $list;
status TeraCopy: Copy, , ready;
Paste
Change teracopy.exe path if necessary.
Code: Select all
//save current path. this will be the target folder
set $path, <curpath>;
//restore operation type
getkey $op, teracopyop, tc, <xypath>\teracopylist.tmp;
//run teracopy.exe using command line parameters
//teracopy.exe [operation] *[list of source files] [target]
run ""%programfiles%\TeraCopy\teracopy.exe" $op *"<xypath>\teracopylist.tmp" "$path\"";
status TeraCopy: Paste, , ready;
Posted: 05 Jul 2008 07:52
by Muroph
v4.1 is out!
in v4.0 i tried to get rid of the temp files by deleting them.
after running into a bunch of problems using the delete command (especially because of the time-based names of the temp files), the resulting scripts were awful, so i just had to rewrite them.
this time i tried a new approach.
just one file (with a constant name) to store both the operation and the list of items (they were in different files before).
the new scripts are MUCH better than the old ones.
Posted: 05 Jul 2008 08:09
by admin
Muroph wrote:v4.1 is out!
in v4.0 i tried to get rid of the temp files by deleting them.
after running into a bunch of problems using the delete command (especially because of the time-based names of the temp files), the resulting scripts were awful, so i just had to rewrite them.
this time i tried a new approach.
just one file (with a constant name) to store both the operation and the list of items (they were in different files before).
the new scripts are MUCH better than the old ones.
Looks great. I guess it's time to install TeraCopy now...
Posted: 13 Jul 2008 00:26
by jgpaiva
Hello!
Thanks for the script, it looks like it's great!
I think there's some strange problem in xy v7.30.0006 with the most recent version of the script: The selected file always gets deleted.
From what I understand, that happens when the script tries to delete the temporary file, and even though the variable isn't null, the selected file gets deleted instead.
It wouldn't be the first time it was just me doing something wrong, though
Posted: 14 Jul 2008 21:35
by Muroph
if you're using v4.1 you need xy v 7.30.0008 or later.
v4.0 had some bugs (including the one you mentioned), so use v4.1 instead.
Posted: 14 Jul 2008 23:05
by jgpaiva
Muroph wrote:if you're using v4.1 you need xy v 7.30.0008 or later.
v4.0 had some bugs (including the one you mentioned), so use v4.1 instead.
You are absolutelly right, I didn't notice I didn't have the latest version of XY. With v7.30.0012, it works perfectly. Thanks!
Re: TeraCopy Integration
Posted: 28 Aug 2008 16:59
by Muroph
Updated to v4.2
Fixed to work with the new script syntax in XYplorer v7.50.0001.
Cut
Code: Select all
//copy list of items to a variable
#101;
set $items, <clipboard>;
//save list path
set $list, "<xypath>\teracopylist.tmp";
//delete old list
setkey avoid possible, error, message, $list;
delete 0,0, $list;
//save operation and list of items
setkey move, teracopyop, tc, $list;
setkey <crlf>$items, teracopylist, tc, $list;
status TeraCopy: Cut, 84C400, ready;
Copy
Code: Select all
//copy list of items to a variable
#101;
set $items, <clipboard>;
//save list path
set $list, "<xypath>\teracopylist.tmp";
//delete old list
setkey avoid possible, error, message, $list;
delete 0,0, $list;
//save operation and list of items
setkey copy, teracopyop, tc, $list;
setkey <crlf>$items, teracopylist, tc, $list;
status TeraCopy: Copy, 84C400, ready;
Paste
Code: Select all
//save current path. this will be the target folder
set $path, <curpath>;
//restore operation type
getkey $op, teracopyop, tc, "<xypath>\teracopylist.tmp";
//run teracopy.exe using command line parameters
//teracopy.exe [operation] *[list of source files] [target]
run """%programfiles%\TeraCopy\teracopy.exe" $op *"<xypath>\teracopylist.tmp" "$path\""";
status TeraCopy: Paste, 84C400, ready;
EDITED: fixed the damn spaces that were mercilessly killed by the forum sotfware
Re: TeraCopy Integration
Posted: 03 Sep 2008 03:04
by lukescammell
Muroph wrote:Use them like the normal ctrl+x/ctrl+c/ctrl+v.
Before using them you'll have to create a folder to save a list of the items you want to copy.
I used 'scripts\teracopy' in xy folder.
How do you achieve this first part (the XCV key shortcuts).
And is this second part still needed with 4.1?
Re: TeraCopy Integration
Posted: 03 Sep 2008 05:58
by Muroph
1. you can create a "run script" udc and paste the script in the edit box, then assing a ks for it.
do this for separatly for each one of the 3 scripts.
there's a step-by-step guide
here.
or you can save each one in a .xys file and create 3 "load script file" udc's.
i use .xys files and alt+x/c/z (alt+v pops up the view menu).
2. nope. that was only for the first version.
Re: TeraCopy Integration
Posted: 04 Sep 2008 00:30
by lukescammell
Thanks for that
I've found that there's some strange results coming up with TeraCopy beta4 x64, but I'll try and figure it out myself first before throwing myself upon your mercy again...
Re: TeraCopy Integration
Posted: 12 Sep 2008 19:46
by Muroph
Updated to v4.3
No more need for the clipboard.
Can be used with XYplorer v7.60.0005.
Cut
Code: Select all
//copy list of items to a variable
getinfo $items, "SelectedItemsPathNames";
//save list path
set $list, "<xypath>\teracopylist.tmp";
//delete old list
setkey avoid possible, error, message, $list;
delete 0,0, $list;
//save operation and list of items
setkey move, teracopyop, tc, $list;
setkey <crlf>$items, teracopylist, tc, $list;
status TeraCopy: Cut, 84C400, ready;
Copy
Code: Select all
//copy list of items to a variable
getinfo $items, "SelectedItemsPathNames";
//save list path
set $list, "<xypath>\teracopylist.tmp";
//delete old list
setkey avoid possible, error, message, $list;
delete 0,0, $list;
//save operation and list of items
setkey copy, teracopyop, tc, $list;
setkey <crlf>$items, teracopylist, tc, $list;
status TeraCopy: Copy, 84C400, ready;
Paste (no changes here)
Code: Select all
//save current path. this will be the target folder
set $path, <curpath>;
//restore operation type
getkey $op, teracopyop, tc, "<xypath>\teracopylist.tmp";
//run teracopy.exe using command line parameters
//teracopy.exe [operation] *[list of source files] [target]
run """%programfiles%\TeraCopy\teracopy.exe" $op *"<xypath>\teracopylist.tmp" "$path\""";
status TeraCopy: Paste, 84C400, ready;
Re: TeraCopy Integration
Posted: 15 Sep 2008 07:59
by Muroph
fixed again for xyplorer 7.60.0010.
Cut
Code: Select all
//copy list of items to a variable
getinfo $items, "SelectedItemsPathNames";
//save list path
set $list, "<xypath>\teracopylist.tmp";
//delete old list
setkey avoid possible, error, message, "$list";
delete 0,0, "$list";
//save operation and list of items
setkey move, teracopyop, tc, "$list";
setkey "<crlf>$items", teracopylist, tc, "$list";
status TeraCopy: Cut, 84C400, ready;
Copy
Code: Select all
//copy list of items to a variable
getinfo $items, "SelectedItemsPathNames";
//save list path
set $list, "<xypath>\teracopylist.tmp";
//delete old list
setkey avoid possible, error, message, "$list";
delete 0,0, "$list";
//save operation and list of items
setkey copy, teracopyop, tc, "$list";
setkey "<crlf>$items", teracopylist, tc, "$list";
status TeraCopy: Copy, 84C400, ready;
Paste
Code: Select all
//save current path. this will be the target folder
set $path, "<curpath>";
//restore operation type
getkey $op, teracopyop, tc, "<xypath>\teracopylist.tmp";
//run teracopy.exe using command line parameters
//teracopy.exe [operation] *[list of source files] [target]
run """%programfiles%\TeraCopy\teracopy.exe"" $op *""<xypath>\teracopylist.tmp"" ""$path\""";
status TeraCopy: Paste, 84C400, ready;