Jump to content

AllPartControl for kOS


LtMtz

Recommended Posts

Hello Kerbals,

as i tried to mod KSP to a kind of nomap/iva only/no gui mode for extremer experience i faced the problem that you cant control most of the parts because the context menues are also hidden. :wink:

kOS is a realy nice tool for more flexibility and immersion and can help in this case. It can be alot stuff to write into the terminal to execute a function so i've written a script that can control all parts events/actions and fields by selecting them in a menu. You can access a config option where you can set up to 8 Tags directly from the menu without restarting the tool. Additionally you can find a basic userinput function used for setting fields. The maximum line number for items to display is 8 because i've written it for RPM dimensions. If there are more items then the list is simply truncated.

Download:
http://www78.zippyshare.com/v/Y8aKKGkh/file.html
(put the 3 files on your volume 0 and you are ready to go)

Credits:
The logic of the menu navigation has its origin in the ancient space comuter:

Maybe someone can use this or it will assist someone to finish his own ideas. As i got so much from the community already im glad i can give something back.
 

Best regards,

LtMtz

Link to comment
Share on other sites

  • 4 weeks later...

This sounds very kewl and useful... :)

However, your download link is kind of sketchy... I'm not familiar with zippyshare, but it says the filesize is 0MB ??... Also, you say to install the files to your volume 0? Does that mean your system drive?... Why would that be a requirement for a KSP addon?.. Is this an executable file?

Perhaps hosting on SpaceDock or Curse might be an option?... Also, if this is not something that goes in the GameData folder, like standard KSP mods, then maybe more detail for installation instructions might be good..

Thanx for your time making this though... :) It sounds like it must have been quite a bit or work...

Edited by Stone Blue
Link to comment
Share on other sites

  • 2 months later...

Hi,

the script is not working 100% correctly but i'll post it again.

1. Install KOS Mod (read about volumes)
2. Place the content (3 txt-files) under /Kerbal Space Progam/Ships/Script/ (this is volume 0 in KOS Mod)
3. run the partact_rpm file

Well maybe you can tweak the script. There is alot of programming time while flying through the space. :)
 

Here's the code. Create Textfile and remove extension. Unless u compile the scripts to .ks (read kos manual)
you can simply edit via open with -> editor

partact_rpm
 

clearscreen.
set mainexit to 0.

set mainindex to 0.

set mainprintflag to 1.

if ag9 = "True" { toggle ag9. wait 0.01. }.

if ag8 = "True" { toggle ag8. wait 0.01. }.

if ag7 = "True" { toggle ag7. wait 0.01. }.

 

 

