Now draw your own ScriptUIGraphics graphics! (1st testing)

Hey everyone, I've made this little system of drawing ScriptUIGraphics from your illustrator document.  Please be advised, the graphics resulting from this are not anti-aliased and look bad at medium sizes --> terrible at small sizes, but they may help with making some dynamic icons for some really specific scriptUI purposes.
Basically, you just draw something in an AI doc, run this window and use the function from it as well as the object resource string to recreate that drawing in your own scriptUI windows.
This method only uses straight lines and ellipses when it detects ellipses.  After seeing the quality of these drawings, I'm thinking for the prettier icons you'd surely want to embed images into your UI, but there may come a very very rare time when there exists a need for some dynamic image with many states, so this may be what it may end up perhaps being useful for.
Attached are screenshots with original drawing (artboard is 100x100px), the captured image drawn in window and last, pretty much the same- is the result drawn from object resource string.  The screenshots JPEGs have smoothed out the little icons, making them look actually better than they really are!
Edit: 
     Oh yes, I did need to mention: the colors used can be any color, spot/Lab included!  They just get changed to some version of RGB for rendering.
// ScriptUI Graphics Display by Vasily
function graphicsDisplay(){
    function itemShape(myShape){
        // Going to test for circles.
        var shapeKind={
            isrectangle: null,
            iscircle: null,
            isellipse: null
        if(myShape.typename=='PathItem' && myShape.pathPoints.length == 4){ // RECTANGLE CHECKER
            //--------------------2 diagonals-------------------------
            var recEquaDistOne = parseInt(Math.pow((myShape.pathPoints[0].anchor[0] - myShape.pathPoints[2].anchor[0]),2) +
            Math.pow((myShape.pathPoints[0].anchor[1] - myShape.pathPoints[2].anchor[1]),2)); // diagonal
            var recEquaDistTwo = parseInt(Math.pow((myShape.pathPoints[1].anchor[0] - myShape.pathPoints[3].anchor[0]),2) +
            Math.pow((myShape.pathPoints[1].anchor[1] - myShape.pathPoints[3].anchor[1]),2)); // diagonal
            //---------------------4 sides of rectangle---------------
            var sideA = parseInt(Math.pow((myShape.pathPoints[0].anchor[0] - myShape.pathPoints[1].anchor[0]),2) +
            Math.pow((myShape.pathPoints[0].anchor[1] - myShape.pathPoints[1].anchor[1]),2)); 
            var sideB = parseInt(Math.pow((myShape.pathPoints[1].anchor[0] - myShape.pathPoints[2].anchor[0]),2) +
            Math.pow((myShape.pathPoints[1].anchor[1] - myShape.pathPoints[2].anchor[1]),2)); 
            var sideC = parseInt(Math.pow((myShape.pathPoints[2].anchor[0] - myShape.pathPoints[3].anchor[0]),2) +
            Math.pow((myShape.pathPoints[2].anchor[1] - myShape.pathPoints[3].anchor[1]),2)); 
            var sideD = parseInt(Math.pow((myShape.pathPoints[3].anchor[0] - myShape.pathPoints[0].anchor[0]),2) +
            Math.pow((myShape.pathPoints[3].anchor[1] - myShape.pathPoints[0].anchor[1]),2)); 
            if(recEquaDistOne == recEquaDistTwo){ // If two diagonals connecting opposite points are same length, it's a 90 degree box               
                if((sideA == sideC) && (sideB == sideD)){
                    for(var j=0; j<4; j++){
                        var point = myShape.pathPoints[j];             
                            if((point.leftDirection[0] == point.anchor[0]) &&
                                (point.anchor[0] == point.rightDirection[0]) &&
                                (point.leftDirection[1] == point.anchor[1]) &&
                                (point.anchor[1] == point.rightDirection[1])){                                                   
                                shapeKind.isrectangle = true;
                            } else {
                                shapeKind.isrectangle = false;
                                break;
            if(myShape.pathPoints.length == 4){  // CIRCLE CHECKER
                if(shapeKind.isrectangle == false || shapeKind.isrectangle == null){
                    var circlePts = new Array();
                    var circleSlopes = new Array();
                    for (k=0; k<4; k++){
                    var point = myShape.pathPoints[k]; 
                    var leftHandleDist = parseInt(Math.pow((point.leftDirection[0] - point.anchor[0]),2) +
                    Math.pow((point.leftDirection[1] - point.anchor[1]),2));
                    var rightHandleDist = parseInt(Math.pow((point.rightDirection[0] - point.anchor[0]),2) +
                    Math.pow((point.rightDirection[1] - point.anchor[1]),2));
                    circlePts.push(leftHandleDist, rightHandleDist);
                    var leftHandleSlope = ((point.leftDirection[0] - point.anchor[0])/(point.leftDirection[1] - point.anchor[1])).toFixed(2);
                    var rightHandleSlope = ((point.rightDirection[0] - point.anchor[0])/(point.rightDirection[1] - point.anchor[1])).toFixed(2);
                    circleSlopes.push(leftHandleSlope, rightHandleSlope);
                for(var f=0; f<8; f++){ // Allows non-rotated circles.
                    if(circleSlopes[f] == "-0.00"){
                        circleSlopes[f] = "0.00";
                    if(circleSlopes[f] == "-Infinity"){
                        circleSlopes[f] = "Infinity";
                var cirEquaDistOne = parseInt(Math.pow((myShape.pathPoints[0].anchor[0] - myShape.pathPoints[2].anchor[0]),2) +
                Math.pow((myShape.pathPoints[0].anchor[1] - myShape.pathPoints[2].anchor[1]),2));
                var cirEquaDistTwo = parseInt(Math.pow((myShape.pathPoints[1].anchor[0] - myShape.pathPoints[3].anchor[0]),2) +
                Math.pow((myShape.pathPoints[1].anchor[1] - myShape.pathPoints[3].anchor[1]),2));
                if(circleSlopes[0] != "NaN"){ // Filters out asymmetric rhombus  <><><>^^^^^^<><><>
                    if((circlePts[0] == circlePts[1]) && // Filters out shapes with control handles not of equal distance from anchor point.
                        (circlePts[1] == circlePts[2]) &&
                        (circlePts[2] == circlePts[3]) &&
                        (circlePts[3] == circlePts[4]) &&
                        (circlePts[4] == circlePts[5]) &&
                        (circlePts[5] == circlePts[6]) &&
                        (circlePts[6] == circlePts[7]) &&
                        (circlePts[7] == circlePts[0])){
                        if((circleSlopes[0] == circleSlopes[1]) && // Filters out the equadistant 4-pointed Star shape (dismisses negative slopes).
                            (circleSlopes[2] == circleSlopes[3]) &&
                            (circleSlopes[4] == circleSlopes[5]) &&
                            (circleSlopes[6] == circleSlopes[7])){
                            if(cirEquaDistOne == cirEquaDistTwo){ // Filters out Ellipses (non-equadistant circles).
                                // Filters out the very RARE 4-pointed star which has all control points in its center on top of each other!
                                if(((myShape.pathPoints[0].leftDirection[0]).toFixed(2) != (myShape.pathPoints[1].leftDirection[0]).toFixed(2)) &&
                                    ((myShape.pathPoints[0].leftDirection[1]).toFixed(2) != (myShape.pathPoints[1].leftDirection[1]).toFixed(2))){
                                    shapeKind.iscircle = true;
                                } else {
                                    shapeKind.iscircle = false;
                    } else {
                        if((circlePts[0]==circlePts[1]) &&
                            (circlePts[2]==circlePts[3]) &&
                            ((circlePts[4]==circlePts[5]) && (circlePts[4]==circlePts[1]) && (circlePts[5]==circlePts[1])) &&
                            ((circlePts[6]==circlePts[7]) && (circlePts[6]==circlePts[2]) && (circlePts[7]==circlePts[3]))){
                            shapeKind.isellipse=true;
    //~                     $.writeln(circlePts[0]+'\r'+circlePts[1]+'\r'+circlePts[2]+'\r'+circlePts[3]+'\r'+
    //~                     circlePts[4]+'\r'+circlePts[5]+'\r'+circlePts[6]+'\r'+circlePts[7]);
        return shapeKind;
    if(app.name=='Adobe Illustrator' && app.documents.length>0){
        function round2(num){
            return Math.round(num*100)/100;
        function convertToUIRGB(color){
            if(color=='[CMYKColor]'){
                var c=color.cyan, m=color.magenta, y=color.yellow, k=color.black;
                return [
                    round2((1-(c/100))*(1-(k/100))),
                    round2((1-(m/100))*(1-(k/100))),
                    round2((1-(y/100))*(1-(k/100)))
            } else if(color=='[GrayColor]'){
                var k=color.gray;
                var grayValue=1-(Math.round(((k/100)*255)*100)/100)/255;
                return [grayValue,grayValue,grayValue];
            } else if(color=='[GradientColor]'){
                $.writeln('Sorry, no gradient colors please.');
                return [0,0,0];
            } else if(color=='[PatternColor]'){
                $.writeln('Sorry, no pattern colors please.');
                return [0,0,0,];
            } else if(color=='[SpotColor]'){
                var clr=color.spot.getInternalColor();
                if(color.spot.spotKind==SpotColorKind.SPOTCMYK){
                    var c=clr[0], m=clr[1], y=clr[2], k=clr[3];
                    return [
                        round2((1-(c/100))*(1-(k/100))),
                        round2((1-(m/100))*(1-(k/100))),
                        round2((1-(y/100))*(1-(k/100)))
                } else if(color.spot.spotKind==SpotColorKind.SPOTRGB){
                    return [round2(clr[0]/255), round2(clr[1]/255), round2(clr[2]/255)];
                } else if(color.spot.spotKind==SpotColorKind.SPOTLAB){
                    var clr=color.spot.getInternalColor();
                    var whiteRef={
                        D65: {X: 95.047,Y: 100, Z: 108.883},
                        D50: {X: 96.422,Y: 100, Z: 82.521},
                    var illuminant='D65';
                    var Y = (clr[0]+16)/116;
                    var X = clr[1]/500+Y;
                    var Z = Y-clr[2]/200;
                    if(Math.pow(Y,3) > 0.008856){Y=Math.pow(Y,3);}
                    else {Y = (Y-16/116)/7.787;}
                    if(Math.pow(X,3) > 0.008856){X=Math.pow(X,3);}
                    else {X = (X-16/116)/7.787;}
                    if(Math.pow(Z,3) > 0.008856){Z=Math.pow(Z,3);}
                    else {Z = (Z-16/116)/7.787;}
                    X*=whiteRef[illuminant].X,Y*=whiteRef[illuminant].Y,Z*=whiteRef[illuminant].Z;
                    //alert(X+" "+Y+" "+Z);
                    X/=100,Y/=100,Z/=100;
                    R=X*3.2406+Y*-1.5372+Z*-0.4986;
                    G=X*-0.9689+Y*1.8758+Z*0.0415;
                    B=X*0.0557+Y*-0.2040+Z*1.0570;
                    //alert(R+" "+G+" "+B);
                    if(R > 0.0031308){R=(1.055*(Math.pow(R,(1/2.4))))-0.055;}
                    else {R*= 12.92;}
                    if(G > 0.0031308){G=(1.055*(Math.pow(G,(1/2.4))))-0.055;}
                    else {G*= 12.92;}
                    if(B > 0.0031308){B=(1.055*(Math.pow(B,(1/2.4))))-0.055;}
                    else {B*= 12.92;}
                    if(R<0){R=0} else if(R>1){R=1};
                    if(G<0){G=0} else if(G>1){G=1};
                    if(B<0){B=0} else if(B>1){B=1};
                    return [round2(R),round2(G),round2(B)];
            } else if(color=='[RGBColor]'){
                return [round2(color.red/255), round2(color.green/255), round2(color.blue/255)];
        function drawFromObjString(objString, canvasArea){
           function round2(num){
               return Math.round(num*100)/100;
            var obj=eval(objString);
            var canvas=canvasArea.graphics;
            var counter=obj.total;
            while(counter>=0){
                for(all in obj){
                    if(all.match(/\d{1,2}$/g) && all.match(/\d{1,2}$/g)==counter){
                        var thisShp=obj[all];
                        if(thisShp.ellipsePath!=true){
                            var vectorPts=thisShp.pathPoints;
                            canvas.newPath(); canvas.moveTo(thisShp.pathPoints[0][0],thisShp.pathPoints[0][1]);
                            for(var j=0; j<vectorPts.length; j++){
                                var thisAnchor=vectorPts[j];
                                var x=thisAnchor[0], y=thisAnchor[1];
                                canvas.lineTo(x,y);
                            if(thisShp.closed==true){
                                canvas.closePath();
                        } else {
                            var cirPts=thisShp.pathPoints;
                            canvas.newPath();
                            canvas.ellipsePath(cirPts[0], cirPts[1], cirPts[2], cirPts[3]);
                            canvas.closePath();
                        if(thisShp.fillColor!=null){
                            var clr=thisShp.fillColor;
                            var myBrush=canvas.newBrush(canvas.BrushType.SOLID_COLOR,clr);
                            canvas.fillPath(myBrush);
                        if(thisShp.strokeColor!=null){
                            var clr=thisShp.strokeColor;
                            var myPen=canvas.newPen(canvas.PenType.SOLID_COLOR,[clr[0],clr[1],clr[2],1], thisShp.strokeWidth);
                            canvas.strokePath(myPen);
                counter-=1;
        var doc=app.activeDocument;
        if(doc.height<=400 && doc.width<=600){
            doc.rulerOrigin=[0,doc.height];
            doc.coordinateSystem=CoordinateSystem.DOCUMENTCOORDINATESYSTEM;
            var wDims=function(){
                var dims={width: '', height: ''};
                if(doc.width>220){
                    dims.width = Math.round(doc.width);
                } else {
                    dims.width = 220;
                if(doc.height>20){
                    dims.height = Math.round(doc.height);
                } else {
                    dims.height = 20;
                return dims;
            function drawCapture(vectors, dataDisplay, graphicDisplay){
                // draws a preview and creates a drawing data object resource.
                var drawData={total:0}; //Put drawing shapes here.  Properties: stroke (rgb color | null), fill (rgb color | null), pathPoints
                var canvas=graphicDisplay.graphics;
                for(var i=vectors.length-1; i>-1; i--){
                    var thisShp=vectors[i];
                    if((thisShp.filled || thisShp.stroked) && thisShp.editable==true){
                        drawData.total++;
                        drawData['shape_'+i]={};
                        drawData['shape_'+i].fillColor=null;
                        drawData['shape_'+i].strokeColor=null;
                        drawData['shape_'+i].pathPoints=[];
                        drawData['shape_'+i].ellipsePath=false;
                        if(itemShape(thisShp).iscircle==true || itemShape(thisShp).isellipse==true || thisShp.name=='ellipse' ||
                            thisShp.name=='circle' || thisShp.name=='cir'){
                            drawData['shape_'+i].ellipsePath=true;
                            drawData['shape_'+i].pathPoints=[thisShp.left, -thisShp.top, thisShp.width, thisShp.height];
                            canvas.newPath();
                            canvas.ellipsePath(thisShp.left, -thisShp.top, thisShp.width, thisShp.height);
                        } else {
                            var vectorPts=thisShp.pathPoints;
                            canvas.newPath(); canvas.moveTo(Math.round(vectorPts[0].anchor[0]),-Math.round(vectorPts[0].anchor[1]));
                            for(var j=0; j<vectorPts.length; j++){
                                var thisAnchor=vectorPts[j].anchor;
                                var x=Math.round(thisAnchor[0]), y=-Math.round(thisAnchor[1]);
                                drawData['shape_'+i].pathPoints.push([x,y]);
                                canvas.lineTo(x,y);
                        if(thisShp.closed || drawData['shape_'+i].ellipsePath==true){
                            drawData['shape_'+i].closed=true;
                            if(drawData['shape_'+i].ellipsePath!=true){
                                canvas.closePath();
                        } else {
                            drawData['shape_'+i].closed=false;
                        if(thisShp.filled){
                            var clr=thisShp.fillColor;
                            var colorArray=convertToUIRGB(clr);
                            var myBrush=canvas.newBrush(canvas.BrushType.SOLID_COLOR,colorArray);
                            drawData['shape_'+i].fillColor=colorArray;
                            canvas.fillPath(myBrush);
                        if(thisShp.stroked){
                            var clr=thisShp.strokeColor;
                            var colorArray=convertToUIRGB(clr);
                            var myPen=canvas.newPen(canvas.PenType.SOLID_COLOR,[colorArray[0],colorArray[1],colorArray[2],1], Math.round(thisShp.strokeWidth));
                            drawData['shape_'+i].strokeColor=colorArray;
                            drawData['shape_'+i].strokeWidth=Math.round(thisShp.strokeWidth);
                            canvas.strokePath(myPen);
                return drawData;
            function showDrawerFunc(objStringDisplay, wDims){
                var w2=new Window('dialog','Drawer Function');
                var containerG=w2.add('tabbedpanel');
                    var funcG=containerG.add('tab',undefined,'Drawer Function');
                        var dispE=funcG.add('edittext',undefined,funcSrc,{multiline:true}); dispE.size=[580,200];
                        var selBtn=funcG.add('button',undefined,'Select All');
                    var drawingG=containerG.add('tab',undefined,'Drawing:');
                        var drawG=drawingG.add('group');
                            var drawP=drawG.add('panel',undefined,''); drawP.size=[wDims.width, wDims.height];
                var msgCntr=w2.add('panel',undefined,'Message Center:');
                    var msgE=msgCntr.add('edittext',undefined,'',{multiline:true});msgE.size=[560,40];
                var btnG=w2.add('group');
                    var okBtn=btnG.add('button',undefined,'Ok',{name: 'ok'});
                selBtn.onClick=function(){
                    dispE.active=false; dispE.active=true;
                drawG.onDraw=function(){
                    if(objStringDisplay.text!=''){
                        try{
                            drawFromObjString(objStringDisplay.text, this);
                        } catch(e){
                            msgE.text=("Something isn't right:\r"+e);
                    } else {
                        msgE.text=('You must first put a valid object string into the object string display area--> "Get Source Object String" button, 1st window, 1st tab.');
                w2.show();
            function instructions(){
                var w3=new Window('dialog','instructions');
                var instructions=w3.add('edittext',undefined,'',{multiline:true}); instructions.size=[400,100];
                instructions.text="1)  Have a document open, smaller than 600x400.\r\r"+
                    "2)  Draw some stuff- use paths only, straight lines or ellipses only. To have script explicitly recognize ellipse, "+
                    "label the path 'cir', 'circle', or 'ellipse'. Right now there's a function to detect ellipses, but it is coarse.\r\r"+
                    "3)  Run this script and see if your drawing was captured below this box.\r\r"+
                    "4)  Click the 'Get Object String' button and see the drawing instruction string appear.\r\r"+
                    "5)  Click the 'View Drawer Function/Drawing' button to see the function used to draw scriptUI picture from"+
                    " the object string and use other tab to see the drawing made with this function from that object string.\r\r"+
                    "6)  Edit your string to see your picture change if needed!";
                var okBtn=w3.add('button',undefined,'OK');
                w3.show();
            var funcSrc=drawFromObjString.toSource();
            var dispWindow=function(){
                var drawData;
                var w=new Window('dialog','ScriptUI Graphics Display');
                var panel=w.add('panel',undefined,''); panel.size=[wDims.width+6,wDims.height+6];
                var list=w.add('edittext',undefined,'',{multiline:true}); list.size=[wDims.width,150];
                var btnsG=w.add('group');
                    var clickBtn=btnsG.add('button',undefined,'Get Source Object String');
                    var selectBtn=btnsG.add('button',undefined,'Select All');
                var btnG2=w.add('group');
                    var funcBtn=btnG2.add('button',undefined,'See Drawer Function/Drawing');
                    funcBtn.helpTip='Uses the Object String picture info to draw using ScriptUIGraphics lineTo commands.';
                    var helpBtn=btnG2.add('button',undefined,'?'); helpBtn.size=[25,25];
                panel.onDraw=function(){
                    drawData=drawCapture(doc.pathItems, list, this);
                clickBtn.addEventListener('mousedown',function(){
                    list.text=drawData.toSource();
                funcBtn.onClick=function(){
                    showDrawerFunc(list, wDims);
                helpBtn.onClick=function(){
                    instructions();
                selectBtn.onClick=function(){
                    list.active=false; list.active=true;
                var okBtn=w.add('button',undefined,'OK');
                w.show();
        } else {
            alert('Please use a document with main artboard no larger than 600x400.');
    } else {
        alert('Must run in Illustrator with at least 1 document open.');
graphicsDisplay();

New-er update to this:
// ScriptUI Graphics Display by Vasily
#target illustrator
function graphicsDisplay(){
    function itemShape(myShape){
        // Going to test for circles.
        var shapeKind={
            isrectangle: null,
            iscircle: null,
            isellipse: null
        if(myShape.typename=='PathItem' && myShape.pathPoints.length == 4){ // RECTANGLE CHECKER
            //--------------------2 diagonals-------------------------
            var recEquaDistOne = parseInt(Math.pow((myShape.pathPoints[0].anchor[0] - myShape.pathPoints[2].anchor[0]),2) +
            Math.pow((myShape.pathPoints[0].anchor[1] - myShape.pathPoints[2].anchor[1]),2)); // diagonal
            var recEquaDistTwo = parseInt(Math.pow((myShape.pathPoints[1].anchor[0] - myShape.pathPoints[3].anchor[0]),2) +
            Math.pow((myShape.pathPoints[1].anchor[1] - myShape.pathPoints[3].anchor[1]),2)); // diagonal
            //---------------------4 sides of rectangle---------------
            var sideA = parseInt(Math.pow((myShape.pathPoints[0].anchor[0] - myShape.pathPoints[1].anchor[0]),2) +
            Math.pow((myShape.pathPoints[0].anchor[1] - myShape.pathPoints[1].anchor[1]),2)); 
            var sideB = parseInt(Math.pow((myShape.pathPoints[1].anchor[0] - myShape.pathPoints[2].anchor[0]),2) +
            Math.pow((myShape.pathPoints[1].anchor[1] - myShape.pathPoints[2].anchor[1]),2)); 
            var sideC = parseInt(Math.pow((myShape.pathPoints[2].anchor[0] - myShape.pathPoints[3].anchor[0]),2) +
            Math.pow((myShape.pathPoints[2].anchor[1] - myShape.pathPoints[3].anchor[1]),2)); 
            var sideD = parseInt(Math.pow((myShape.pathPoints[3].anchor[0] - myShape.pathPoints[0].anchor[0]),2) +
            Math.pow((myShape.pathPoints[3].anchor[1] - myShape.pathPoints[0].anchor[1]),2)); 
            if(recEquaDistOne == recEquaDistTwo){ // If two diagonals connecting opposite points are same length, it's a 90 degree box               
                if((sideA == sideC) && (sideB == sideD)){
                    for(var j=0; j<4; j++){
                        var point = myShape.pathPoints[j];             
                            if((point.leftDirection[0] == point.anchor[0]) &&
                                (point.anchor[0] == point.rightDirection[0]) &&
                                (point.leftDirection[1] == point.anchor[1]) &&
                                (point.anchor[1] == point.rightDirection[1])){
                                shapeKind.isrectangle = true;
                            } else {
                                shapeKind.isrectangle = false;
                                break;
            if(myShape.pathPoints.length == 4){  // CIRCLE CHECKER
                if(shapeKind.isrectangle == false || shapeKind.isrectangle == null){
                    var circlePts = new Array();
                    var circleSlopes = new Array();
                    for (k=0; k<4; k++){
                    var point = myShape.pathPoints[k]; 
                    var leftHandleDist = parseInt(Math.pow((point.leftDirection[0] - point.anchor[0]),2) +
                    Math.pow((point.leftDirection[1] - point.anchor[1]),2));
                    var rightHandleDist = parseInt(Math.pow((point.rightDirection[0] - point.anchor[0]),2) +
                    Math.pow((point.rightDirection[1] - point.anchor[1]),2));
                    circlePts.push(leftHandleDist, rightHandleDist);
                    var leftHandleSlope = ((point.leftDirection[0] - point.anchor[0])/(point.leftDirection[1] - point.anchor[1])).toFixed(2);
                    var rightHandleSlope = ((point.rightDirection[0] - point.anchor[0])/(point.rightDirection[1] - point.anchor[1])).toFixed(2);
                    circleSlopes.push(leftHandleSlope, rightHandleSlope);
                for(var f=0; f<8; f++){ // Allows non-rotated circles.
                    if(circleSlopes[f] == "-0.00"){
                        circleSlopes[f] = "0.00";
                    if(circleSlopes[f] == "-Infinity"){
                        circleSlopes[f] = "Infinity";
                var cirEquaDistOne = parseInt(Math.pow((myShape.pathPoints[0].anchor[0] - myShape.pathPoints[2].anchor[0]),2) +
                Math.pow((myShape.pathPoints[0].anchor[1] - myShape.pathPoints[2].anchor[1]),2));
                var cirEquaDistTwo = parseInt(Math.pow((myShape.pathPoints[1].anchor[0] - myShape.pathPoints[3].anchor[0]),2) +
                Math.pow((myShape.pathPoints[1].anchor[1] - myShape.pathPoints[3].anchor[1]),2));
                if(circleSlopes[0] != "NaN"){ // Filters out asymmetric rhombus  <><><>^^^^^^<><><>
                    if((circlePts[0] == circlePts[1]) && // Filters out shapes with control handles not of equal distance from anchor point.
                        (circlePts[1] == circlePts[2]) &&
                        (circlePts[2] == circlePts[3]) &&
                        (circlePts[3] == circlePts[4]) &&
                        (circlePts[4] == circlePts[5]) &&
                        (circlePts[5] == circlePts[6]) &&
                        (circlePts[6] == circlePts[7]) &&
                        (circlePts[7] == circlePts[0])){
                        if((circleSlopes[0] == circleSlopes[1]) && // Filters out the equadistant 4-pointed Star shape (dismisses negative slopes).
                            (circleSlopes[2] == circleSlopes[3]) &&
                            (circleSlopes[4] == circleSlopes[5]) &&
                            (circleSlopes[6] == circleSlopes[7])){
                            if(cirEquaDistOne == cirEquaDistTwo){ // Filters out Ellipses (non-equadistant circles).
                                // Filters out the very RARE 4-pointed star which has all control points in its center on top of each other!
                                if(((myShape.pathPoints[0].leftDirection[0]).toFixed(2) != (myShape.pathPoints[1].leftDirection[0]).toFixed(2)) &&
                                    ((myShape.pathPoints[0].leftDirection[1]).toFixed(2) != (myShape.pathPoints[1].leftDirection[1]).toFixed(2))){
                                    shapeKind.iscircle = true;
                                } else {
                                    shapeKind.iscircle = false;
                    } else {
                        if((circlePts[0]==circlePts[1]) &&
                            (circlePts[2]==circlePts[3]) &&
                            ((circlePts[4]==circlePts[5]) && (circlePts[4]==circlePts[1]) && (circlePts[5]==circlePts[1])) &&
                            ((circlePts[6]==circlePts[7]) && (circlePts[6]==circlePts[2]) && (circlePts[7]==circlePts[3]))){
                            shapeKind.isellipse=true;
    //~                     $.writeln(circlePts[0]+'\r'+circlePts[1]+'\r'+circlePts[2]+'\r'+circlePts[3]+'\r'+
    //~                     circlePts[4]+'\r'+circlePts[5]+'\r'+circlePts[6]+'\r'+circlePts[7]);
        return shapeKind;
    if(app.name=='Adobe Illustrator' && app.documents.length>0){
        function round2(num){
            return Math.round(num*100)/100;
        function convertToUIRGB(color){
            if(color=='[CMYKColor]'){
                var c=color.cyan, m=color.magenta, y=color.yellow, k=color.black;
                return [
                    round2((1-(c/100))*(1-(k/100))),
                    round2((1-(m/100))*(1-(k/100))),
                    round2((1-(y/100))*(1-(k/100)))
            } else if(color=='[GrayColor]'){
                var k=color.gray;
                var grayValue=1-(Math.round(((k/100)*255)*100)/100)/255;
                return [grayValue,grayValue,grayValue];
            } else if(color=='[GradientColor]'){
                $.writeln('Sorry, no gradient colors please.');
                return [0,0,0];
            } else if(color=='[PatternColor]'){
                $.writeln('Sorry, no pattern colors please.');
                return [0,0,0,];
            } else if(color=='[SpotColor]'){
                var clr=color.spot.getInternalColor();
                if(color.spot.spotKind==SpotColorKind.SPOTCMYK){
                    var c=clr[0], m=clr[1], y=clr[2], k=clr[3];
                    return [
                        round2((1-(c/100))*(1-(k/100))),
                        round2((1-(m/100))*(1-(k/100))),
                        round2((1-(y/100))*(1-(k/100)))
                } else if(color.spot.spotKind==SpotColorKind.SPOTRGB){
                    return [round2(clr[0]/255), round2(clr[1]/255), round2(clr[2]/255)];
                } else if(color.spot.spotKind==SpotColorKind.SPOTLAB){
                    var clr=color.spot.getInternalColor();
                    var whiteRef={
                        D65: {X: 95.047,Y: 100, Z: 108.883},
                        D50: {X: 96.422,Y: 100, Z: 82.521},
                    var illuminant='D65';
                    var Y = (clr[0]+16)/116;
                    var X = clr[1]/500+Y;
                    var Z = Y-clr[2]/200;
                    if(Math.pow(Y,3) > 0.008856){Y=Math.pow(Y,3);}
                    else {Y = (Y-16/116)/7.787;}
                    if(Math.pow(X,3) > 0.008856){X=Math.pow(X,3);}
                    else {X = (X-16/116)/7.787;}
                    if(Math.pow(Z,3) > 0.008856){Z=Math.pow(Z,3);}
                    else {Z = (Z-16/116)/7.787;}
                    X*=whiteRef[illuminant].X,Y*=whiteRef[illuminant].Y,Z*=whiteRef[illuminant].Z;
                    //alert(X+" "+Y+" "+Z);
                    X/=100,Y/=100,Z/=100;
                    R=X*3.2406+Y*-1.5372+Z*-0.4986;
                    G=X*-0.9689+Y*1.8758+Z*0.0415;
                    B=X*0.0557+Y*-0.2040+Z*1.0570;
                    //alert(R+" "+G+" "+B);
                    if(R > 0.0031308){R=(1.055*(Math.pow(R,(1/2.4))))-0.055;}
                    else {R*= 12.92;}
                    if(G > 0.0031308){G=(1.055*(Math.pow(G,(1/2.4))))-0.055;}
                    else {G*= 12.92;}
                    if(B > 0.0031308){B=(1.055*(Math.pow(B,(1/2.4))))-0.055;}
                    else {B*= 12.92;}
                    if(R<0){R=0} else if(R>1){R=1};
                    if(G<0){G=0} else if(G>1){G=1};
                    if(B<0){B=0} else if(B>1){B=1};
                    return [round2(R),round2(G),round2(B)];
            } else if(color=='[RGBColor]'){
                return [round2(color.red/255), round2(color.green/255), round2(color.blue/255)];
        function drawFromObjString(objString, canvasArea){
            function drawPath(shp){
                var thisShp=shp;
                if(thisShp.ellipsePath!=true){
                    var vectorPts=thisShp.pathPoints;
                    canvas.newPath(); canvas.moveTo(thisShp.pathPoints[0][0],thisShp.pathPoints[0][1]);
                    for(var j=0; j<vectorPts.length; j++){
                        var thisAnchor=vectorPts[j];
                        var x=thisAnchor[0], y=thisAnchor[1];
                        canvas.lineTo(x,y);
                    if(thisShp.closed==true){
                        canvas.closePath();
                } else {
                    var cirPts=thisShp.pathPoints;
                    canvas.newPath();
                    canvas.ellipsePath(round2(cirPts[0]), round2(cirPts[1]), round2(cirPts[2]), round2(cirPts[3]));
                    canvas.closePath();
                if(thisShp.fillColor!=null){
                    var clr=thisShp.fillColor;
                    var myBrush=canvas.newBrush(canvas.BrushType.SOLID_COLOR,clr);
                    canvas.fillPath(myBrush);
                if(thisShp.strokeColor!=null){
                    var clr=thisShp.strokeColor;
                    var myPen=canvas.newPen(canvas.PenType.SOLID_COLOR,[clr[0],clr[1],clr[2],1], thisShp.strokeWidth);
                    canvas.strokePath(myPen);
        //$.writeln(objString.replace(/'\+\n*\r*'/g,'').replace(/(^'|';$)/g,''));
            var obj=eval(objString.replace(/'\+\n*\r*'/g,'').replace(/(^'|';$)/g,''));
            var canvas=canvasArea.graphics;
            var counter=obj.total;
            while(counter>=0){
                for(all in obj){
                    if(all.match(/\d{1,2}$/g) && all.match(/\d{1,2}$/g)==counter){
                        var thisShp=obj[all];
                        if(all.match('group')){
                            var ctr=obj[all].total;
                            while(ctr>=0){
                                for(paths in obj[all]){
                                    if(paths.match(/\d{1,2}$/g) && paths.match(/\d{1,2}$/g)==ctr){
                                        drawPath(obj[all][paths]);
                                ctr--;
                        } else {
                            drawPath(thisShp);
                counter-=1;
        var doc=app.activeDocument;
        if(doc.height<=400 && doc.width<=600){
            doc.rulerOrigin=[0,doc.height];
            doc.coordinateSystem=CoordinateSystem.DOCUMENTCOORDINATESYSTEM;
            var wDims=function(){
                var dims={width: '', height: ''};
                if(doc.width>220){
                    dims.width = Math.round(doc.width);
                } else {
                    dims.width = 220;
                if(doc.height>20){
                    dims.height = Math.round(doc.height);
                } else {
                    dims.height = 20;
                return dims;
            function drawCapture(docArt, dataDisplay, graphicDisplay){
                function capturePathItem(pathItem, drawObj, count){
                    var thisShp=pathItem, drawData=drawObj, i=count;
                    if((thisShp.filled || thisShp.stroked) && thisShp.editable==true){
                        drawData['shape_'+i]={};
                        drawData['shape_'+i].fillColor=null;
                        drawData['shape_'+i].name=thisShp.name;
                        drawData['shape_'+i].tag=thisShp.note;
                        drawData['shape_'+i].strokeColor=null;
                        drawData['shape_'+i].pathPoints=[];
                        drawData['shape_'+i].ellipsePath=false;
                        if(itemShape(thisShp).iscircle==true || itemShape(thisShp).isellipse==true || thisShp.name=='ellipse' ||
                            thisShp.name=='circle' || thisShp.name=='cir'){
                            drawData['shape_'+i].ellipsePath=true;
                            drawData['shape_'+i].pathPoints=[Math.round(thisShp.left), Math.round(-thisShp.top), Math.round(thisShp.width), Math.round(thisShp.height)];
                            canvas.newPath();
                            canvas.ellipsePath(Math.round(thisShp.left), Math.round(-thisShp.top), Math.round(thisShp.width), Math.round(thisShp.height));
                        } else {
                            var vectorPts=thisShp.pathPoints;
                            canvas.newPath(); canvas.moveTo(Math.round(vectorPts[0].anchor[0]),-Math.round(vectorPts[0].anchor[1]));
                            for(var j=0; j<vectorPts.length; j++){
                                var thisAnchor=vectorPts[j].anchor;
                                var x=Math.round(thisAnchor[0]), y=-Math.round(thisAnchor[1]);
                                drawData['shape_'+i].pathPoints.push([x,y]);
                                canvas.lineTo(x,y);
                        if(thisShp.closed || drawData['shape_'+i].ellipsePath==true){
                            drawData['shape_'+i].closed=true;
                            if(drawData['shape_'+i].ellipsePath!=true){
                                canvas.closePath();
                        } else {
                            drawData['shape_'+i].closed=false;
                        if(thisShp.filled){
                            var clr=thisShp.fillColor;
                            var colorArray=convertToUIRGB(clr);
                            var myBrush=canvas.newBrush(canvas.BrushType.SOLID_COLOR,colorArray);
                            drawData['shape_'+i].fillColor=colorArray;
                            canvas.fillPath(myBrush);
                        if(thisShp.stroked){
                            var clr=thisShp.strokeColor;
                            var colorArray=convertToUIRGB(clr);
                            var myPen=canvas.newPen(canvas.PenType.SOLID_COLOR,[colorArray[0],colorArray[1],colorArray[2] ,1], Math.round(thisShp.strokeWidth));
                            drawData['shape_'+i].strokeColor=colorArray;
                            drawData['shape_'+i].strokeWidth=Math.round(thisShp.strokeWidth);
                            canvas.strokePath(myPen);
                // docArt is lately the layers[0].pageItems
                // draws a preview and creates a drawing data object resource.
                var drawData={total:0}; //Put drawing shapes here.  Properties: stroke (rgb color | null), fill (rgb color | null), pathPoints
                var canvas=graphicDisplay.graphics;
                vectors=function(){
                    var arr=[];
                    for(var i=0; i<docArt.length; i++){
                        var thisShp=docArt[i];
                        if(thisShp.typename=='PathItem' && thisShp.parent.typename!="GroupItem"){
                            if((thisShp.filled || thisShp.stroked) && thisShp.editable==true){
                                arr.push(thisShp);
                        } else if(thisShp.typename=='GroupItem'){
                            if(thisShp.pathItems.length>0){
                                var smArr=[];
                                for(var j=0; j<thisShp.pathItems.length; j++){
                                    var thisPth=thisShp.pathItems[j];
                                    if((thisPth.filled || thisPth.stroked) && thisPth.editable==true){
                                        smArr.push(thisPth);
                                if(smArr.length>0){arr.push(smArr);};
                    return arr;
                drawData.total=vectors.length;
                for(var i=vectors.length-1; i>-1; i--){
                    var thisShp=vectors[i];
                    if(thisShp instanceof Array){
                        var grpObj={};
                        for(var j=thisShp.length-1; j>-1; j--){
                            var thisPth=thisShp[j];
                            capturePathItem(thisPth, grpObj, j);
                        grpObj.total=thisShp.length;
                        var grpNm=function(){
                            if(thisShp[0].parent.name!=''){
                                return thisShp[0].parent.name+"_";
                            return '';
                        drawData['group_'+grpNm+i]=grpObj;
                    } else {
                        capturePathItem(thisShp, drawData, i);
                return drawData;
            function showDrawerFunc(objStringDisplay, wDims){
                var w2=new Window('dialog','Drawer Function');
                var containerG=w2.add('tabbedpanel');
                    var funcG=containerG.add('tab',undefined,'Drawer Function');
                        var dispE=funcG.add('edittext',undefined,funcSrc,{multiline:true}); dispE.size=[580,200];
                        var selBtn=funcG.add('button',undefined,'Select All');
                    var drawingG=containerG.add('tab',undefined,'Drawing:');
                        var drawG=drawingG.add('group');
                            var drawP=drawG.add('panel',undefined,''); drawP.size=[wDims.width, wDims.height];
                var msgCntr=w2.add('panel',undefined,'Message Center:');
                    var msgE=msgCntr.add('edittext',undefined,'',{multiline:true});msgE.size=[560,40];
                var btnG=w2.add('group');
                    var okBtn=btnG.add('button',undefined,'Ok',{name: 'ok'});
                selBtn.onClick=function(){
                    dispE.active=false; dispE.active=true;
                drawG.onDraw=function(){
                    if(objStringDisplay.text!=''){
                        try{
                            drawFromObjString(objStringDisplay.text, this);
                        } catch(e){
                            msgE.text=("Something isn't right:\r"+e);
                    } else {
                        msgE.text=('You must first put a valid object string into the object string display area--> "Get Source Object String" button, 1st window, 1st tab.');
                w2.show();
            function instructions(){
                var w3=new Window('dialog','instructions');
                var instructions=w3.add('edittext',undefined,'',{multiline:true}); instructions.size=[400,100];
                instructions.text="1)  Have a document open, smaller than 600x400.\r\r"+
                    "2)  Draw some stuff- use paths only, straight lines or ellipses only. To have script explicitly recognize ellipse, "+
                    "label the path 'cir', 'circle', or 'ellipse'. Right now there's a function to detect (non-rotated) ellipses, but it is coarse.\r\r"+
                    "3)  Run this script and see if your drawing was captured in the main window.\r\r"+
                    "4)  Click the 'Get Object String' button and see the drawing instruction string appear.\r\r"+
                    "5)  Click the 'View Drawer Function/Drawing' button to see the function used to draw scriptUI picture from"+
                    " the object string and use other tab to see the drawing made with this function from that object string.\r\r"+
                    "6)  Edit your string to see your picture change if needed!";
                var okBtn=w3.add('button',undefined,'OK');
                w3.show();
            var funcSrc=drawFromObjString.toSource();
            var dispWindow=function(){
                var drawData;
                var w=new Window('dialog','ScriptUI Graphics Display');
                var panel=w.add('panel',undefined,''); panel.size=[wDims.width+6,wDims.height+6];
                var list=w.add('edittext',undefined,'',{multiline:true}); list.size=[wDims.width,150];
                var formatG=w.add('group');
                    var formatH=formatG.add('statictext',undefined, 'Format:');
                    var format_returns=formatG.add('button',undefined, 'Returns before "(group|shape)_"');
                var btnsG=w.add('group');
                    var clickBtn=btnsG.add('button',undefined,'Get Source Object String');
                    var selectBtn=btnsG.add('button',undefined,'Select All');
                var btnG2=w.add('group');
                    var funcBtn=btnG2.add('button',undefined,'See Drawer Function/Drawing');
                    funcBtn.helpTip='Uses the Object String picture info to draw using ScriptUIGraphics lineTo commands.';
                    var helpBtn=btnG2.add('button',undefined,'?'); helpBtn.size=[25,25];
                panel.onDraw=function(){
                    drawData=drawCapture(doc.layers[0].pageItems, list, this);
                clickBtn.addEventListener('mousedown',function(){
                    list.text=drawData.toSource();
                format_returns.onClick=function(){
                    var str=list.text;
                    var rx=/(group|shape)_/g;
                    if(str!=''){
                        var rx=/(group_|shape_)/g;
                        var matches=str.match(rx);
                        for(var i=0; i<matches.length; i++){
                            var instance = rx.exec(str);
                            str=str.substring(0, rx.lastIndex-instance[0].length)+str.substr(rx.lastIndex-instance[0].length,).replace(ins tance[0],"'+\r'"+instance[0]);
                    list.text="'"+str+"';";
                funcBtn.onClick=function(){
                    showDrawerFunc(list, wDims);
                helpBtn.onClick=function(){
                    instructions();
                selectBtn.onClick=function(){
                    list.active=false; list.active=true;
                var okBtn=w.add('button',undefined,'OK');
                w.show();
        } else {
            alert('Please use a document with main artboard no larger than 600x400.');
    } else {
        alert('Must run in Illustrator with at least 1 document open.');
graphicsDisplay();

Similar Messages

  • Create your own graphics using Project ROME!

    Hi Romans,
    Ever want to add your own logo or graphic to your creations? Maybe you want to design a brand logo for your business or a festive turkey for your Thanksgiving cards and invitations.
    Learn more about creating vector graphics using Project ROME. Here are two tutorials on vector graphics: http://bit.ly/95QpFl and http://bit.ly/cKYfG8. And, one interesting thing to note, you can even create your own custom shapes using the paint brush tool.
    Let us know if you've enjoyed creating vector graphics in Project ROME, and if you had any trouble. We'd like to shape Project ROME with you in mind for the future!
    Thanks,
    Sarah
    Sarah
    Forum Moderator

    Romans,
    Thanks for the praise! Did you have a chance to create your own graphic after watching this video? Please do and let us know your thoughts on this feature. Was it easy after the tutorial? Were there any problems you incountered?
    Thanks again,
    Sarah
    Sarah
    Forum Moderator

  • Printing my own photos!  Does anyone know what happened to the area on the left hand side of iPhoto when you went into printing your own photos?  I used to be able to create a page of wallets and print it from my own computer and now I can't find it.Help

    Does anyone know what happened to printing your own photos in iphoto?  There used to be a thing on the left hand side of iphoto that you used to create wallets, 5x7, etc.  Now there is nothing there.  Can anyone help me?  I dont want to order stuff, i want to pirint my own.

    what version of iPhoto?
    LN

  • AP Check printing setups for printing checks on your own

    HI
    I am wondering if there a good document which deals with AP check printing with MICR and signature on your own check stock
    thanks

    Recently we started to deal with AP check printing in our organizatin. It was a daunting task with the information and resources scattered all over and missing critical pieces of information to make sense out of the whole process flow. We attempted to go through the AP check printing internally and succeded.
    I decided to post the information for the benefit of people about the our experience
    Check Printing Basics and Beyond for Printing Checks on Your Own
    by
    Sarma Chilukuri
    This article deals with what is needed to get your own checks printed. It is a first attempt to uncover all the hidden rules that one should be aware to get your own checks printed. The first section deals with the basic AP check printing setup, while the 2nd half explores some of the flow of events that make it possible to print the check.
    Part I – Basic Setup
    AP Setup for check printing
    There are multiple steps in the AP check printing. First set of steps deal with the AP side setups. The second step is to get the System side setups. The system side setup deals with printer setup and program options setups. The last step would be to make the print format files configured with the vendor provided escape sequences in the laser print format file.
    Step 1: login as Payable Manager
    Step 2: Bank Setup: Navigate to Setup: Payments > Banks
    1.     Make sure the Bank # etc are present
    2.     Tab to “Bank Accounts”, and make sure your account # has been setup
    3.     On the Bank Accounts screen, tab to the “Payables Documents” and verify that Payment format (E.g., COK Laser Format) has been entered. This “Payment format links to next section where we associate it to the right payment program.
    Fig 1. AP Payment Bank Setup Screen
    Step 3: Program Setup (Setup: Payments > Programs)
    As we know there are only 5 formats 3 of which are “Ever Green Laser” (APXPBFE G|L|F) which are explained in the AP Users Guide. For your own form printing, you have to associate the format to APXPFEL (laser format) program. Also, the APXPBFEL or APXPBFEF call the APXPBFEG, which is the base program that pulls the data from oracle base tables. APXPBFEL is the one which allows us to print the checks with MICR and signature on a plain paper not on a pre printed stationery.
    Fig. 2 AP Payment Format Setup Screen
    Printer Styles, Drivers setup
    The above process summarizes the AP Setup. As a DBA, the printer setup needs to be validated. The base install provides the right setup to some extent. But the differences in printers and print queues may add some complexity to the final configuration. The following section discusses the set up the base install provides and changes as needed.
    Step 1. Login as system Administrator
    Step 2: Style (Install : Printer > Style)
    Look for the “PORTRAITHPLJ4LASCHECK”. This one is associated with the SRW Driver Called, “APLASP” (AP Laser printer format).
    Step 3: Driver (Install : Printer > Driver).
         1. The “PORTRAITHPLJ4LASCHECK” is associated with a “User Driver” of PORTRAIT for HPLJ4 and and a SRW driver of “APLASP”
         2. Also notice that there is an Initialization string at the bottom of it. This initialization string gets called as pre-report trigger for the APXPBFEG program (APXPBFEG.rdf) file. It sets the kind of format it should be. Please see the Appendix A for details on these printer pcl code translations. The Initialization string was as follows:
    Initialization: /eE/e&l0o2a7C/e(s0P/e(8U
    Step 4: Printer type (Install : Printer > Register)
    Each printer type is associated with a set of styles. Make sure the printer that was selected has the above style and its associated driver listed against that.
    Fig. 3 System Administrator Printer Seups
    Step 5: Program Setup (Concurrent > Program > Define)
    This step holds the key for check printing. It is necessary to define whether you need the check on top followed by the Stub or the other way around. The way it is controlled is based on the APXPBFEG.rdf, the report definition file and the APLASP.prt (Printer Style associate with the Portrait laser check format SRW driver). The APLASP.prt file ($FND_TOP/reports) has two identical setups called the 100 series and the 200 series. Those identical sets of setups define where the MICR and signature print on the check. The following table lists the some of the codes in the 100 series. Please refer to Doc ID #146452.1 for complete details.
    Fig. 4 System Administrator Concurrent Program Definitions
    CODE #     Code Definition
    100     Electronic check activation string
    101     1st Check #
    102     2nd Check #
    104     Deactivate check number mode string
    111     Activate MICR line
    112     MICR Deactivation / reset the printer head position
    121     1st Signature
    122     2nd Signature
    141     Address font activation string
    199     Return to default state string
    Table 1. APLASP.prt -- MICR Activation Codes
    The above code block repeats itself the same way in the 200 series. The decision to activate one way or the other controls the Check printing.
    Step 2: Setting up the Option block
    In the concurrent program definition for the APXPBFEL, there is an Options block in the middle. You need to list the codes that you want to activate. Please refer to Doc ID # 186640.1 for some explanation on these.
    E.g.,
    p_printer_code_mask="201,211,221,241" p_sig2_amount="" p_sig3_amount="" p_sig1_vendnum="" p_sig2_vendnum="" p_sig3_vendnum="" p_country_to_ignore="US" p_continuous_stationery="N"
    Step 3: Output format is Text
    Text format is sufficient, as the printer will pick up these escape sequences anyway.
    Fig. 5 System Administrator Concurrent Program APXPBFEL Options Definition
    UIPRINT.TXT, UIFONTS.ALI
    One needs to be aware of a few more pieces in this puzzle. The UIPRINT.TXT identifies to the Oracle Applications the print queues that were setup. This file is needed to set your PCL / Post Script printer definitions. I did not have to really tinker with these files other than identifying the PCL and Post Script Q’s that were setup on the UNIX box.
    Part II: Integrating all the pieces
    The above setups are all documented in various articles. We need to understand a few more steps to see how all these pieces come together.
    What you need to know about APXPBFEG.rdf
    APXPBFEG (.rdf) is the report file which when called pulls the data from Oracle. If you open the APXPBFEG.rdf in the Oracle reports, there is initialization to the report called, SRW.Init. This will bring in the initialization string associated with the PORTRAITHPLJ4LASCHECK driver definition file. Also, please be very careful with this report format file. When you open it, there is small tiny empty block. in the first block which calls the printer initialization code 100/200 under the Format Mask (from APLASP.prt). If this portion gets changed or messed up, one can end up with some unexpected results. Each of those blocks like MICR, CHECK etc… have associated format triggers and printer codes.
    Please make sure that the printer mask is properly handled. I noticed that the 200 series MICR (211) and Signature (221) printer masks were tied to 111 and 121 respectively. These should have been 211 and 221. The other place you need to be careful was the printer code before and after is proper.
    For E.g.,
    For the MICR, the ”printer code before and after columns “ should be 111 and 112 (or 211 / 212) respectively while Format Trigger should reference to 111 (211).
    Fig. 6 APXPBFEG rdf file printer mask and Format Triggers
    The escape sequences in the APLASP.prt file for these codes will play the crucial role in getting our format around the report output that gets generated from the APXPBFEG program. Please refer to the explanation of these escape sequence codes in the APPENDIX A.
    At this point when you run the program, you will see that the formatted output report file will have all the initialization strings and the output associated with that. You can compare the fields and verify the results. Let us closely examine the parts of the 111 and 121 where the micr and signature prints. The key to this to code the escape sequences the right way to get the associate MICR and signature print out correctly.
    Fig. 7 APXPBFEG rdf file MICR printer mask and Format Triggers
    Code 111 and Code 112 from the APLASP.prt file.
    I broke the line into pieces to illustrate the exact escape sequence code.
    Code "211"
    Part 1: esc "&f0S" esc "&f0y0X" esc "&l0E" esc "&a0L"
    Part 2: esc "(8M" esc "(s0p8.00h8.0v0s0b80T" --- This will be provided by the ROM
    Cartridge provider
    Part 3: esc "&k15H" esc "*p3215Y" esc "&a13.8C"
    code "212"
    Part 1 : esc "&f1x3x8X"
    Part 2 : esc "&f1S"
    Let us go over these 2 sets of codes carefully.
    Escape Code     Meaning     Comment
    esc "&f0S"      Push Cursor Position     
    esc "&f0y0X"     Define Macro ID 0 and Start Macro Definition     
    esc "&l0E"      Define Top Margin at 0 Lines     
    esc "&a0L"      Define Left Margin at Column 0     
    esc "(8M"     8M Symbol SetNote : As per pcl codes this happens to be Font Primary JIS Math 8 symbol     MICR Part 1 : Provided by the Vendor from where you the ROM cartridge
    esc "(s0p8.00h8.40s0b0T"     {Fixed Pitch}{pitch 8.00 cpi}{Font Style 8.40}{Medium Weight}{Typeface 0}     MICR Part 2 : Provided by the Vendor
    esc "&k15H" esc "*p907Y"     Set HMI = 15/120" Vert position = 907 Dots     
    esc "&a13.8C"     Move to Column 13.8     
         CODE 112     
    esc "&f1x3x8X"     {End Macro Definition}{Call Macro}{Delete Macro ID}     
    esc "&f1S"     {Pop Cursor Position}     At this point, the MICR gets printed
    Table 2. Escape Sequences in APLAP.prt file Explanation
    Fig. 8 APXPBFEG rdf file Signature printer mask and Format Triggers
    The signature piece (221) has also similar meaning.
    Escape Code     Meaning     Comment
    esc "&f0S"     Push Cursor Position     
    esc "*t300R"     300 DPI Graphics resolution     
    esc "*p1500X"     Horiz position = 1500 Dots     
    esc "*p650Y"     Vert position = 470 Dots     
    esc "(4B" esc "(s1p53v0s0b102T"esc "&f0S!"     Symbol SetProportionalPoint Size 53UprightMedium WeightTypeface 102Push Cursor Position!     Vendor gave the us esc "(4B"esc"(s1p53v0s0b102T!"Note: the ! when the it pushes the ! and that is where it prints the signature piece. The first part forms the symbol set , say (4B and the later part forms the signature font and ! is the piece. I took the ! from the above and let it stay with the 3rd part of it so that signature does not print twice.
    esc "&f1S"      Pop Cursor Position     
    esc "*p+121Y"     Move down 121 Dots     
    esc "&f1S"     Pop Cursor Position     
    Table 3. Escape Sequences for Signature in APLAP.prt file and Explanation
    Summary
    One can print their own checks using the above steps. This can work as a cost effective solution for small organizations where the budgetary constraints are tighter. We are successful in getting the AP Checks printed using the above method.
    References
    Metalink Doc ID # 186640.1, Different Payment Formats …
    Metalink Doc ID # 60936.1, Step by Step Guide to Setup a Printer in Oracle Applications
    Metalink Doc ID # 250543.1, How to Create An Initialization String for a Payable Check Format
    Metalink Doc ID # 48680.1, Accounts Payable FAQ – Payment Batch, Check
    Metalink Doc ID # 1074792.6, Exclamation Point (!) Prints On Check When Using APXPBFEL And Cartridge
    Metalink Doc ID # 158486.1, APXPBFEL Evergreen (Long Laser)
    Metalink Doc ID # 146452.1, Listing of p_printer_code_mask Default Values for APXPBFEL
    Chapter 2, Oracle Payables user guide
    Appendix A
    APLASP.prt printer codes explanation
    code "200" esc "&l0o2a6d66p8.000c2e1x0l63f1H" esc "&k12.00H" esc "(8U"
    esc "(s0p10.00h12.00v0s0b3T" esc "&k11.75H" esc "&a1l0R" control(M) esc"&f3005y4X"
    {Portrait}
    {Letter}
    {6 LPI}
    {Define Page Length to 66 Lines}
    {Set VMI = 8.000/48"}
    {Define Top Margin at 2 Lines}
    {Select 1 Copies}
    {Disable Perf Skip}
    {Define Text Length as 63 Lines}
    {Feed from Tray 1 (upper)}
    0.1 esc "&k12.00H"
    {Set HMI = 12.00/120"}
    0.2 esc "(8U"
    {Roman-8 Symbol Set}
    0.3 esc "(s0p10.00h12.00v0s0b3T"
    {Fixed Pitch}
    {pitch 10.00 cpi}
    {Point Size 12.00}
    {Upright}
    {Medium Weight}
    {Typeface 3}
    0.4 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    0.5 esc "&a1l0R"
    {Define Left Margin at Column 1}
    {Move to Row 0}
    control(M)
    0.6 esc"&f3005y4X"
    {Define Macro ID 3005}
    {Enable Overlay}
    code "201" esc "&f0S" esc "&a1.25r70C" esc "(8U" esc "(s1p14v0s3b4148T"
    {Push Cursor Position} esc "&f0S"
    1.1 esc "&a1.25r70C"
    {Move to Row 1.25}
    {Move to Column 70}
    1.2 esc "(8U"
    {Roman-8 Symbol Set}
    1.3 esc "(s1p14v0s3b4148T"
    {Proportional}
    {Point Size 14}
    {Upright}
    {Bold}
    {Typeface 4148}
    code "202" esc "&f0S" esc "&a20.25r70C" esc "(8U" esc "(s1p14v0s3b4148T"
    {Push Cursor Position}
    2.1 esc "&a20.25r70C"
    {Move to Row 20.25}
    {Move to Column 70}
    2.2 esc "(8U"
    {Roman-8 Symbol Set}
    2.3 esc "(s1p14v0s3b4148T"
    {Proportional}
    {Point Size 14}
    {Upright}
    {Bold}
    {Typeface 4148}
    code "211" esc "&f0S" esc "&f0y0X" esc "&l0E" esc "&a0L"
    esc "(0Q" esc "(s0p8.00h8.40s0b0T" esc "&k15H" esc "*p907Y" esc "&a13.8C"
    {Push Cursor Position}
    11.1 esc "&f0y0X"
    {Define Macro ID 0}
    {Start Macro Definition}
    11.2 esc "&l0E"
    {Define Top Margin at 0 Lines}
    11.3 esc "&a0L"
    {Define Left Margin at Column 0}
    11.4 esc "(0Q"
    {0Q Symbol Set}
    11.5 esc "(s0p8.00h8.40s0b0T"
    {Fixed Pitch}
    {pitch 8.00 cpi}
    {Font Style 8.40}
    {Medium Weight}
    {Typeface 0}
    11.6 esc "&k15H" esc "*p907Y"
    {Set HMI = 15/120"}
    {Vert position = 907 Dots}
    11.7 esc "&a13.8C"
    {Move to Column 13.8}
    code "212" esc "&f1x3x8X" esc "&f1S"
    {End Macro Definition}
    {Call Macro}
    {Delete Macro ID}
    12.1 esc "&f1S"
    {Pop Cursor Position}
    code "221" esc "&f0S" esc "*t300R" esc "*p1500X" esc "*p470Y"
    esc "(30C" esc "(4B" esc "(s1p53v0s0b102T!"
    esc "&f0S!" esc "&f1S" esc "*p+121Y" esc "&f1S"
    esc "&f0S"
    {Push Cursor Position}
    21.1 esc "*t300R"
    {300 DPI Graphics resolution}
    21.2 esc "*p1500X"
    {Horiz position = 1500 Dots}
    21.3 esc "*p470Y"
    {Vert position = 470 Dots}
    21.4 esc "(30C"
    {30C Symbol Set}
    21.5 esc "(4B"
    {4B Symbol Set}
    21.6 esc "(s1p53v0s0b102T!"
    {Proportional}
    {Point Size 53}
    {Upright}
    {Medium Weight}
    {Typeface 102}
    21.7 esc "&f0S!"
    {Push Cursor Position}
    21.8 esc "&f1S"
    {Pop Cursor Position}
    21.9 esc "*p+141Y"
    {Move down 121 Dots}
    21.10 esc "&f1S"
    {Pop Cursor Position}
    code "222" esc "&f0S" esc "*t300R" esc "*p1500X" esc "*p650Y"
    esc "(30A" esc "(s0p.426h35.25v0s0b128T" esc "&f0S!"
    esc "&f1S" esc "*p+141Y" esc "&f1S"
    {Push Cursor Position}
    22.1 esc "*t300R"
    {300 DPI Graphics resolution}
    22.2 esc "*p1500X"
    {Horiz position = 1500 Dots}
    22.3 esc "*p650Y"
    {Vert position = 650 Dots}
    22.4 esc "(30A
    {30A Symbol Set}
    22.5 esc "(s0p.426h35.25v0s0b128T"
    {Fixed Pitch}
    {pitch .426 cpi}
    {Point Size 35.25}
    {Upright}
    {Medium Weight}
    {Typeface 128}
    22.6 esc "&f0S!"
    {Push Cursor Position}
    22.7 esc "&f1S"
    {Pop Cursor Position}
    22.8 esc "*p+141Y"
    {Move down 141 Dots}
    22.9 esc "&f1S"
    {Pop Cursor Position}
    code "241" esc "&a-100V" esc "&l5.8C" esc "(8U" esc "(s0p12.00h10.00v0s3b3T" esc "&k11.75H"
    41.0 esc "&a-100V"
    {Move up 100 Decipoints}
    41.1 esc "&l5.8C"
    {Set VMI = 5.8/48"}
    41.2 esc "(8U"
    {Roman-8 Symbol Set}
    41.3 esc "(s0p12.00h10.00v0s3b3T"
    {Fixed Pitch}
    {pitch 12.00 cpi}
    {Point Size 10.00}
    {Upright}
    {Bold}
    {Typeface 3}
    41.4 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    code "299" esc "(8U" esc "(s0p10.00h12.00v0s0b3T" esc "&k11.75H" esc "&l6D"
    {Roman-8 Symbol Set}
    99.1 esc "(s0p10.00h12.00v0s0b3T"
    {Fixed Pitch}
    {pitch 10.00 cpi}
    {Point Size 12.00}
    {Upright}
    {Medium Weight}
    {Typeface 3}
    99.2 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    99.3 esc "&l6D"
    {6 LPI}

  • Using your own router

    Good day all,  I would like to hear from others who use their own routers to connect to Verizon Fios.  Are there any pro's or con's to using your own?  Will your connection be more secure using Verizon's equipment or your own.  Any difference in speeds noted?  Thank for your opinions.

    Just got FiOS today and faced the same issue. I need to keep the Actiontec router for the TV STBs, but it has not the same features as my D-Link 655. There are instructions online on how to turn the Actiontec into a network bridge, but that may interfere with services.
    Here is what I did:
    1. Change the IP of the Actiontec router to something different than the 192.168.1.1 so that it doesn't interfere with your existing router (unless your router already uses a different IP, then you can skip this). I followed the instructions from here: http://www.dslreports.com/forum/r20329726-northeast-how-to-change-the-default-IP-on-Actiontec-M1424W...
    Note 1: Once you change the address you need to reconnect to the other IP address!
    Note 2: You also need to change the DHCP range on the Actiontec to no longer include the new IP. This can be changed on the same page.
    2. Make sure that you power cycle the STBs, otherwise they still look for the router on the old address
    3. Plug your router of choice in and connect one of the LAN ports of the Actiontec to the WAN port of your router
    4. You now should be able to access Internet through your router.
    I use DynDNS so that I can remote into a system at home using a domain name. If you have such a setup be aware that the web admin of the Actiontec will be accessible from the Internet!
    I fixed that by
    1. Setting the Actiontec's firewall to the lowest setting
    2. Forwarding all TCP and UDP ports to my router except for the port 4567. That apparently is used by something for Verizon (the TV STBs??), so you may need to create multiple forwarding rules. If you choose custom ports you can specify a range, which is really nice. This way all traffic except for port 4567 hits my router and either goes where I forwarded the ports to or goes nowhere as there is no service.
    This setup should provide the best of both worlds. I say should as I yet have to test it for a while,but so far things are working out OK.
    If you have your own wireless and don't need the wireless from the Actiontec then turn the wireless off on the Actiontec and detach the antenna.

  • I got an iphone from Hong Kong which is locked one. Can anyone explain me what does a locked iphone means. How do I use it in India now, with my own sim card. How do I unlock it???

    I got an iphone from Hong Kong which is locked one. Can anyone explain me what does a locked iphone means. How do I use it in India now, with my own sim card. How do I unlock it???

    If your iPhone is locked to a wireless provider, only that wireless provider
    can unlock it. Contact the wireless provider in Hong Kong to see if they
    offer unlocking and if you qualify.
    If your iPhone is locked to an AppleID that you do not know, return it for
    a refund as it is useless. Only the person whose AppleID was used for
    activation can remove the lock. There is no workaround for Activation Lock.
    If neither of the above is what you are facing, provide more detail so someone
    may offer a solution.

  • I am running 4 ipod classica through one computer and one itunes account/profile.  The ipods belong to me, husband and 2 kids.  How can the kids now get their own accounts but keep the stuff I have already downloaded for them?  They have their own laptops

    I am currently running 4 ipod classics through my own account/profile on itunes.  They belong to me, my husband and 2 kids. 
    The kids are getting older now and have their own laptops.  I would like them to have their own itunes accounts as they will be away from home much of the time and will want to make their own puchases. 
    How can I set them up so that they are independent from my account, but not lose the content that I have downloaded for them over the years?  (A lot of content).

    You and your husband can share a store account and still have seperate iCloud accounts for your contacts, bookmarks and stuff like that.  Click here for instructions to make an apple account without entering a credit card.  Make sure you use a different email address for each apple account. 
    Set up your iPhone/iPad whatever using the new account for iCloud.  Then go into settings/store and sign in with your purchasing account, you may need to sign out of the other account.  To the best of my knowledge, your household is allowed to share purchased legally, someone please correct me if I'm wrong.
    Once you each have your own devices set to your own accounts you can set them to backup to that account and it will keep all your contacts seperate.

  • HT204053 My wife and I have one Apple ID through which we have individually purchased apps using our own iPads. We both now have our own iCloud accounts. How do we separate the original apps between the two iCloud accounts? Will we lose any apps in the pr

    My wife and I have one Apple ID through which we have individually purchased apps for her iPad and my iPad 2. We both now have individual iCloud accounts, and she now has an iPhone. For business reasons we now have to separate the apps under our individual iCloud accounts, but will maintain a single Apple ID for purchases. How can we separate the apps?

    Hi Shadow,
    The apps are forever tied to the Apple ID that they were purchased under. Your iCloud accounts are also Apple IDs, so although you can sync the apps to your individual device via iTunes, you will be syncing them to the devices, not to iCloud.
    Since you are still purchasing everything under one Apple ID, then I'm presuming that they live in a single iTunes library on your computer or Mac? If that is the case, then you would just want to:
    Hook up a device to the Mac or computer
    Select the device when it shows up under devices
    Once selected, the Device Profile screens display to the right - click on the Apps tab, and select which ones you want on that device.
    Also check all the other profile pages to make sure they are set up to sync the things you want to sync to that device.
    On the info page, you will see that you can sync Contacts & Calendars via iCloud or via iTunes. If you want a single source for contacts & calendars for both of your devices, sync them via iTunes. If you want your own sets of contacts & calendars, sync them via iCloud.
    Do you have iCloud set up on the computer or Mac? If so, which iCloud account are you planning on using?
    Some of the decisions you will want to make will depend on how you have your computer or Mac configured in conjunction with iTunes. One Apple ID, but one or two User Accounts for the computer or Mac? iCloud on the computer or Mac? What do you want to share and to not share?
    Post back with any questions.
    Cheers,
    GB

  • Use your own iOS app on your own iOS device without buying a developer program.

    This is no question; it is simply a request that you make it possible for people with the free developer program to use their own iOS apps that they built themselves without having to pay $99 a year.
    This is because loads of people want to build small apps for themselves, and can do so easily now that Xcode is free on the AppStore. The main problem with this is that they have to pay to simply do this.
    So this is in a way a petition for all you people who are the same; who have written your own iOS apps for your personal use only, apps that shall not be distributed and only serve to show what you can do or help a family game to get Apple to make this small thing possible for you (us).
    So please post here if you want the same.
    Thank you.

    As always, feel free to use Report a Bug for any samples, doc additions, feature requests or enhancements you'd like to see as well. Add your BR# to this thread for reference, thanks.
    But I wouldn't hold my breath on this one....it would only result in immediate scams.

  • Make your own Fax Server with Automator! (Pagesender solution for Mavericks)

    I have been scouring these discussion boards for some time now looking for a suitable substitute to PageSender, an awesome fax solution for the Mac from SmileOnMyMac LLC, which for some inexplicable reason stopped development and updates after OS 10.6.8. The result is that many small business office users who still rely on fax (and yes...no matter what they tell you, most of the business world DOES still use fax because it's legally binding and more secure than email for the transmission of legal documents or healthcare records, and does not rely on database integration accross different systems, which is sadly but very realistically still a long ways off), and no longer have a way to integrate faxes into a paperless or digital workflow office system.
    I suspect like many folks who receive faxes, those who used PageSender, used a very powerful feature to forward faxes by email, thereby turning your Mac into a Fax server that could distribute your faxes to other workstations and staff throughout the business via email. Presumably, if you have your own email server (Exchange, Kerio, AppleMail server, PostFix enabler etc.) you could distribute faxes on your own internal network, securely behind a firewall, and effectively create a digitial/paperless workflow for your faxes.
    Even if you have a USB modem or multifunction printer that allows you to recieve a Fax to your desktop (Apple's internal fax via printer preferences, and some HP models like the HP MFP 127fw) for example will allow you to recieve a Fax to a desktop folder or forward to a single email address. But the former is of limited functionaliy and the later only lets you send to an email address out over the internet with a registered public domain, which means you give up all control of privacy and means you can't process it through a private mail server to create a digital workflow for your office...
    ...Until now!!!
    I am happy to report that I have finally discovered a very easy and useable feature that will save a lot of time, money, and headaches for those looking to create a digital workflow and fax server system for a small office system. (I don't think there is any limit to scale here, but I suspect offices with more than 10 employees probably have a BizHub, or HP MFP/digital sender that can create the same process directly from the printer, but of course these come with a price tag of $2000 and up...).
    To accomplish this however, you will need some basic requirements which are as follows:
    1) A USB modem from either US Robotics or Zoom Modem. These are readily available from Amazon, MacMall or any number of other online vendors and work very well and seemlessly with all Macs running OSX right up through Mavericks
    OR
    A Multifunction printer that is capable of receiving faxes to a desktop Mac like the HP 127 fw. Other models exist from other manufacturers as well, but you will have to do a bit of research and probably check with the vendor or user manual directly to confirm that Fax to desktop is supported for Mac and OS 10.9.
    2) A dedicated Mail Server (MSFT Exchange, Kerio, MacOSX server with mail server enabled, or PostFix enalber or MailServe from Cutedge Systems)
    You will need to set up an email account on your server that is the parent for all incoming faxes from which the faxes will be sent out as part of your digital workflow. This is beyond the scope of this discussion but if you've come this far and you're still reading, you probably know  how to do this already. I recommend setting this up as a POP account, not IMAP. This way, the attatchments (your faxes) will always remain on your server as a back up, until you delete them from the server.
    3) Now simply go to System preferences and select "Printers and Scanners". Select either the Fax printer for your multifunction printer, or add a fax printer/reviever using the + button and select "Fax" if you are using a USB modem. You must have the USB modem attatched to the computer in order to use the built-in Apple Fax feature for the latter option.
    4) Now click on the receive options. Select "Recieve faxes to this computer" and set your ring answer settings. Check "Save to" and select the designated folder (either Faxes or Shared Faxes on your computer) or create a new folder. Depending on the volume of faxes, and your back up systems, you may want to designate a separate folder on a separate drive, exclusively for your Faxes. This is where all your faxes will be stored.
    5) Now launch "Automator" in your applications folder and create a new workflow. You will be presented with several options. Select "Folder Action".
    6) At the top right of the window space you will see "Folder Action receives files and folders added to" . Select the Fax folder you created in step 4.
    7)On the left hand side of the "Actions" menu select "Mail"
    8) From the list of actions select "New Mail Message" this will take the latest Fax added to your Fax folder and attach it as a PDF to a new outgoing mail. In the "TO" address put the email address that belongs to the parent account your created for the Faxes on your mail server eg. [email protected].  In the subject field you can put "Fax Workflow" or any other generic subject that will identify to all reciptients that this is an email that contains a Fax/PDF attatchment.
    Under "account" use the SMTP account you set up on your mail server to handle the routing of internal emails. In most cases, this will be the same as the parent account created above. (Effectively, this account is sending and receiving emails to itself).
    9) From the list of actions, select "Send outgoing messages".
    10) Save the Automator workflow with a name like "FaxDistribution" or "FaxFlow".
    11) Go back to the Fax folder you created in step 4. Right click or option click on the folder and scroll down the options menu and select "Folder Actions Setup". You will see a list of scripts including the Automator workflow you just created. Choose it.
    That's it!! From now on, when you get a fax, it will get dumped into the designated fax folder, and this will automatically trigger the workflow to atttach and send it as an email to anyone in your office that is set up to receive emails with the "faxserver" address. You now have a paperless fax digital workflow server system for distributing your faxes digitally to anyone in your office who needs to review your faxes. Good luck!

    Thank you for this interesting posting.

  • Steps to create your own self signed certificate with java plugin working

    You need two tools that comes with your jdk which are keytool and jarsigner.
    Steps explain below in detail. Don't use netscape signtool, it will NEVER work!
    * keytool -genkey -keyalg rsa -alias tstkey -keypass 2br2h2m -dname "cn=Test Object Signing Certificate, o=AI Khalil, ou=Java Products, c=AU"
    cn = Certificate name
    o = organistation
    ou = organistation unit
    c = country (first two letters)
    If don't put the -dname, you can fill it line by line.
    The -keypass has to be verify at the end, and you have to wait for it to create the rsa signing keys.
    On NT by default it will put the alias information at D:\WINNT\Profiles\Administrator (if log in as administrator) with the default file called ".keystore". Windows 98 etc, don't know, search for .keystore
    file. When you update it, check for the timestamp change and you know if you at the right spot.
    You can store your alias information via the -storepass option to your current directory you work on, if you don't want to update the default .keystore file?
    The .keystore contains a list of alias so you don't have to do this process again and again.
    Another tip if you want your certificate encryption validity to be more than the default one month is simply
    add the -validity <valDays>, after the -genkey option, to make your certificate usage for encryption to last much longer.
    Note: You MUST use the -keyalg rsa because for starters the rsa encyption alogorthim is supported on ALL browsers instead of the default DSA and the other one SHA. Java plugins must work with the RSA algorthim when signing applets, else you will get all sorts of weird errors :)
    Do not use signtool because thats a browser dependant solution!! Java plugin is supposed to work via running it owns jre instead of the browser JVM. So if you going to use netscape signtool, it starts to become a mess! ie certificate will install, but applet won't start and give you funny security exception errors :)
    * keytool -export -alias tstkey -file MyTestCert.crt
    It will read the alias information in the .keystore information picking up the rsa private/public keys info and
    create your self sign certificate. You can double click this certificate to install it? But don't think this step is needed but maybe for IE? Someone else can check that part.
    If you make a mistake with the alias, simply keytool -delete -v -alias <your alias key>
    If not in default .keystore file, then simply keytool -delete -v -alias <your alias key> -keystore <your keystore filename>
    * Put your classes in your jar file, my example is tst.jar.
    * jarsigner tst.jar tstkey
    Sign your testing jar file with your alias key that supports the RSA encryption alogorthim.
    * jarsigner -verify -verbose -certs tst.jar
    Check that its been verified.
    The last step is the most tricky one. Its to do with having your own CA (Certified Authority) so you don't
    have to fork out money straight away to buy a Verisign or Twarte certificate. The CA listing as you see in
    netscape browsers under security/signers, is NOT where the plugin looks at. The plugin looks at a file called
    CACERTS. Another confusion is that the cacerts file is stored in your jre/lib/security AND also at your
    JavaSoft/Jre/<Java version>/lib/security. When you install the Java plugin for the first time in uses your
    JavaSoft folder and its the cacerts file that has to be updated you add your own CA, because thats where
    the plugin look at, NOT THE BROWSER. Everything about plugin is never to do with the browser!! :)
    * keytool -import -file MyTestCert.crt -alias tstkey -keystore "D:\Program Files\JavaSoft\JRE\1.3.1\lib\security/cacerts"
    Off course point to your own cacerts file destination.
    Password to change it, is "changeit"
    Before you do this step make a copy of it in its own directory in case you do something silly.
    This example will add a CA with alias of my key called "tstkey" and store to my example destination.
    * keytool -list -v -keystore "E:/jdk/jdk1.3/jre/lib/security/cacerts"
    List to see if another CA is added with your alias key.
    Your html, using Netscape embed and Internet explorer object tags to point to the java plugin,
    your own self sign applet certificate should work
    Cheers
    Abraham Khalil

    I follow Signed Applet in Plugin, and it's working on
    my computer. Thanks
    But When I open my applet from another computer on
    network, why it does not work ..?
    How to make this applet working at another computer
    without change the policy file ..?
    thanks in advance,
    AnomYou must install the certificate on that computers plugin. Can this be done from the web? can anyone suggest a batch file or otherwise that could do this for end users?
    I want a way for end users to accept my cert as Root or at least trust my cert so I dont have to buy one. I am not worried about my users refusing to accept my cert. just how do I make it easy for them? IE you can just click the cert from a link, but that installs for IE, and not the plugin where it needs to be.

  • How can you add your own print and export buttons to the CR viewer toolbar?

    I posted a previous question that was asking how to get around the Information Bar in IE7 when you export and print.  Unfortunately the CR viewer file download code gets blocked by IE7 because the buttons don't directly download the file.  However, I have been able to get a regular button that calls the following code and streams the file to the client and IE7 does not block it. 
    Sub PrintPDF(sender As Object, e As System.EventArgs)
         Dim crReportDocument as ReportDocument
         Dim crExportOptions as ExportOptions
         Dim crDiskFileDestinationOptions as DiskFileDestinationOptions
         Dim Fname as string
         CrReportDocument = New ReportDocument()
         CrReportDocument.Load(Server.MapPath("estactionlist.rpt"))
         Fname = Server.MapPath("./") & Session.SessionID.ToString & ".pdf"
         CrDiskFileDestinationOptions = New DiskFileDestinationOptions()
         CrDiskFileDestinationOptions.DiskFileName = FName
         CrExportOptions = crReportDocument.ExportOptions
         With crExportOptions
              .DestinationOptions = CrDiskFileDestinationOptions
              .ExportDestinationType = ExportDestinationType.DiskFile
              .ExportFormatType = ExportFormatType.PortableDocFormat
         End With
         CrReportDocument.Export()
         Response.ClearContent()
         Response.ClearHeaders()
                    Response.AddHeader("content-disposition", "attachment;filename=test.pdf")
                    Response.ContentType = "application/pdf"
                    Response.Charset = ""
                    Response.WriteFile(Fname)
                    Response.Flush()
         Response.Close()
         System.IO.File.Delete(Fname)
    End Sub
    So here are my questions?
    1. Is it possible to add a custom print control/icon to the CR viewer toolbar?
    2. If one is not possible, then is it possible to override the CR viewer print and export buttons with your own subroutines like the one above?
    I just want my page to look nice and hate to have print and export buttons outside of my CR viewer. 
    Thanks,
    Kevin

    It might be possible to replace the buttons in a windows app since you can retrieve the toolbar as a toolbar object in the winform viewer  ( ToolStrip toolBar = (ToolStrip) crystalReportViewer1.Controls[3]; )  however with a web app, it's a lot more difficult.
    The problem is that that you need to parse the Request string to try and figure out if the print / export button was clicked.  The code below makes the print button disappear if you click it, so you should be able to modify it to call your custom printing / exporting code instead  (You have to do this check in a postback)
            Dim I As Integer = 0
            If Request.Form.AllKeys.Length > 0 Then
                For I = 0 To Request.Form.AllKeys.Length - 1
                    Response.Write(Request.Form.Keys(I).ToString & "<BR>")
                    If Request.Form.Keys(I).ToString = "CrystalReportViewer2:_ctl2:_ctl2.x" Then
                        CrystalReportViewer2.HasPrintButton = False
                    End If
                Next
           End If
    Shawn

  • You can't access your own content from the top menu anymore?

    Apple made a monumental FAIL decision for me regarding the new Apple TV.
    They really want to force feed their iTunes store to us so badly that they have now stripped all of your own content from the main menu.
    No longer can you go to TV Shows and watch... well, YOUR TV shows. Apple buried all of your personal content a couple of menus deep. In fact, the entire Music category is Now gone! Unbelievable!
    And I can't use album covers for a screen saver anymore? That was a great feature! i guess they don't want music associated with a TV device. Very bad decision in my opinion.
    This unit is a step BACK, not forward.
    Am is missing something? is there a way to get this content back to the front so I can easily access my stuff?

    Frozo wrote:
    Apple made a monumental FAIL decision for me regarding the new Apple TV.
    agreed
    They really want to force feed their iTunes store to us so badly that they have now stripped all of your own content from the main menu.
    agreed. the appletv is now an itunes store device (with your own content as a side issue).
    No longer can you go to TV Shows and watch... well, YOUR TV shows. Apple buried all of your personal content a couple of menus deep. In fact, the entire Music category is Now gone! Unbelievable!
    agreed
    And I can't use album covers for a screen saver anymore? That was a great feature! i guess they don't want music associated with a TV device. Very bad decision in my opinion.
    agreed
    This unit is a step BACK, not forward.
    agreed
    Am is missing something? is there a way to get this content back to the front so I can easily access my stuff?
    you're not missing anything unfortunately.

  • How To Use Your Own Router with Out Loosing Verizon's FIOS Services

    How to use your own router with Verizon’s FIOS Service
    First, you need a basic understanding of how FIOS works but unfortunately there are two types of FIOS systems out there. All of the systems utilize a fiber optic cable to bring TV, phone and internet to your location over one optic cable. In addition these systems provide interactivity including widgets, remote DVR, movies on demand and so forth via an IP (Internet Protocol) signal.  Your STB (Set Tip Box) requires both a video and IP signal. The IP signal is necessary for all of the aforementioned interactivity.  The fiber cable terminates at the Optical Network Terminal or ONT for short.  The ONT converts the optics into a digital signal that can be utilized by ones equipment.  From the ONT your video, phone and internet are provided to the location.  This is where things can differ as the internet signal can be provided via a coaxial (MoCA or Multimedia over Coax Alliance) or RJ45 Cat5 (Ethernet) cable.  It is important to identify and understand the differences of these two setups.  In my case I have my internet entering via Ethernet cable, which in my humble opinion makes things a heck of a lot easier.
    How does one tell the difference? In most cases it’s rather simple; just look at the Verizon’s router WAN (Wide Area Network) Port.  Does it have a RJ45 (Ethernet) or Coax (TV cable Cord) going to it? If the router’s WAN port doesn’t have a coaxial connector then one will need to convert the MoCA signal into a usable Ethernet signal that routers understand. The easiest way is to use Verizon’s router as a bridge. In this method the Verizon’s router simply converts the signal and passes it along to your own router. The challenge is to try to maintain the interactivity that FIOS TV provides. Because of this one needs to supply the IP routed signal back to the FIOS router.  There are multiple methods for doing this and I would recommend investigates which one make the most sense.   
    In my particular case the IP signal was provided by Ethernet.  Again there are various ways of installing one’s own router. The hardest is to utilize Verizon’s router as a bridge.  This setup requires configuring Verizon’s router as a bridge and also creating a VLAN (Virtual Local Area Networks). In addition one needs to set up their own router so it will work with the various routing tables and networks. For me this is too complex for the average person and it can be difficult to trouble shoot if something goes wrong. Please consider that Verizon will not support utilizing third party routers.   
    The easier method is to request an Ethernet signal (if you don’t already have one) from their ONT.  I would highly recommend getting your hands on a NIM or Network Interface Module. This device is used to convert Ethernet to Coaxial so it can be fed back to your STBs.  These can be purchased online and Verizon technicians can be a valuable resource with these sorts of acquisition.  At the very least they can point you to the right direction.  Once you have a NIM the rest is rather simple.
    Log into the current Verizon Router.
    Located the router’s MAC address and copy it down.
    Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.
    Look at your current device list, typically found on the home screen. Copy down your STB MAC and IP address.
    Example:
    IP-STB1
    Connection Type: Ethernet
    * IP Address: 192.168.1.100
    IP Address Allocation: DHCP
    *MAC Address:                07:73:fFe:ad:8b:3f
    * Things you will need to write down
    Go to the network section and look for the main Ethernet connection.  Select this and then select more setting, typically found at the bottom. Release the current lease.
    Remove the Verizon router
    Install your router
    Connect the NIM by plugging in an Ethernet from one of the routers LAN (Local Area Network) ports to your NIM. Then connect the coax cable, the same cable that was used by Verizon router.
    Set you DHCP routing IP pool to accommodate Verizon’s STB IP’s  (note their IP’s start at 192.168.1.100)
    Go to DHCP section and reserve the STB IP’s by inserting the IP’s and MAC addresses. This shall ensure that nothing else utilizes the same IPs as the STBs thereby preventing IP address conflict.  
    Add the port forwards from Step 5 above.
    Clone Verizon’s Mac Address utilizing the info from step 2
    Finish setting up the router in typical fashion.
    Unplug and re-plugin your STB’s and test functionality.  It’s best to try using a widget or Movie on demand function.
    Note: if the new router can net get an internet signal contact Verizon’s support and have them release the IP and reset the ONT.  
    EVERYTHING should be working at this point.

     3 Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.G
    Your display obviously is not like mine as mine does not dosplay the port associated with the ip address
    whatever, the STB's start at 192.168.1.100 and icement by 1 for each
    the port addr's will be 63145 alo incrementing by 1
    there is 1 entry for each in my pf list
    however each ip addr also has a port entry starting at 35000 also incrementing by 1 for each ip addr
    For some unknow reason these are duplicated e.g I appear to have 11 entries exaactly the same for each stb and as the fios services rules have no action switc there is nowhere to delete the extraneous garbage.
    Why do you clone the mac addr??

  • HT1296 was using my daughters itunes account and now have my own. If I "erase and sync" will I lose my data from my purchased games? I have transferred apps and backed up to my computer.

    was using my daughters itunes account and now have my own. If I "erase and sync" will I lose my data from my purchased games? I have transferred apps and backed up to my computer.

    One computer iTunes can support multiple Apple IDs.  One iPod can also support multiple IDs.  Don't do an "erase and sync."  Simply add your Apple ID to the computer's iTunes and to the iPod.  The only nuisance is app updating, especially if you do the updates from the computer, rather than from the iPod.

Maybe you are looking for

  • Perfomance of oracle report

    Hi, I am working on a oracle report. the report performance is very slow. Based on the requirement i have designed my data model in such a way that i used many formula columns & summary columns... Can some let me know how to tune the report. and incr

  • Itunes wont connect to Itunes Store or Nike+?!?

    Hi, first time on the forums, need some help. Im running windows vista, unfortunately, and I cant seem to connect to either the Store or sync my Nike+ data due to a network timeout error. Ive cleared my DNS, the cookies and cache, as well as checked

  • File Name and Target Directory name issue in FTP CC

    Hi All , I am using following code to assing file name and directory name in UDF. I don;t want these parameters to be part of my target structure. Since i have created these files names in UDF, what are the values do i need to mention in FTP CC's "Fi

  • ORDER BY timestamp column as a string

    Does any one have any tips/tricks for using an ORDER BY clause for a timestamp column that is a string? I am developing a UNION query that combines data from a table and an audit history table to show current data plus historical data. I had to conve

  • Firefox incorrectly finds part of a word when searching for a term

    Dear Sir/Madam I was just searching for articles about "sage" (the herb), and at the site http://www.earthclinic.com/CURES/sweat.html there's the following section: "08/30/2009: Ckn1234 from Brooklyn, Ny replies: "I had the ETS surgery too and have s