Project Menu - My676 & My900

Discuss and share scripts and script files...

Project Menu - My676 & My900

Postby totmad1 » 01 Oct 2013 19:46

While coding MenuProducer I thought of this idea for another form of menus.
I have placed in the "My676.zip" a full copy of My676.xys for immediate use.
Also My900.xys , MyMake676.xys and MyMake676code1.txt .
The last two items you can use to create the "My676.xys" if you so wish.
This is also so that you could alter it to suit your requirements .
I have also packed an icon which is used initially .

To explain my coding it has 26 "projects" fully nameable and icon changeable.
Further each "project" has 26 "items" fully nameable and icon changeable.
All without having to open an editor.

1st image shows 26 "projects" and the main menu.

project.jpg
project.jpg (28.79 KiB) Viewed 472 times


2nd image shows 26 "items" of "aa project"
projItemAA.jpg
projItemAA.jpg (17.16 KiB) Viewed 472 times


Here is the code for "MyMake676.xys"
Code: Select all
"run"
  $start = <<<START
-
"Edit menu : edit"
   $scriptFile= self ("file");
       run notepad "$scriptFile",w;
-
"CANCEL"
-
" Name a Project menu"  sub _projChoice ; sub _projname;
"Change a Project menu ICON"  sub _projChoice ; sub _ChangeIcon; sub _ChangeProjIcon;
"Add selected item to menu"  end (get("CountSelected") == 0, "Nothing selected");
                             sub _projChoice ; sub _AddItem;  sub _My676xysAdd;
"Change item Icon"   sub _projChoice; sub _AddItem; sub _ChangeIcon; sub _ItemIcon;
"Change item Name"   sub _projChoice; sub _AddItem; sub _ItemName;
-

START
 ;
    writefile("<xyscripts>\My676.xys", "$start" , "a");
      foreach($a, "aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww,xx,yy,zz", ",") {
  $Main1 = <<<MASTER
"$a   ____---|<xyicons>\xy-menu.ico :  $a ME"  Load("*","_ $a MD;-;_ $a A;_ $a B;_ $a C;_ $a D;_ $a E;_ $a F;_ $a G;_ $a H;_ $a I;_ $a J;_ $a K;_ $a L;_ $a M;_ $a N;_ $a O;_ $a P;_ $a Q;_ $a R;_ $a S;_ $a T;_ $a U;_ $a V;_ $a W;_ $a X;_ $a Y;_ $a Z;") ;
"<-  $a |: $a |1 : _ $a MD"   Load("*");
"01$a  |<xyicons>\xy-script.ico : _ $a A";   open notepad ;
"02$a  |<xyicons>\xy-script.ico : _ $a B";   open notepad ;
"03$a  |<xyicons>\xy-script.ico : _ $a C";   open notepad ;
"04$a  |<xyicons>\xy-script.ico : _ $a D";   open notepad ;
"05$a  |<xyicons>\xy-script.ico : _ $a E";   open notepad ;
"06$a  |<xyicons>\xy-script.ico : _ $a F";   open notepad ;
"07$a  |<xyicons>\xy-script.ico : _ $a G";   open notepad ;
"08$a  |<xyicons>\xy-script.ico : _ $a H";   open notepad ;
"09$a  |<xyicons>\xy-script.ico : _ $a I";   open notepad ;
"10$a  |<xyicons>\xy-script.ico : _ $a J";   open notepad ;
"11$a  |<xyicons>\xy-script.ico : _ $a K";   open notepad ;
"12$a  |<xyicons>\xy-script.ico : _ $a L";   open notepad ;
"13$a  |<xyicons>\xy-script.ico : _ $a M";   open notepad ;
"14$a  |<xyicons>\xy-script.ico : _ $a N";   open notepad ;
"15$a  |<xyicons>\xy-script.ico : _ $a O";   open notepad ;
"16$a  |<xyicons>\xy-script.ico : _ $a P";   open notepad ;
"17$a  |<xyicons>\xy-script.ico : _ $a Q";   open notepad ;
"18$a  |<xyicons>\xy-script.ico : _ $a R";   open notepad ;
"19$a  |<xyicons>\xy-script.ico : _ $a S";   open notepad ;
"20$a  |<xyicons>\xy-script.ico : _ $a T";   open notepad ;
"21$a  |<xyicons>\xy-script.ico : _ $a U";   open notepad ;
"22$a  |<xyicons>\xy-script.ico : _ $a V";   open notepad ;
"23$a  |<xyicons>\xy-script.ico : _ $a W";   open notepad ;
"24$a  |<xyicons>\xy-script.ico : _ $a X";   open notepad ;
"25$a  |<xyicons>\xy-script.ico : _ $a Y";   open notepad ;
"26$a  |<xyicons>\xy-script.ico : _ $a Z";   open notepad ;

MASTER
 ;
   writefile("<xyscripts>\My676.xys", "$Main1" , "a");
    }
    $last = readfile ("<xyscripts>\Make676code1.txt")   ;
   writefile("<xyscripts>\My676.xys", "$last" , "a");
-
"CANCEL"


finally here is the zip file
My676.zip
(19.73 KiB) Downloaded 24 times


Update 2013Oct04
found a mistake
Code: Select all
"_projname"
           global  $choice, $My676xys, $Projchoice;
      $srch4 =  "___---|";
           $endProjname = strpos( $My676xys , $srch4 , $Projchoice, );

last "$Projchoice" had mistakenly been replaced by "0".
zip file replaced.
totmad1 (totally mad one)
totmad1
 
Posts: 71
Joined: 24 Jun 2013 11:37

Re: Project Menu - My676 & My900

Postby totmad1 » 17 Dec 2013 14:15

I have been using this menu script for three months now
and have been surprised by how much i have used it.

Found a couple of faults and finally got round to fix.
While fixing i put in some code to backup to archive
(easy with the new{ish} zip commands)
Wanted to make choice of project easier
(had to rely on memory - constantly forgetting to take note)
extra code added at beginning so that if run from unusual place.
(mainly when testing).
dot in path was found to be causing faults fixed by adding 3 lines of code.

My676.zip
(20.86 KiB) Downloaded 17 times
totmad1 (totally mad one)
totmad1
 
Posts: 71
Joined: 24 Jun 2013 11:37

Re: Project Menu - My676 & My900

Postby autocart » 18 Dec 2013 07:25

1) Initiative like this is good. Thx.
2) However, can you not do the same (with the same ease of use) by using the Catalog? What is better using your script?
autocart
 
Posts: 300
Joined: 26 Sep 2013 14:22
Location: Neuhauserweg 14, 4061 Pasching, Austria

Re: Project Menu - My676 & My900

Postby totmad1 » 19 Dec 2013 14:26

I wrote this due to someone did not want to use the Catalog.
Also I wanted to show the methods available to
1/ make sub menus (as far as I searched no other use made other than viewtopic.php?f=3&t=4144 )
2/ make repeatable code via text file.
3/ use of new(ish) commands zip and _initialise.
in answer to what is best that must be on own use.
totmad1 (totally mad one)
totmad1
 
Posts: 71
Joined: 24 Jun 2013 11:37


Return to Script Exchange



Who is online

Users browsing this forum: No registered users and 3 guests