until mainexit = 1

 {

 if ag9 = "True" { set mainindex to mainindex - 1. set mainprintflag to 1. toggle ag9. wait 0.1. }.

 if ag8 = "True" { set mainindex to mainindex + 1. set mainprintflag to 1. toggle ag8. wait 0.1. }.

 if mainindex < 0 { set mainindex to 4. }.

 if mainindex > 4 { set mainindex to 0. }.

 if ag7 = "True"

  {

  toggle ag7.
  if mainindex < 3 
{ 

//Init
if mainindex = 0 { set partactmode to 1. }.
if mainindex = 1 { set partactmode to 2. }.
if mainindex = 2 { set partactmode to 3. }.
set userinput to "no-value".
run partcfg_rpm.

//Program Parm
set maxcnt to 7.
set maxstrl to 35.

//Tag Menu----------------------------------------------------------------------------- 
set tagexit to 0.
set tagindex to 0.
set tagprintflag to 1.
if ag9 = "True" { toggle ag9. wait 0.01. }.
if ag8 = "True" { toggle ag8. wait 0.01. }.
if ag7 = "True" { toggle ag7. wait 0.01. }.
 
until tagexit = 1
 {
 if ag9 = "True" { set tagindex to tagindex - 1. set tagprintflag to 1. toggle ag9. wait 0.1. }.
 if ag8 = "True" { set tagindex to tagindex + 1. set tagprintflag to 1. toggle ag8. wait 0.1. }.
 if tagindex < 0 { set tagindex to 8. }.
 if tagindex > 8 { set tagindex to 0. }.
 if ag7 = "True"
  {
  toggle ag7.
   if tagindex < 8 
   { 
    if tagindex = 0 { set tagname to taglist[0]. }.
    if tagindex = 1 { set tagname to taglist[1]. }.
    if tagindex = 2 { set tagname to taglist[2]. }.
    if tagindex = 3 { set tagname to taglist[3]. }.
    if tagindex = 4 { set tagname to taglist[4]. }.
    if tagindex = 5 { set tagname to taglist[5]. }.
    if tagindex = 6 { set tagname to taglist[6]. }.
    if tagindex = 7 { set tagname to taglist[7]. }.

	//Part Menu------------------------------------------------------------------- 
	set partexit to 0.
	set partindex to 0.
	set partprintflag to 1.
        set lastindex to 0.
        set menum to 0. //Enum for Menuitems
	set lnum to 1. //Linenumber for printout
	if ag9 = "True" { toggle ag9. wait 0.01. }.
	if ag8 = "True" { toggle ag8. wait 0.01. }.
	if ag7 = "True" { toggle ag7. wait 0.01. }.
         
        set plist to ship:PARTSDUBBED(tagname). //Gen Partlist

	//Max Parts and Stepwidth
        if plist:length > maxcnt { set maxnump to maxcnt.} else { set maxnump to plist:length.}.

	//If tagged parts exist list per menu
        if plist:length > 0 
        {
	until partexit = 1 
	 {
	 if ag9 = "True" { set partindex to partindex - 1. set partprintflag to 1. toggle ag9. wait 0.1. }.
	 if ag8 = "True" { set partindex to partindex + 1. set partprintflag to 1. toggle ag8. wait 0.1. }.
	 if partindex < 0 { set partindex to 10. }.
         if partindex < 10 and lastindex =10 { set partindex to maxnump-1. }.
	 if partindex > 10 { set partindex to 0. }.
	 if partindex > maxnump-1 and partindex < 10 and lastindex <> 10{ set partindex to 10. }.
	 set lastindex to partindex.

	 if ag7 = "True"
	  {
	   toggle ag7.
           if partindex = 10
           {
	    set partexit to 1.
	    set tagprintflag to 1.
	    if ag7 = "True" { toggle ag7. wait 0.01. }.
           }
           else
	   {
          
           //Module Menu-------------------------------------------------------------------
           set modexit to 0.
	   set modindex to 0.
	   set modprintflag to 1.
           set lastindex to 0.
           set menum to 0. //Enum for Menuitems
	   set lnum to 1. //Linenumber for printout
	   if ag9 = "True" { toggle ag9. wait 0.01. }.
	   if ag8 = "True" { toggle ag8. wait 0.01. }.
	   if ag7 = "True" { toggle ag7. wait 0.01. }.
         
           set mlist to plist[partindex]:modules. //Gen modlist

	   //Max mod and Stepwidth
           if mlist:length > maxcnt { set maxnumm to maxcnt.} else { set maxnumm to mlist:length.}.

	   //If mods exist list per menu
           if mlist:length > 0 
           {
	   until modexit = 1 
	    {
	    if ag9 = "True" { set modindex to modindex - 1. set modprintflag to 1. toggle ag9. wait 0.1. }.
	    if ag8 = "True" { set modindex to modindex + 1. set modprintflag to 1. toggle ag8. wait 0.1. }.
	    if modindex < 0 { set modindex to 10. }.
            if modindex < 10 and lastindex =10 { set modindex to maxnumm-1. }.
	    if modindex > 10 { set modindex to 0. }.
	    if modindex > maxnumm-1 and modindex < 10 and lastindex <> 10{ set modindex to 10. }.
	    set lastindex to modindex.

	    if ag7 = "True"
	     {
	      toggle ag7.
              if modindex = 10
              {
	       set modexit to 1.
	       set partprintflag to 1.
	       if ag7 = "True" { toggle ag7. wait 0.01. }.
              }
              else
	      {

              if partactmode = 1 
              {
              //Action Menu------------------------------------------------------------------
              set actexit to 0.
	      set actindex to 0.
	      set actprintflag to 1.
              set lastindex to 0.
              set menum to 0. //Enum for Menuitems
	      set lnum to 1. //Linenumber for printout
	      if ag9 = "True" { toggle ag9. wait 0.01. }.
	      if ag8 = "True" { toggle ag8. wait 0.01. }.
	      if ag7 = "True" { toggle ag7. wait 0.01. }.
         
              set alist to plist[partindex]:GETMODULE(mlist[modindex]):allactionnames. //Gen actlist

              //Max actions and Stepwidth
              if alist:length > maxcnt { set maxnuma to maxcnt.} else { set maxnuma to alist:length.}.

              //If actions exist list per menu
              if alist:length > 0 
              {
	      until actexit = 1 
	       {
	       if ag9 = "True" { set actindex to actindex - 1. set actprintflag to 1. toggle ag9. wait 0.1. }.
	       if ag8 = "True" { set actindex to actindex + 1. set actprintflag to 1. toggle ag8. wait 0.1. }.
	       if actindex < 0 { set actindex to 10. }.
               if actindex < 10 and lastindex =10 { set actindex to maxnuma-1. }.
	       if actindex > 10 { set actindex to 0. }.
	       if actindex > maxnuma-1 and actindex < 10 and lastindex <> 10{ set actindex to 10. }.
	       set lastindex to actindex.

               if ag7 = "True"
	       {
	        toggle ag7.
                if actindex = 10
                {
	         set actexit to 1.
	         set modprintflag to 1.
	         if ag7 = "True" { toggle ag7. wait 0.01. }.
                }
                else
	        {        

                //Actioncontrol Menu----------------------------------------------------------
                set doaexit to 0.
	        set doaindex to 0.
	        set doaprintflag to 1.
                set doastatus to 0.
	        if ag9 = "True" { toggle ag9. wait 0.01. }.
	        if ag8 = "True" { toggle ag8. wait 0.01. }.
                if ag7 = "True" { toggle ag7. wait 0.01. }.



                until doaexit = 1

                 {

                  if ag9 = "True" 
                   { 
                    plist[partindex]:GETMODULE(mlist[modindex]):
DOACTION(alist[actindex], true).
                    set doastatus to 0. 
                    set doaprintflag to 1.  
                    toggle ag9. 
                    wait 0.1. 
                   }.

                    if ag8 = "True" 
                     { 
                      plist[partindex]:GETMODULE(mlist[modindex]):
DOACTION(alist[actindex], false).
                      set doastatus to 1. 
                      set doaprintflag to 1. 
                      toggle ag8. 
                      wait 0.1. 
                     }.

                    if ag7 = "True"

                     {

                      clearscreen.

                      toggle ag7.

                      set doaexit to 1.
                      set actprintflag to 1.
                      wait 0.1.

                     }.

                    if doaprintflag = 1

                     {

                      clearscreen.

                      print "Enable/Disable selected action." at (0,0).

                      print " ---------------------------------" at (0,1).

                      print " Use action group 9 to activate." at (0,2).

                      print " Use action group 8 to deactivate." at (0,3).

                      print " Use action group 7 to leave." at (0,4).
                      if doastatus = 0 { set doastatusm to "enabled".}.
                      if doastatus = 1 { set doastatusm to "disabled".}.

                      print " You have " + doastatusm + " the" at (0,10).
                      print " selected part." at (0,11).

                      set doaprintflag to 0.

                     }.

                    }.
                    //-------------------------------------------------------------------
                }.
	       }.
	       if actprintflag = 1
	       {
	        clearscreen.
	        print "Partact: Actions" at (1,0).
	        print "------------------" at (2,1).
                FROM {global z is 0.} UNTIL z = (maxnuma) STEP {set z to z+1.} DO 
                {  
	         set menum to menum+1.
	         set lnum to lnum+1.
                 if alist[z]:length > maxstrl { set strleng to maxstrl.} else { set strleng to alist[z]:length.}.
                 print menum + ". " + alist[z]:substring(0,strleng) at (2,lnum).
                }.
                if z = maxnuma 
 	        {
  	         set z to 0.
	         set menum to 0.
	         set lnum to 1.
	        }.
	        print (maxnuma+1) + ". Exit" at (2,10).
	        print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).
	        if actindex = 0 { print "=" at (0,2). }.
                if actindex = 1 { print "=" at (0,3). }.
	        if actindex = 2 { print "=" at (0,4). }.
                if actindex = 3 { print "=" at (0,5). }.
	        if actindex = 4 { print "=" at (0,6). }.
                if actindex = 5 { print "=" at (0,7). }.
	        if actindex = 6 { print "=" at (0,8). }.
                if actindex = 7 { print "=" at (0,9). }.
	        if actindex = 10 { print "=" at (0,10). }.
                set actprintflag to 0.
	        }.
	       }.
              }
	      else
	      {
	       clearscreen.
	       print "No action on module: " + mlist[modindex]. wait 2.
               set modprintflag to 1.
	      }.
              //----------------------------------------------------------------------------
              }.
              
              if partactmode = 2
              {
              //Event Menu------------------------------------------------------------------
              set actexit to 0.
	      set actindex to 0.
	      set actprintflag to 1.
              set lastindex to 0.
              set menum to 0. //Enum for Menuitems
	      set lnum to 1. //Linenumber for printout
	      if ag9 = "True" { toggle ag9. wait 0.01. }.
	      if ag8 = "True" { toggle ag8. wait 0.01. }.
	      if ag7 = "True" { toggle ag7. wait 0.01. }.
         
              set alist to plist[partindex]:GETMODULE(mlist[modindex]):alleventnames. //Gen evtlist

              //Max actions and Stepwidth
              if alist:length > maxcnt { set maxnuma to maxcnt.} else { set maxnuma to alist:length.}.

              //If actions exist list per menu
              if alist:length > 0 
              {
	      until actexit = 1 
	       {
	       if ag9 = "True" { set actindex to actindex - 1. set actprintflag to 1. toggle ag9. wait 0.1. }.
	       if ag8 = "True" { set actindex to actindex + 1. set actprintflag to 1. toggle ag8. wait 0.1. }.
	       if actindex < 0 { set actindex to 10. }.
               if actindex < 10 and lastindex =10 { set actindex to maxnuma-1. }.
	       if actindex > 10 { set actindex to 0. }.
	       if actindex > maxnuma-1 and actindex < 10 and lastindex <> 10{ set actindex to 10. }.
	       set lastindex to actindex.

               if ag7 = "True"
	       {
	        toggle ag7.
                if actindex = 10
                {
	         set actexit to 1.
	         set modprintflag to 1.
	         if ag7 = "True" { toggle ag7. wait 0.01. }.
                }
                else
	        {        

                //Eventcontrol Menu----------------------------------------------------------
                set doaexit to 0.
	        set doaindex to 0.
	        set doaprintflag to 1.
	        if ag9 = "True" { toggle ag9. wait 0.01. }.
	        if ag8 = "True" { toggle ag8. wait 0.01. }.
                if ag7 = "True" { toggle ag7. wait 0.01. }.



                until doaexit = 1

                 {

                  if ag9 = "True" 
                   { 
                    plist[partindex]:GETMODULE(mlist[modindex]):
DOEVENT(alist[actindex]).
                    clearscreen.
		    print "Activated...".
		    wait 1.
                    set actprintflag to 1.  
                    set doaexit to 1.
                    toggle ag9. 
                    wait 0.1. 
                   }.

                   if ag7 = "True"

                     {

                      clearscreen.

                      toggle ag7.

                      set doaexit to 1.
                      set actprintflag to 1.
                      wait 0.1.

                     }.

                    if doaprintflag = 1

                     {

                      clearscreen.

                      print "Activate selected event." at (0,0).

                      print " ---------------------------------" at (0,1).

                      print " Use action group 9 to activate." at (0,2).                    

                      print " Use action group 7 to leave." at (0,3).

                      set doaprintflag to 0.

                     }.

                    }.
                    //-------------------------------------------------------------------
                }.
	       }.
	       if actprintflag = 1
	       {
	        clearscreen.
	        print "Partact: Actions" at (1,0).
	        print "------------------" at (2,1).
                FROM {global z is 0.} UNTIL z = (maxnuma) STEP {set z to z+1.} DO 
                {  
	         set menum to menum+1.
	         set lnum to lnum+1.
                 if alist[z]:length > maxstrl { set strleng to maxstrl.} else { set strleng to alist[z]:length.}.
                 print menum + ". " + alist[z]:substring(0,strleng) at (2,lnum).
                }.
                if z = maxnuma 
 	        {
  	         set z to 0.
	         set menum to 0.
	         set lnum to 1.
	        }.
	        print (maxnuma+1) + ". Exit" at (2,10).
	        print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).
	        if actindex = 0 { print "=" at (0,2). }.
                if actindex = 1 { print "=" at (0,3). }.
	        if actindex = 2 { print "=" at (0,4). }.
                if actindex = 3 { print "=" at (0,5). }.
	        if actindex = 4 { print "=" at (0,6). }.
                if actindex = 5 { print "=" at (0,7). }.
	        if actindex = 6 { print "=" at (0,8). }.
                if actindex = 7 { print "=" at (0,9). }.
	        if actindex = 10 { print "=" at (0,10). }.
                set actprintflag to 0.
	        }.
	       }.
              }
	      else
	      {
	       clearscreen.
	       print "No events on module: " + mlist[modindex]. wait 2.
               set modprintflag to 1.
	      }.
              //----------------------------------------------------------------------------
              }.

              if partactmode = 3
              {
              //Fields Menu------------------------------------------------------------------
              set actexit to 0.
	      set actindex to 0.
	      set actprintflag to 1.
              set lastindex to 0.
              set menum to 0. //Enum for Menuitems
	      set lnum to 1. //Linenumber for printout
	      if ag9 = "True" { toggle ag9. wait 0.01. }.
	      if ag8 = "True" { toggle ag8. wait 0.01. }.
	      if ag7 = "True" { toggle ag7. wait 0.01. }.
         
              set alist to plist[partindex]:GETMODULE(mlist[modindex]):allfields. //Gen fieldlist
	      set anlist to plist[partindex]:GETMODULE(mlist[modindex]):allfieldnames. //Gen fieldlistnames

              //Max actions and Stepwidth
              if alist:length > maxcnt { set maxnuma to maxcnt.} else { set maxnuma to alist:length.}.

              //If actions exist list per menu
              if alist:length > 0 
              {
	      until actexit = 1 
	       {
	       if ag9 = "True" { set actindex to actindex - 1. set actprintflag to 1. toggle ag9. wait 0.1. }.
	       if ag8 = "True" { set actindex to actindex + 1. set actprintflag to 1. toggle ag8. wait 0.1. }.
	       if actindex < 0 { set actindex to 10. }.
               if actindex < 10 and lastindex =10 { set actindex to maxnuma-1. }.
	       if actindex > 10 { set actindex to 0. }.
	       if actindex > maxnuma-1 and actindex < 10 and lastindex <> 10{ set actindex to 10. }.
	       set lastindex to actindex.

               if ag7 = "True"
	       {
	        toggle ag7.
                if actindex = 10
                {
	         set actexit to 1.
	         set modprintflag to 1.
	         if ag7 = "True" { toggle ag7. wait 0.01. }.
                }
                else
	        {        

                //Fieldcontrol Menu----------------------------------------------------------
                set doaexit to 0.
	        set doaindex to 0.
	        set doaprintflag to 1.
	        if ag9 = "True" { toggle ag9. wait 0.01. }.
	        if ag8 = "True" { toggle ag8. wait 0.01. }.
                if ag7 = "True" { toggle ag7. wait 0.01. }.



                until doaexit = 1

                 {

                  if ag9 = "True" 
                   { 
                    clearscreen.
                    print "Current Value:".
                    print plist[partindex]:GETMODULE(mlist[modindex]):getfield(anlist[actindex]).
		    wait 1.
                    set actprintflag to 1.  
                    set doaexit to 1.
                    toggle ag9. 
                    wait 0.1. 
                   }.

                  if ag8 = "True" 
                   { 
		    clearscreen.
    		    edit partinp_rpm. 
    		    if ag7 = "True" { toggle ag7. wait 1.}.
    		    if ag8 = "True" { toggle ag8. wait 1.}.
    		    print "Please make a valid input" at (0,10).
    		    print "Use Action Group 7 to continue" at (0,11).
    		    set inpexit to 0.
    		    until inpexit = 1
     		     {
      		      wait 1.
      		      if ag7 = "True"
       		       {

        	        toggle ag7.

                        wait 1.

                        set inpexit to 1.

                       }.
                     }.
                     run partinp_rpm.
                     wait 0.1.
                     clearscreen.
                     print "New Value:".
                     print userinput.
                     wait 2.
                     set actprintflag to 1.
                     plist[partindex]:GETMODULE(mlist[modindex]):setfield(anlist[actindex],userinput).   
                     toggle ag7.
                   }.

                   if ag7 = "True"

                     {

                      clearscreen.

                      toggle ag7.              
                      set doaexit to 1.
                      set actprintflag to 1.
                      wait 0.1.

                     }.

                    if doaprintflag = 1

                     {

                      clearscreen.

                      print "Activate selected event." at (0,0).

                      print " ---------------------------------" at (0,1).

                      print " Use action group 9 to get field." at (0,2). 
                      print " Use action group 8 to set field." at (0,3).                       

                      print " Use action group 7 to leave." at (0,4).

                      set doaprintflag to 0.

                     }.

                    }.
                    //-------------------------------------------------------------------
                }.
	       }.
	       if actprintflag = 1
	       {
	        clearscreen.
	        print "Partact: Fields" at (1,0).
	        print "------------------" at (2,1).
                FROM {global z is 0.} UNTIL z = (maxnuma) STEP {set z to z+1.} DO 
                {  
	         set menum to menum+1.
	         set lnum to lnum+1.
                 if alist[z]:length > maxstrl { set strleng to maxstrl.} else { set strleng to alist[z]:length.}.
                 print menum + ". " + alist[z]:substring(0,strleng) at (2,lnum).
                }.
                if z = maxnuma 
 	        {
  	         set z to 0.
	         set menum to 0.
	         set lnum to 1.
	        }.
	        print (maxnuma+1) + ". Exit" at (2,10).
	        print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).
	        if actindex = 0 { print "=" at (0,2). }.
                if actindex = 1 { print "=" at (0,3). }.
	        if actindex = 2 { print "=" at (0,4). }.
                if actindex = 3 { print "=" at (0,5). }.
	        if actindex = 4 { print "=" at (0,6). }.
                if actindex = 5 { print "=" at (0,7). }.
	        if actindex = 6 { print "=" at (0,8). }.
                if actindex = 7 { print "=" at (0,9). }.
	        if actindex = 10 { print "=" at (0,10). }.
                set actprintflag to 0.
	        }.
	       }.
              }
	      else
	      {
	       clearscreen.
	       print "No events on module: " + mlist[modindex]. wait 2.
               set modprintflag to 1.
	      }.
              //----------------------------------------------------------------------------
              }.

	      }.
	     }.
	   if modprintflag = 1
	   {
	    clearscreen.
	    print "Partact: Modules" at (1,0).
	    print "------------------" at (2,1).
            FROM {global x is 0.} UNTIL x = (maxnumm) STEP {set x to x+1.} DO 
             {  
	      set menum to menum+1.
	      set lnum to lnum+1.
              if mlist[x]:length > maxstrl { set strleng to maxstrl.} else { set strleng to mlist[x]:length.}.
              print menum + ". " + mlist[x]:substring(0,strleng) at (2,lnum).
             }.
           if x = maxnumm 
 	    {
  	     set x to 0.
	     set menum to 0.
	     set lnum to 1.
	    }.
	    print (maxnumm+1) + ". Exit" at (2,10).
	    print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).
	    if modindex = 0 { print "=" at (0,2). }.
            if modindex = 1 { print "=" at (0,3). }.
	    if modindex = 2 { print "=" at (0,4). }.
            if modindex = 3 { print "=" at (0,5). }.
	    if modindex = 4 { print "=" at (0,6). }.
            if modindex = 5 { print "=" at (0,7). }.
	    if modindex = 6 { print "=" at (0,8). }.
            if modindex = 7 { print "=" at (0,9). }.
	    if modindex = 10 { print "=" at (0,10). }.
            set modprintflag to 0.
	   }.
	  }.
         }
	 else
	 {
	  clearscreen.
	  print "No mod on part: " + plist[partindex]. wait 2.
          set partprintflag to 1.
	 }.
         //----------------------------------------------------------------------------
	   }.
	  }.
	 if partprintflag = 1
	  {
	  clearscreen.
	  print "Partact: Parts" at (1,0).
	  print "------------------" at (2,1).
           FROM {global y is 0.} UNTIL y = (maxnump) STEP {set y to y+1.} DO 
           {  
	    set menum to menum+1.
	    set lnum to lnum+1.
            if plist[y]:title:length > maxstrl { set strleng to maxstrl.} else { set strleng to plist[y]:title:length.}.
            print menum + ". " + (plist[y]:title):substring(0,strleng) at (2,lnum).
           }.
         if y = maxnump 
 	  {
  	   set y to 0.
	   set menum to 0.
	   set lnum to 1.
	  }.
	   print (maxnump+1) + ". Exit" at (2,10).
	   print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).
	   if partindex = 0 { print "=" at (0,2). }.
           if partindex = 1 { print "=" at (0,3). }.
	   if partindex = 2 { print "=" at (0,4). }.
           if partindex = 3 { print "=" at (0,5). }.
	   if partindex = 4 { print "=" at (0,6). }.
           if partindex = 5 { print "=" at (0,7). }.
	   if partindex = 6 { print "=" at (0,8). }.
           if partindex = 7 { print "=" at (0,9). }.
	   if partindex = 10 { print "=" at (0,10). }.
           set partprintflag to 0.
	  }.
	 }.
        }
	else
	{
	 clearscreen.
	 print "No Part with tag: " + tagname. wait 2.
         set tagprintflag to 1.
	}.
	//----------------------------------------------------------------------------
   }.
   if tagindex = 8 
   {  
    set tagexit to 1. wait 1. 
   }.
  }.
  if tagprintflag = 1
  {
  wait 0.1.
  clearscreen.
  print "Partact: Tag Menu" at (1,0).
  print "------------------" at (2,1).
  print "1. Part (" + taglist[0] + ")" at (2,2).
  print "2. Part (" + taglist[1] + ")" at (2,3).
  print "3. Part (" + taglist[2] + ")" at (2,4).
  print "4. Part (" + taglist[3] + ")" at (2,5).
  print "5. Part (" + taglist[4] + ")" at (2,6).
  print "6. Part (" + taglist[5] + ")" at (2,7).
  print "7. Part (" + taglist[6] + ")" at (2,8).
  print "8. Part (" + taglist[7] + ")" at (2,9).
  print "9. Exit" at (2,10).
  print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).
  if tagindex = 0 { print "=" at (0,2). }.
  if tagindex = 1 { print "=" at (0,3). }.
  if tagindex = 2 { print "=" at (0,4). }.
  if tagindex = 3 { print "=" at (0,5). }.
  if tagindex = 4 { print "=" at (0,6). }.
  if tagindex = 5 { print "=" at (0,7). }.
  if tagindex = 6 { print "=" at (0,8). }.
  if tagindex = 7 { print "=" at (0,9). }.
  if tagindex = 8 { print "=" at (0,10). }.
  set mainprintflag to 1.
  }.
 }.
