Using "Load" to bring up a sub menu
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
Inside the script you'll find proper notes on how to set it up.
Basically, you have to manually set the collection of scripts under the '$a' variable - top of the script.
Then, follow the guidelines on my previous post in this thread so you'll tell the script which scripts will fall into which category.
Basically, you have to manually set the collection of scripts under the '$a' variable - top of the script.
Then, follow the guidelines on my previous post in this thread so you'll tell the script which scripts will fall into which category.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
CookieMonster
Re: Using "Load" to bring up a sub menu
Sorry, I don't understand what you mean ?SkyFrontier wrote:Inside the script you'll find proper notes on how to set it up.
Basically, you have to manually set the collection of scripts under the '$a' variable - top of the script.
Re: Using "Load" to bring up a sub menu
You've supposedly bought SublimeText to work with scripts. So you already know scripts are just text files.
Then what do you think "Inside the script" means?
Then what do you think "Inside the script" means?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
CookieMonster
Re: Using "Load" to bring up a sub menu
Obviously, I know what what Inside the script means, I don't know what is the written text inside the script !SammaySarkar wrote:You've supposedly bought SublimeText to work with scripts. So you already know scripts are just text files.
Then what do you think "Inside the script" means?
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
// *** How to Attribute Groups *** \\
//-set a simple caption, no script attached to it, immediately _below_ the group of scripts
// it will hold. This caption will name the respective group on the main menu.
//-logically, the last group will need a caption - it'll be the last entry at the "$a" variable.
//--if the last caption missing, the last entry on the main menu will still work, ie: will have
//--an accelerator, have an empty name field plus respective items count.
Unless you're not understanding what's written... in this case, my apologies. Let me know. Tried to make it the more straightforward I could, in ways newcomers could benefit out of it.
//-set a simple caption, no script attached to it, immediately _below_ the group of scripts
// it will hold. This caption will name the respective group on the main menu.
//-logically, the last group will need a caption - it'll be the last entry at the "$a" variable.
//--if the last caption missing, the last entry on the main menu will still work, ie: will have
//--an accelerator, have an empty name field plus respective items count.
Unless you're not understanding what's written... in this case, my apologies. Let me know. Tried to make it the more straightforward I could, in ways newcomers could benefit out of it.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
Well.
Consider this:
Open my script with a text editor (or rename its extension from .xys to .txt and open it using your default text editor) and paste the above set as a value for "$a". As you can see when you run the script, you'll have 5 categories:
holding a number of scripts.
Each category is set by putting all desired scripts immediately above it. Like this:
"scr 1"
commands
"scr 2"
commands
"group 1"
Group 1 will have "scr 1" and "scr 2" in a submenu. Continuing,
"scr 1"
commands
"scr 2"
commands
"group 1"
"scr 3"
commands
"scr 4"
commands
"group 2"
Now you told my script to group "scr 3 & 4" in a "group 2", so the final menu will appear like
"1 - group 1 - 1 item(s)"
"2 - group 2 - 2 item(s)"
-standard: "accelerator - user input group name - item count".
The "$a" variable can be found near the top of the script (see reference below*) and looks like
Your only work is to replace the default set of scripts with your own one.
First, remove everything inside of it, leaving it like
-observe that the "#;" characters MUST stay, otherwise everything will be flushed!
Then, position your caret in front of the '#;' and paste your set of scripts. Make sure that '#;' remain immediately below the pasted content, set the captions as described and execute the script.
_________
*Reference: this is a discussion on Method - XYscriptsGrouping, especially XYscriptGroups_v2_uSERsETgROUPS_by_SF.xys.
Consider this:
Code: Select all
"exitnosave|:exitnosave"
copytext ":exitnosave"
"rfo|:rfo"
copytext ":rfo"
echo hi;
"mru|:mru"
copytext ":mru"
"myco|:myco"
copytext ":myco"
"***group 1***"
"flatview|:flatview"
copytext ":flatview"
"views|:views"
copytext ":views"
"minitree|:minitree"
copytext ":minitree"
"dp12|:dp12"
copytext ":dp12"
"_____most used______"
"newtab|:newtab"
copytext ":newtab"
"closetab|:closetab"
copytext ":closetab"
"locktab|:locktab"
copytext ":locktab"
"((( MIGHT HAVE USE )))"
"{drives_avl}|:{drives_avl}"
copytext ":{drives_avl}"
"{drives_fix}|:{drives_fix}"
copytext ":{drives_fix}"
"@@@ excluded @@@"
"ctb64|:ctb64"
copytext ":ctb64"
echo hi;
"%%% LAST SET %%%"
Code: Select all
"***group 1***"
"_____most used______"
"((( MIGHT HAVE USE )))"
"@@@ excluded @@@"
"%%% LAST SET %%%"
Each category is set by putting all desired scripts immediately above it. Like this:
"scr 1"
commands
"scr 2"
commands
"group 1"
Group 1 will have "scr 1" and "scr 2" in a submenu. Continuing,
"scr 1"
commands
"scr 2"
commands
"group 1"
"scr 3"
commands
"scr 4"
commands
"group 2"
Now you told my script to group "scr 3 & 4" in a "group 2", so the final menu will appear like
"1 - group 1 - 1 item(s)"
"2 - group 2 - 2 item(s)"
-standard: "accelerator - user input group name - item count".
The "$a" variable can be found near the top of the script (see reference below*) and looks like
Code: Select all
$a = <<<#
"exitnosave|:exitnosave"
copytext ":exitnosave"
...
"ctb64|:ctb64"
copytext ":ctb64"
echo hi;
"%%% LAST SET %%%"
#;First, remove everything inside of it, leaving it like
Code: Select all
$a = <<<#
#;Then, position your caret in front of the '#;' and paste your set of scripts. Make sure that '#;' remain immediately below the pasted content, set the captions as described and execute the script.
_________
*Reference: this is a discussion on Method - XYscriptsGrouping, especially XYscriptGroups_v2_uSERsETgROUPS_by_SF.xys.
Last edited by SkyFrontier on 23 Jul 2015 03:42, edited 1 time in total.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
CookieMonster
Re: Using "Load" to bring up a sub menu
This is where I may be hung up ?and paste the above set as a value for "$a"
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
Check out my previous post in a few minutes - I'll update it focusing your point.
Chocolate time, sorry!
Chocolate time, sorry!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
Chocolated. 
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
-did it worked?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
CookieMonster
Re: Using "Load" to bring up a sub menu
I never did anything; you said you were going to update focusing on my point after chocolate time ? 
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
= done.SkyFrontier wrote:Chocolated.
(ie, explanation post above was updated!)
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
CookieMonster
Re: Using "Load" to bring up a sub menu
How do I paste something with a value for "$a" ?... and paste the above set as a value for "$a"
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Using "Load" to bring up a sub menu
Something: your collection of scripts.
Paste: from a copy (ctrl+c) of something.
Paste: from a copy (ctrl+c) of something.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
XYplorer Beta Club