Dynamic selector for "click" activity with back slash

Hi Guys,

Looking for some help here!

Currently I’m building a bot for a client.
As in production, the bot needs to print out documents. And there are a few options to choose when it comes to printers, for instance “\localhost\printer_A”, “PDFCreator”, “\network\printer_B”.

So, in the windows “Devices and printers” page, one printer will be selected as the default printer.

And when running the bot, it’s asked to change the printer based on some criteria. In the script, I’ve tested 2 approaches:

  1. Use “select item” to select the printer.
    When I chose “select item” activity to select printer, even if the printer is switched, from the dropdown list, then when I click “print” button, the document is still printed out from the default printer (this happens to Acrobat reader and windows stock picture view).

  2. Use clicks to choose the printer.
    When I chose the clicks, then the first click is to expand the dropdown list which works, the second click is to choose the printer. So, I’ve made a dynamic selector for that purpose. Both clicks need to turn “sendwindowsmessage” property on for it to work
    i. So if the printer name is “PDFCreator”, the “click” activity works
    ii. However, if the printer name is “\localhost…” or “\network…” the bot would give an error saying that the “click” activity is not suitable for such action.

BR
Helliton