Bring a window frontmost ....

Hi,

It seems probably obvious to many of you … I have tested many solutions and they don’t work. Here is my script:

tell application "HP Communications"
	launch
end tell

delay 5

tell application "HP All-in-One Device Chooser"
	launch
	activate
end tell

“HP Communications” is an communication app and is not located in the Applications folder but in Macintosh<Library<Printers<hp. “HP All-in-One Device Chooser” lets me choose the USB printer I want to use.

If I launch manually the «Device chooser», I get a window offering me my choices. If I launch it by script, I never get that window. What is the problem with the script above ?

Thanks in advance.

Robert

Hi, Robert.

I’m not familiar with those applications, but you probably want to use ‘activate’ rather than ‘launch’. ‘launch’ opens the application in memory, but not much else. ‘run’ opens the application and makes it go through its start-up routine, including opening any default windows. ‘activate’ does the same as ‘run’, but brings the application to the front.

Thank you Nigel,

Trying ACTIVATE, RUN and LAUNCH I was getting different result and was not sure witch one was witch. ACTIVATE did what I wanted …

Best regards.

Robert