Page 3 of 6
Re: Using "Load" to bring up a sub menu
Posted: 22 Jul 2015 07:54
by SkyFrontier
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.
Re: Using "Load" to bring up a sub menu
Posted: 22 Jul 2015 16:38
by CookieMonster
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.
Sorry, I don't understand what you mean ?
Re: Using "Load" to bring up a sub menu
Posted: 22 Jul 2015 19:19
by bdeshi
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?
Re: Using "Load" to bring up a sub menu
Posted: 22 Jul 2015 20:35
by CookieMonster
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?
Obviously, I know what what
Inside the script means, I don't know what is the written text inside the script !
Re: Using "Load" to bring up a sub menu
Posted: 23 Jul 2015 01:44
by SkyFrontier
// *** 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.
Re: Using "Load" to bring up a sub menu
Posted: 23 Jul 2015 02:14
by CookieMonster
No, Sorry, I'm not understanding ?

Re: Using "Load" to bring up a sub menu
Posted: 23 Jul 2015 02:36
by SkyFrontier
Well.
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 %%%"
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:
Code: Select all
"***group 1***"
"_____most used______"
"((( MIGHT HAVE USE )))"
"@@@ excluded @@@"
"%%% LAST SET %%%"
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
Code: Select all
$a = <<<#
"exitnosave|:exitnosave"
copytext ":exitnosave"
...
"ctb64|:ctb64"
copytext ":ctb64"
echo hi;
"%%% LAST SET %%%"
#;
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.
Re: Using "Load" to bring up a sub menu
Posted: 23 Jul 2015 02:49
by CookieMonster
and paste the above set as a value for "$a"
This is where I may be hung up ?
Re: Using "Load" to bring up a sub menu
Posted: 23 Jul 2015 03:20
by SkyFrontier
Check out my previous post in a few minutes - I'll update it focusing your point.
Chocolate time, sorry!

Re: Using "Load" to bring up a sub menu
Posted: 23 Jul 2015 03:43
by SkyFrontier
Chocolated.

Re: Using "Load" to bring up a sub menu
Posted: 24 Jul 2015 03:00
by SkyFrontier
-did it worked?
Re: Using "Load" to bring up a sub menu
Posted: 24 Jul 2015 03:53
by CookieMonster
I never did anything; you said you were going to update focusing on my point after chocolate time ?

Re: Using "Load" to bring up a sub menu
Posted: 24 Jul 2015 03:58
by SkyFrontier
SkyFrontier wrote:Chocolated.

= done.

(ie, explanation post above was updated!)
Re: Using "Load" to bring up a sub menu
Posted: 24 Jul 2015 05:40
by CookieMonster
... and paste the above set as a value for "$a"
How do I paste something with a value for "$a" ?

Re: Using "Load" to bring up a sub menu
Posted: 24 Jul 2015 05:44
by SkyFrontier
Something: your collection of scripts.
Paste: from a copy (ctrl+c) of something.