Hi,
I am new to arrays and need a little help, I am using the below code to return a array of printers installed, then I need to loop through the array to see if a specific printer is installed. I am not sure where to go from here.
//Get all the printer names in an array
var printersArray = application.getPrinters();
Hi Phil,
Usually a quick Google search does the trick in these cases
But here is an example of looping through the array:
//Get all the printer names in an array
var printersArray = application.getPrinters();
// Arrays are 'zero' based. In other words they start at 0
for ( var i=0 ; i < printersArray.length ; i++ )
{
var oPrinter = printersArray[i] // will address instance i in the array
}
Hope this helps.
Thanks Robert,
That works a treat, really appreciate your help