Thank you for the response!
1. An _ArrayDisplay does give me the list of the array. If I add or remove files, the array does adjust correctly.
=============
This is what I currently get when using _ArrayDisplay:
Row|Col 0
[0]|6
[1]|CAPT3662010.pdf
[2]|CAPT3662011.pdf
[3]|CAPT3662012.pdf
[4]|CAPT3662013.pdf
[5]|CAPT3662014.pdf
[6]|CAPT3662015not.pdf
==============
****Every time I run the original code, the code always picks the CAPT3662015not.pdf file. I need it to move to the next file each time it loops. It currently loops but never moves from the last file.
2. Output to Console passes successfully.
3. The process is successful all the way through for the first file that is chosen. As you mentioned maybe the issue is with my embedded .exes. I am choosing the file with a recorded macro, called (choosepdf.exe). I just recorded myself choosing a file in C:\PDF. So I was thinking to remove that file, so the next time I loop through, it will pick the next file. I would like know how to choose the file without a recorded macro. FileOpen doesnt really double click and my most frustrating issue is that it does not change files.
4. What is a better way to choose a file and loop through that folder? I am looping through all of the processes with one file (my choosepdf.exe picks the first file in the list). But I need to loop through that folder.
****Heres the code for the choosepdf.exe file. Maybe this is the culprit. Its just a recorded macro...:
AutoItSetOption("MouseCoordMode", 0)
;WinWait("Untitled") ;waits for the window to open
WinActivate("Untitled") ;activates the window
MouseClick("primary", 464, 524, 1, 0) ;
MouseClick("primary", 363, 583, 1, 0)
MouseClick("primary", 537,99, 1, 0) ;clicks on address bar
Send("C:\PDF")
MouseClick("Primary", 493, 191, 2, 0) ;chooses the first file in the list by double-clicking