This content has been marked as final.
Show 1 reply
-
1. Re: select next folder not consecutive
Gonterman1201 Jul 10, 2014 12:03 PM (in response to Gonterman1201)mySkipGroup.addBtn.onClick = function(){ myPgLoc=app.document.presentationPath.slice(0,-3); myPgNum=app.document.presentationPath.slice(-3); myPgNum=Number (myPgNum)+1; myPgNum = myPgNum.toString(); pgLocIndex=myPgLoc.slice(0,-14); direct=myPgLoc.slice(0,-50); folderIndx=new Folder([pgLocIndex]); folderIndx=folderIndx.getFiles(); for (i=0; i<folderIndx.length; i++){ var myF = folderIndx[i]; if(app.document.presentationPath.match (myF)){ myPgNum=folderIndx[++i]; myPgNum2=myPgNum.toString(); break;} } if(pgInput.text!=""){ pgtoSkip=pgInput.text; if (pgtoSkip.length==3){ pgtoSkip=pgtoSkip; } if (pgtoSkip.length==2){ pgtoSkip=("0"+pgtoSkip); } if(pgtoSkip.length==1){ pgtoSkip=("00"+pgtoSkip); } app.document.setPresentationMode("browser",myPgLoc+pgtoSkip); } else{ //alert(direct+myPgNum2); app.document.setPresentationMode("browser",direct+myPgNum2); } }This is the solution that I came up with to my problem. I created an array of items from the folder then use the path from the next in the array. So if the next folder is 0000-4 or 0000-12 it goes to the next folder whether its 12 or 14 it goes to next.

