Problem with start process


i had developped a code that uses start process inside a for each file.

but the code does not recognize the “item” as a file

sample_for_each.xaml (55.7 KB)


I noticed in your Start Process that you are using the filename as the process. You need to Start the Application then use the filename as your argument. You can also use “Open Application” in similar way.

Here’s an example of what I mean:

1 Like

Thank you, i resolved the issue, but as you may already seen in the code: i’m trying to find an image i,n a document, i had used image exist without result on a document that include this image, i had also
used the “Find Image” activity, and then use the “Highlight” activity as a replacement of “image exist” but it show that the timeout had exeeded

1 Like

Is the image you are finding located on the screen and is visible at the time when it runs? It will timeout if it’s not on the screen. If it is on the screen, make sure it’s fully visible. Also, you can try lowering accuracy to like .5.

Another thing you can look at is if the selector is correct and is where the image is located. You might need to use a wildcard if it is dynamic and changes.


1 Like

the code open the file on the screen: is it the right activity that i may use to check if the “image” existe, i had tryed aalso the accuracy of 0.5?


I will note some suggestions

  1. Directory.GetFiles(FolderPath, FileExtention) for ex. “*.pdf” etc is better to use, since there may be any type of files in the folder

  2. Start Process first argument is Application.Exe full path, second is File Path

  3. Work inside Attach Window container where the selector for the window will be dynamic with the filename, Maximize the file which will activate the scope and then try with your Find Image Activity, since Find Image will only work when the image is visible on the screen.

1 Like

can you plz give an exemple for the selector?


This was your original selector,

< wnd app=‘acrord32.exe’ cls=‘AcrobatSDIWindow’ title=‘Unsaved-Account Statement Details Report.pdf - Adobe Acrobat Rea*’ />

you can make it dynamic as,

< wnd app=‘acrord32.exe’ cls=‘AcrobatSDIWindow’ title=‘“+item.Substring(item.LastIndexOf(”")+1) +" - Adobe Acrobat Rea*’ />

Here item is the variable which you get from For Each File Loop

item.Substring(item.LastIndexOf("")+1) will extract only the filename from full file path

consider LastIndexOf \ (“BackSlash”)

Back Slash is not getting displayed within double quotes

You can use markdown for code blocks - here are the basic ones.

1 Like

i can’t reedit the selector.

can you explain

for_each.xaml (49.5 KB)

here is a portion of the code just fill in a folder with a document and change the “image”

Cut the entire selector from attach window

<wnd app=‘acrord32.exe’ cls=‘AcrobatSDIWindow’ title=‘PMNA26-07-17.pdf - Adobe Acrobat
Reader DC’ />

This will make the selectors property to accept string type variable, now enter below mentioned selector to it

<wnd app=‘acrord32.exe’ cls=‘AcrobatSDIWindow’ title=‘“+item2+” - Adobe Acrobat
Reader DC’ />

Thank you all for helping with this. I had an issue just like this and this thread helped me resolve the issue!

Thanks again everyone! Keep up the great work!