//------------------------------------------------------------------------------------
  
}.

  if mainindex = 3  
   { 
    edit partcfg_rpm. 
    clearscreen.
    if ag7 = "True" { toggle ag7. wait 1.}.
    print "Please save your settings first" at (0,10).
    print "Use Action Group 7 to continue" at (0,11).
    set cfgexit to 0.
    until cfgexit = 1
     {
      wait 1.
      if ag7 = "True"
       {

        toggle ag7.

        wait 1.

        set cfgexit to 1.

       }.
     }.
     set mainprintflag to 1.
     if ag7 = "True" { toggle ag7. wait 1.}.   
   }.

  if mainindex = 4 { set mainexit to 1. wait 1. }.

  }.

 if mainprintflag = 1

  {

  clearscreen.
  print "Partact: Main Menu" at (1,0).
  print "------------------" at (2,1).

  print "1. Actions" at (2,2).

  print "2. Events" at (2,3).
  print "3. Fields" at (2,4).

  print "4. Config" at (2,5).
  print "5. Exit" at (2,10).
  print "Info: AG7=Select, AG8=down, AG9=up"  at (2,11).

  if mainindex = 0 { print "=" at (0,2).}.

  if mainindex = 1 { print "=" at (0,3).}.

  if mainindex = 2 { print "=" at (0,4).}.

  if mainindex = 3 { print "=" at (0,5).}.

  if mainindex = 4 { print "=" at (0,10).}.

  set mainprintflag to 0.

  }.

 }.

 clearscreen.

 

partcfg_rpm

//User set Parameters (max. 8 for rpm)

//Part Tags
set tag1 to "robo1".
set tag2 to "testtag".
set tag3 to "cam".
set tag4 to "sat".
set tag5 to "dock1".
set tag6 to "antenna".
set tag7 to "goo".
set tag8 to "Winch".
set taglist to list(tag1,tag2,tag3,tag4,tag5,tag6,tag7,tag8).

 

partinp_rpm

//User set Parameters (max. 8)
//Please make your input.

//For Integer put just the value. exmp: set userinput to 4.
//Stringa need to be quoted. exmp:  set userinput to "mission-control".
set userinput to "mission-control".

 

Edited by LtMtz
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...