May 25, 20169 yr Greets, all: I'm looking for a way to simplify a scripted Send Event request (after a Perform Applescript request to open a path to the appropriate folder elsewhere on a Windows server) to open Excel files where not only is their location not precisely known within six folders (Let's just name them Alpha, Bravo, Charlie, Delta, Echo and Foxtrot.) but the filename and extension (.xls vs. .xlsx) are in question, too. Here are the different permutations of the filenames ( FN = First Name, LN = Last Name): FN LN (no StudentID) + .xls FN LN (no StudentID) + .xlsx FN LN + StudentID + .xls FN LN + StudentID + .xlsx On the surface, it looks like a massive looping operation to first open folder (Alpha), loop through different Send Event different permutations, and if the file isn't found there (using Error Code 100 [File is missing] as a test) then look in folder Bravo, look for the different permutations, and so on until the looping function quits after the sixth folder. (However, once a path is found to be good it's stored in a text field where it'll be used instead of the looping function.) Is there an efficient piece of coding I can use instead of a processing time/labor-intensive one I can use? Thank you in advance for your ideas/help. Ciao, Rich Edited May 25, 20169 yr by Lee Smith Fixed the Title
Create an account or sign in to comment