What is the proper way to minimize the Script Executor? Why is he even in foreground?
I’m using a function to set focus on the application used in the process, and the console output clearly indicates that the application is focused.
The same issue occurs both with the dev and unattended robot.
For example: https://imgur.com/a/MheFmsI
- ManjaDex asked 5 months ago
- You must login to post comments
Based on what I’ve found, this behavior is not caused by your script or your focus function, but by Windows itself. The ScriptExecutor comes to the foreground because Windows imposes strict rules on which processes are allowed to activate or take focus. Even if your console output shows that your target application should be focused, Windows may still override that.
According to Microsoft’s documentation for SetForegroundWindow, Windows only allows a process to set the foreground window if very specific conditions are met. If these conditions are not satisfied, Windows will block the request — even though the function call returns successfully.me after user input, Windows does not allow cross-process focus changes. This means the robot may request focus, but the OS simply refuses.
It would be useful to request a new feature from Robotiq (Jira ticket- Suggest improvement): an option to automatically run ScriptExecutor 🙂
- Emb answered 5 months ago
- You must login to post comments
Unfortunately this error is hard to replicate and thus hard to debug, but one of possible workarounds is to add a short break just at the beginning and then send Windows + M to minimize all screen and thus leaving you with blank canvas.
In one of my projects im using Hot key Step to send Windows + M, theres a three part on how to get “Windows” button in Hot key Step, and that is to first assign it any other modifier and M, then download it and manually change modifier to Windows and then reupload it entirely
If you want to preserve versions of your process i recommend making a new one with just his altered key and copy pasting it where it needs to be
Hope this helps and good luck!
Kind regards,
Vuk
- Vuk answered 1 month ago
- You must login to post comments
Please login first to submit.
