algorithm check
I am intersted in developing a script which will allow the user to target any layer from the document's layer panel and turn its visibility on/off with a keyboard shortcut. Can someone plase check the logic of the algorithm. I plan on executing the script using the if else and for loop. I am not sure if there is a better way to achive the script bhavior.
many thaks
Description:
The script checks the layer panel for a sepcific layer name and
toggles the visibility of the layer name on/off using a keyboard shortcut.
The script tests for the presence of at least one layer in adition of the background layer and
alerts the user when the ducument does not have enough layers.
The script alerts the user if the name of the layer is incorrect.
Algorithm:
1-Test for document with atleast one art layer
2-Alert user if document does not contain any art layers
3-Decalre variable for artLayerName
4-Decalre for loop condition for artLayerName
5-Pass artlayerName varaible to for loop condition
6-Cycle through document layers
7-If for loop condition true
8-Toggle artLayerName on/off
9-If for loop condition false alert user: artLayerName is not present on layer panel