TeraCopy Integration

Discuss and share scripts and script files...

Postby admin » 30 Jun 2008 18:54

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:
Code: Select all
  getitems $items;
admin
Site Admin
 
Posts: 32843
Joined: 22 May 2004 15:48
Location: Cologne

Postby Muroph » 01 Jul 2008 00:57

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:
Code: Select all
  getitems $items;

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.
Code: Select all
setkey <selitems>, sec, asd.ini;

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;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Postby admin » 01 Jul 2008 06:49

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:
Code: Select all
  getitems $items;

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.
Code: Select all
setkey <selitems>, sec, asd.ini;

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...
admin
Site Admin
 
Posts: 32843
Joined: 22 May 2004 15:48
Location: Cologne

Postby Muroph » 03 Jul 2008 21:27

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;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Postby Muroph » 05 Jul 2008 06:52

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.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Postby admin » 05 Jul 2008 07:09

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... :)
admin
Site Admin
 
Posts: 32843
Joined: 22 May 2004 15:48
Location: Cologne

Postby jgpaiva » 12 Jul 2008 23:26

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 :)
jgpaiva
 
Posts: 43
Joined: 02 Oct 2006 11:38

Postby Muroph » 14 Jul 2008 20:35

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.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Postby jgpaiva » 14 Jul 2008 22:05

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! :D
jgpaiva
 
Posts: 43
Joined: 02 Oct 2006 11:38

Re: TeraCopy Integration

Postby Muroph » 28 Aug 2008 15:59

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
Last edited by Muroph on 12 Sep 2008 18:52, edited 3 times in total.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Re: TeraCopy Integration

Postby lukescammell » 03 Sep 2008 02:04

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?
Used to update to the latest beta every day. Now I have children instead…
Windows 7 x64 Home Premium (at home) | Windows 7 x64 Pro (on laptop) | Windows 7 x64 Ultimate (at work)
lukescammell
 
Posts: 725
Joined: 28 Jul 2006 12:15
Location: Kent, UK

Re: TeraCopy Integration

Postby Muroph » 03 Sep 2008 04:58

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.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Re: TeraCopy Integration

Postby lukescammell » 03 Sep 2008 23:30

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...;)
Used to update to the latest beta every day. Now I have children instead…
Windows 7 x64 Home Premium (at home) | Windows 7 x64 Pro (on laptop) | Windows 7 x64 Ultimate (at work)
lukescammell
 
Posts: 725
Joined: 28 Jul 2006 12:15
Location: Kent, UK

Re: TeraCopy Integration

Postby Muroph » 12 Sep 2008 18:46

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;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

Re: TeraCopy Integration

Postby Muroph » 15 Sep 2008 06:59

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;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Muroph
 
Posts: 561
Joined: 21 Aug 2007 15:13

PreviousNext

Return to Script Exchange



Who is online

Users browsing this forum: No registered users and 4 guests