Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Example for TCScript Editor
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) Printable version
View previous topic :: View next topic  
Author Message
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Mon Dec 06, 2004 10:29 am    Post subject: Example for TCScript Editor Reply with quote

Some times ago, I started a topic about TCSript Editor...

This time I give link to my script for this tool

1- (*) Increase TC width to max and restore it:
Increase & Restore

2- In both panel, go in previous dir or go in next dir: Previous & Next

3- Empty Recyle Bin: Bin

4- Create Playlist with Directory's name as name: Playlist
(Exclamation the inplace rename command has to be set to F2 or you'll have to change the code)

5- Change Button bar: Bar

6- Change the display of TC:Display

7- Open the synchronise folder with desire folder, method 1 (see French Post): Synchronise Usb

8- Open a specific folder in a new tab: NewTab

9- Open the Multi renamne tool with the default parameter: Default Multi Rename

10- Change view: only one shorcut to change the view in the current panel (or cycle all) Wink Change View

11- Explorer like display (tree view on the left- thumbnail on the right) Activate & Back to normal
Note: I'm using 2 database placed in %commander_path%, cache96 & cache200

12- Open the search box with All drive by default:Search All Drive

13- Open Internet Explorer with the address in the clipboardIE Clipboard

14- Open a FTP seesion with the address in the clipboard (ctrl+N) ^N FTP

Script with (*) restart automatically TC, it can be done manually but the changes made require a restart !

I use the latest version of the library and the beta version of the exe
_________________
TC#88260 -


Last edited by franck8244 on Sun Jan 16, 2005 5:30 am; edited 11 times in total
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Sheepdog
Power Member
Power Member


Joined: 18 Dec 2003
Posts: 5146
Location: Berlin, Germany

PostPosted: Mon Dec 06, 2004 11:19 am    Post subject: Reply with quote

2franck8244 A very good idea, thanks.
But unfortunately I am asked for a password to access your files.
So I cannot access them.

I have made a Script for changing the TC language:
English and German

Maybe it's useful for someone

sheepdog
_________________
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Back to top
View user's profile Send private message Send e-mail Visit poster's website
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Mon Dec 06, 2004 11:41 am    Post subject: Reply with quote

2Sheepdog

1- Embarassed My fault, I forgot to change all the adress in links (copy/paste from my ftp server...)
Now it works fine Exclamation

2- I read your tcs files. It seems you are using an old version of TCSript Editor: SendVKey changed, for the 2nd parameter value :2 key is pressed & released, 1 key is pressed, 0 key is released... Wink
_________________
TC#88260 -
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Sheepdog
Power Member
Power Member


Joined: 18 Dec 2003
Posts: 5146
Location: Berlin, Germany

PostPosted: Mon Dec 06, 2004 12:33 pm    Post subject: Reply with quote

Quote:
2- I read your tcs files. It seems you are using an old version of TCSript Editor: SendVKey changed, for the 2nd parameter value :2 key is pressed & released, 1 key is pressed, 0 key is released... Wink


I fear it's not that I use an old version but I haven't really understood how to use these commands Embarassed . Thanks for advice, I have changed my scripts.

sheepdog
_________________
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Back to top
View user's profile Send private message Send e-mail Visit poster's website
robinsiebler
Senior Member
Senior Member


Joined: 05 Mar 2003
Posts: 421

PostPosted: Mon Dec 06, 2004 2:31 pm    Post subject: Reply with quote

The file for #8 does something other than open a folder in a new tab. I don't know what it does, but it mentions a playlist...
_________________
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
Back to top
View user's profile Send private message
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Mon Dec 06, 2004 3:36 pm    Post subject: Reply with quote

2robinsiebler

Embarassed I used the multi rename tool too fast... Now it's corrected !
_________________
TC#88260 -
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Sun Jan 16, 2005 2:16 pm    Post subject: Reply with quote

I finally found a way to change the width of the panel (with predefine width), there is just a small thing : the cursor will be screen centered after the script execution...
Code:
#include VKeys.h
PostCmd(cm_Maximize);
SetCursorPos(640,512); //Put here half of your display resolution !
MouseClick(1);
SendVKey(VK_NUMPAD3,2); // 2 stands for 20/80 ; 3 for 30/70 ....
PostCmd(cm_Restore);

_________________
TC#88260 -
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Raymond
Senior Member
Senior Member


Joined: 08 Feb 2003
Posts: 444

PostPosted: Sun Jan 16, 2005 10:20 pm    Post subject: Reply with quote

franck8244 wrote:
I finally found a way to change the width of the panel

Thanks man! it works like a charm.
I've been trying to find a way to do this for a long time.
Great tip! Laughing

One question:
Is there a way to know if focus on left or right panel now, so 80/20 or 20/80 is selected?
Back to top
View user's profile Send private message Send e-mail
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Mon Jan 17, 2005 4:48 am    Post subject: Reply with quote

2Raymond
All depend on this line :
Code:
SendVKey(VK_NUMPAD3,2); // 2 stands for 20/80 ; 3 for 30/70 ....


If you send a number < 5, you will have the big panel on the right.

If you send 7 for example, you will ask for the 70/30 division->the left panel will be the bigest
_________________
TC#88260 -
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Raymond
Senior Member
Senior Member


Joined: 08 Feb 2003
Posts: 444

PostPosted: Mon Jan 17, 2005 5:02 am    Post subject: Reply with quote

To franck8244
I know that.
Actually I mean if there's a way to do this: select 80/20 or 20/80 DEPEND ON where i'm in now, left panel or right panel.
I want to enlarge my CURRENT panel with one script.
Back to top
View user's profile Send private message Send e-mail
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Mon Jan 17, 2005 5:33 am    Post subject: Reply with quote

2Raymond
The only solution I have found is below, you'll have to choose which panel to increase (when the script is launch & with the keyboard ! or modify the script) Sad
Code:
#include VKeys.h
#define InputCaption "Choose the panel to increase"
PostCmd(cm_Maximize);
SetCursorPos(640,512);
QueryItem("","Left\0Right");
IfInt(Result,0);
{
 MouseClick(1);
 SendVKey(VK_NUMPAD8,2);
}
IfInt(Result,1);
{
 MouseClick(1);
 SendVKey(VK_NUMPAD2,2);
}
PostCmd(cm_Restore);

_________________
TC#88260 -
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Raymond
Senior Member
Senior Member


Joined: 08 Feb 2003
Posts: 444

PostPosted: Mon Jan 17, 2005 5:56 am    Post subject: Reply with quote

To franck8244
Thanks for your effort. Smile
Looks like there's no simpler way to do it.
I make two script files according to your sample, one for 80/20 and another for 20/80. Then define two shortcuts for them.

Still hope there will come new command like cm_20percent, cm_30percent....some day.
Back to top
View user's profile Send private message Send e-mail
franck8244
Power Member
Power Member


Joined: 06 Mar 2003
Posts: 685
Location: Geneva...

PostPosted: Mon Jan 17, 2005 6:06 am    Post subject: Reply with quote

Raymond wrote:
Still hope there will come new command like cm_20percent, cm_30percent....some day.

With those, you will still need 2 scripts Wink

As long as TCScript Editor can't know wich panel is the active one, there is no easy solution Sad
_________________
TC#88260 -
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Raymond
Senior Member
Senior Member


Joined: 08 Feb 2003
Posts: 444

PostPosted: Mon Jan 17, 2005 6:15 am    Post subject: Reply with quote

franck8244 wrote:
Raymond wrote:
Still hope there will come new command like cm_20percent, cm_30percent....some day.

With those, you will still need 2 scripts Wink

If Christian decide to add these kind commands, they will come like cm_20srcpercent, cm20trgpercent...
I believe it. Razz Very Happy
Back to top
View user's profile Send private message Send e-mail
heron
Junior Member
Junior Member


Joined: 24 Jan 2004
Posts: 8

PostPosted: Mon Jan 17, 2005 1:03 pm    Post subject: Reply with quote

I did some media sorting skript:
*ot opens whatever you got in your tc just now
*you can chose which category it belongs to
*it moves it there

I _definetly_ needed something like that to sort trough some stuff on my machine...
its my first tc-skript so don't wait for something great Razz

some questions remain:
-->i need to focus onto tc or some cases the last opend lister...
-->i would like to define some hotkeys in the querry...

any coments?

Quote:

/start test.tcs
#include "Scripts\VKeys.h"
#define DestDir "f:\mp3\einzeln\sorted"
PostCmd(cm_List);
QueryItem("Select Group","Muell\0GoGoGo \0Hintergrund
\0Manchmal kommt die Zeit\0Down\0<weiter>");
IfInt(Result,0);
{
SendVKey(VK_ESCAPE,2);
PostCmd(cm_ClearCmdLine);
SendVKey(VK_TAB,2);
SendVKey(67,2); //'c'
StrCopy(str,"d ");
StrCat(str,DestDir);
StrCat(str, "\muell");
SetClipbrd(str);
SendVKey(VK_LCONTROL,1);
SendVKey(86,2);
SendVKey(VK_LCONTROL,2);
SendVKey(VK_RETURN,2);
SendVKey(VK_TAB,2);
PostCmd(cm_RenMov);
SendVKey(VK_RETURN,2);
}
IfInt(Result,1);
{
(...)
}
IfInt(Result,2);
{
(...)
}
IfInt(Result,3);
{
(...)
}
IfInt(Result,4);
{
(...)
}
IfInt(Result,5);
{
SendVKey(VK_ESCAPE,2);
SendVKey(VK_DOWN,2);
}
IfNotInt(Result,-1);
{
Exec("C:\data\system\tcmd\3rd\az_skript\TCScript.exe",
"/run test.tcs","C:\data\system\tcmd\3rd\az_skript\Scripts\own");
}

/end test.tcs
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group