Scripts template

Discuss and share scripts and script files...
Post Reply
Linkaday
Posts: 366
Joined: 06 Aug 2007 14:40
Location: Hamburg, Germany - Win 10 Home v22H2 x64 1920x1080 (100%)

Scripts template

Post by Linkaday »

Nothing special. I'm quite sure everyone here on the forum has his own already.
I like the template's footer on all of my scripts. So i was simply tired of copy n paste.
Maybe it's of use or at least an appetizer for all those XY users to come in cohorts.

For a more refined way to do footer needs - compare http://www.xyplorer.com/xyfc/viewtopic.php?t=2311

Code: Select all

// \Scripts\[XYscipts].xys

// Scripts file to work with world-famous XYplorer since v7 © 2000 (ongoing) Donald Lessau
// XYplorer 7.00, the "Scripting Edition", has been released on 31-Mar-2008

// General syntax: "Caption[ : Label]"[ ][::]command param, arg1, arg2, ..., switch[ ];[ ][::]command...
// These double slashes make up comment lines
// - sets a divider to the pop-up menu this scripts file will show on execution 

// For detailed syntax go to Help menu > Scripting commands (Reference)
// and jacky's overwhelming base of knowledge, the XYWiki at
// http://88.191.26.34/XYwiki/index.php/Scripting
// http://88.191.26.34/XYwiki/index.php/Script_file

// Copy this code to a blank text file and call it xyscripts.xys 
// or whatever you like and put it into your XYplorer NewItems folder 
// as well as [template] folder of your favorite editor(s)
// Best with jacky's easing Syntax Coloring Scheme in EditPadPro
// Note: some advanced editors use special headers 
// (and/or special file types [extensions] for their template files (e.g. NoteTab)!
// Edit this to your needs and liking




-
"Edit this scripts file" open <xypath>\Scripts\[XYscipts].xys 
// Replace [XYscipts] with name of the scripts file you created from this template
// If you got a scriptable editor like NoteTab you may set a variable to do that for you

"Choose scripts file to edit" inputfile $file, <xypath>\Scripts\, xys, Select Scripts File; open $file

"Edit all scripts in Scripts folder" open "editpadpro" <xypath>\Scripts\*.xys
// Replace "editpadpro" with basename of your registered tabbed editor 
// or define a PFA xys (active and top) for your favorite tabbed editor 
// Note: the wildcard (*.xys) syntax will not work with non-tabbed editors like notepad 
// Refer to Help menu > Scripting commands for alternative solutions 
-
"CANCEL" 

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Post by RalphM »

Was tired of copy & paste as well, so I created a template for a structured script collection, based on some collections that were shared here in the forum. (I don't remember who the autor was, either Jacky or Linkaday maybe?)
Should be self-explaining...and if loaded as is, shows just a menu with the subfunctions 1 to 9.
Place it in NewItems for easy usage.

Code: Select all

//	.\Scripts\NewScriptName.xys
//	Description
//	Description


"MenuTitle (shaded)"

// Main Functions-------------------------------------------
"-"

// GroupTitle_1

"&1. SubFunction_1 : Lbl_1"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

"&2. SubFunction_2 : Lbl_2"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

"&3. SubFunction_3 : Lbl_3"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

//------------------------------------------------------------------
"-"

// GroupTitle_2

"&4. SubFunction_4 : Lbl_4"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

"&5. SubFunction_5 : Lbl_5"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

"&6. SubFunction_6 : Lbl_6"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

//------------------------------------------------------------------
"-"

// GroupTitle_3

"&7. SubFunction_7 : Lbl_7"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

"&8. SubFunction_8 : Lbl_8"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

"&9. SubFunction_9 : Lbl_9"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_1;

// Back & Cancel -------------------------------------------
"-"

"&Back..." 
   load "Calling_Scriptfile";

"Cancel"

// Subroutines -----------------------------------------------

"_Lbl_Sub_1"
	//Commands...;
	//Commands...;
	//Commands...;
	//sub _Lbl_Sub_2;

"_Lbl_Sub_2"
	//Commands...;
	//Commands...;
	//Commands...;
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

p•rascal
Posts: 12
Joined: 30 Apr 2020 17:23
Location: In the Heart of Europe (

Re: Scripts template

Post by p•rascal »

Hi everyone
Is jacky's overwhelming base of knowledge, the XYWiki at
http://88.191.26.34/XYwiki/index.php/Scripting still somewhere available? Can't reach it where it should be ... Moved to another address? :ninja:
Using XY since almost three years. :warnred20: Its quite an obsessive and addictive application. Three years but still discovering from time to time handy features which I've never ever seen before... :lol:

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Scripts template

Post by admin »

I'm not aware of any location. But the knowledge is pretty outdated now anyway I'm afraid...

p•rascal
Posts: 12
Joined: 30 Apr 2020 17:23
Location: In the Heart of Europe (

Re: Scripts template

Post by p•rascal »

oki doki ....
I will find some stuff.. lots of resources here.. sometimes I am just a bit confused until i get a script together ... afterwards it always looks quite logic to me... :ninja:
Using XY since almost three years. :warnred20: Its quite an obsessive and addictive application. Three years but still discovering from time to time handy features which I've never ever seen before... :lol:

Post Reply