Page 1 of 1

Rename mode not invoked !?

Posted: 29 Oct 2011 10:57
by genieautravail
Hello everybody,

It's my first post on this forum and I have a question about scripting. :P
I use XYExplorer 10.40 and I have added two buttons in the toolbar for created a new text file and a new folder with scripts.
Here the very simple scripts :

1st button :
new("Nouveau Fichier Texte.txt", "r");

2nd button :
new("Nouveau Dossier", "dir", "r");

With these scripts the text file or the folder are created but the rename mode is not invoked dispite the parameter "r" (I'm working in the current path only).

Why ? :roll:

Re: Rename mode not invoked !?

Posted: 29 Oct 2011 11:57
by Stefan
Hi and welcome.

genieautravail wrote:Hello everybody,

It's my first post on this forum and I have a question about scripting. :P
I use XYExplorer 10.40 and I have added two buttons in the toolbar for created a new text file and a new folder with scripts.
Here the very simple scripts :

1st button :
new("Nouveau Fichier Texte.txt", "r");

2nd button :
new("Nouveau Dossier", "dir", "r");

With these scripts the text file or the folder are created but the rename mode is not invoked dispite the parameter "r" (I'm working in the current path only).

Why ? :roll:

The syntax for new() is

new(name, [type=file|dir], [source], [rename=|r])

Re: Rename mode not invoked !?

Posted: 29 Oct 2011 12:44
by highend
new(name, [type=file|dir], [source], [rename=|r])
In other words:

new("Nouveau Fichier Texte.txt", , ,"r");

new("Nouveau Dossier", "dir", ,"r");

Re: Rename mode not invoked !?

Posted: 29 Oct 2011 17:07
by genieautravail
I understand now...

Thank you very much Stefan and Highend ! :mrgreen: