This dialog provides a means to set, save and load the syntax highlighting colors, specify the line wrap state, and access the presets dialog.
The Presets dialog allows you to create script blocks that are executed prior to every script, thereby allowing you to have handy preset variables and functions you can call on, making your scripts much easier to create. Here are some functions you can copy and paste into the presets dialog that I have set up, followed by an example of using some of them:
u_tt~"unset":u_xp=0:u_yp=0:u_tred=255:u_tgreen=255:u_tblue=255:u_xw=0:u_yw=0:u_matrix~"" xyset~"m_fontpoints=50;if(exists(font)==1);m_font~font;else;m_font~\"Marker Felt\";endif;if(exists(scale)==1);u_scale= scale;else;u_scale= 1;endif;u_yp= m_fontpoints * u_scale * 1.5;u_xp=u_yp * .33;u_yinc= u_scale * m_fontpoints * 1.25" blackfill~"entire;colorfill 0 0 0" rcolorfill~"func(rcolor);entire;colorfill u_r u_g u_b" ctext~"text m_font u_xp u_yp u_scale u_tt;colorfill u_r u_g u_b;u_yp=u_yp+m_lineheight" rcolor~"u_r= round(64+rnd(64));u_g= round(64+rnd(64));u_b=round(64+rnd(64))" setrgb~"u_r=dparm(0);u_g=dparm(1);u_b=dparm(2)" black~"func(setrgb0,0,0)" green~"func(setrgb,0,255,0)" white~"func(setrgb,255,255,255)" whitetext~"func(white);func(ctext)" greentext~"func(green);func(ctext)" blacktext~"func(black);func(ctext)" matout~"u_matrix~tparm(0);u_yw=arows(u_matrix);u_xw=acols(u_matrix);u_tt~\"matrix \"+u_matrix+\" @ \"+u_yw+\"y\"+u_xw+\"x\";func(greentext);u_tmp=m_fieldwidth;m_fieldwidth=maxdigits(u_matrix);u_tt~;if(u_xw>0);if(u_yw>0);uu_yp= 0;loop(u_yw);uu_xp= 0;u_tt~\"[\";loop(u_xw);u_dex=uu_yp*u_xw+uu_xp;u_v=value(u_matrix,u_dex);u_tt~u_tt+u_v;if(uu_xp<(u_xw-1));u_tt~u_tt+\",\";else;u_tt~u_tt+\"]\";endif;uu_xp=uu_xp+1;while();func(whitetext);uu_yp=uu_yp+1;while();endif;endif;m_fieldwidth=u_tmp"
Please consider supporting my iToolBox development efforts with a small PayPal donation. |