0 Replies Latest reply on May 2, 2016 11:32 AM by clutch-cargo

    Help convert script to VBScript

    clutch-cargo Level 1

      As I learn VBscript I notice most script examples here tend to be in Javascript.  I am trying to create a script to select all PageItems in a layer and re-size the StrokeWidth but having no luck.  I figure if I can study something close to it I might catch on.  I came across this post way back in 2010.  Could someone be so kind as to convert these to VBscript in order for me to study them as examples?

       

       

       

      function GetSelPfade(){
      var pf=app.activeDocument.pathItems;
      var p=new Array();
      for(i=0;i<pf.length ;i++){
      if(pf[i].selected==true){
        p.push(pf[i]);
      }
      }
      return p;
      }

      layers[n].hasSelectedArtwork = true;

      var p=GetSelPfade();

      layers[n].hasSelectedArtwork = false;

       

      and this one:

       

       

      for(i=0;i<layerRef.pageItems.length;i++){
      layerRef.pageItems[i].selected=true;
      }

       

      Many thanks...