I have a rather unique challenge that I need to overcome. I am working on a Macro Scheduler script that needs to work while the screen is locked. I know that many of the functions do not work with the screen locked, but I have been having moderate success using the functions available in the Window Functions and Window Objects areas of the API.
I am having trouble with the ComboBox, however.
I would like to be able to set the value of the ComboBox while the screen is locked, and have tried a number of different strategies. Does anyone have a creative idea on how I could achieve this?
NOTE: I am trying to automate a Windows Dialog that was created by compiling a separate Macro Scheduler script. I am not sure if this detail is important.
Automating ComboBox while screen is locked
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 4
- Joined: Mon Jan 20, 2020 6:45 pm
- Dorian (MJT support)
- Automation Wizard
- Posts: 1416
- Joined: Sun Nov 03, 2002 3:19 am
Re: Automating ComboBox while screen is locked
Hi Steven. I think these KB posts might help you.
Can I send keystrokes / mouse events when Windows is locked?
Why does my macro stop working when Windows is locked/logged out?
Can I send keystrokes / mouse events when Windows is locked?
Why does my macro stop working when Windows is locked/logged out?
-
- Newbie
- Posts: 4
- Joined: Mon Jan 20, 2020 6:45 pm
Re: Automating ComboBox while screen is locked
Hi Dorian. Thank you for the reply. I am quite familiar with those two postings already. Unfortunately, I can not use something like Autologin for my solution. I know that MOST of the functionality of Macro Scheduler does not work when the screen is locked, but I have found that many of the functions under the Window Functions and Window Objects sections of Code Builders DO in fact work while the screen is locked.
I have been able to successfully launch my application, add text to an Edit box, and Press a button, all while the screen is locked.
If there is a way to also modify the value of the ComboBox, I think I will be able to successfully complete my solution.
I'm not sure if anyone has used Macro Scheduler in this way before, but I was hoping you had some more information to help with my problem.
I have been able to successfully launch my application, add text to an Edit box, and Press a button, all while the screen is locked.
If there is a way to also modify the value of the ComboBox, I think I will be able to successfully complete my solution.
I'm not sure if anyone has used Macro Scheduler in this way before, but I was hoping you had some more information to help with my problem.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Automating ComboBox while screen is locked
Baffled to hear you seem to have circumvented the laws of Windows physics. When Windows is locked there are NO windows. There are NO UI objects. NO window functions can EVER work when Windows is locked.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 4
- Joined: Mon Jan 20, 2020 6:45 pm
Re: Automating ComboBox while screen is locked
I don't think that's 100% correct. I'm by no means an expert in this area, but from what I have been reading my understanding is that the windows and objects still exist, but an external process has no way of accessing them.
Since my process is started internally, it can still access them in a limited fashion. I believe that any keyboard or mouse input will not work at all, since it would be sending that input to the lock screen, but I have a Macro Scheduler script that is able to input text to a textbox and press a button while the screen is locked (without using keyboard or mouse functions).
https://stackoverflow.com/questions/956 ... ock-screen
Since my process is started internally, it can still access them in a limited fashion. I believe that any keyboard or mouse input will not work at all, since it would be sending that input to the lock screen, but I have a Macro Scheduler script that is able to input text to a textbox and press a button while the screen is locked (without using keyboard or mouse functions).
https://stackoverflow.com/questions/956 ... ock-screen
Re: Automating ComboBox while screen is locked
Steven,NOTE: I am trying to automate a Windows Dialog that was created by compiling a separate Macro Scheduler script. I am not sure if this detail is important.
I agree with you that some Macro Scheduler functionality still works while Windows is "locked". What I'm confused about is why you are automating a combobox. Sounds to me like you are passing data from one Macro Scheduler script to another and there are a plethora of ways to do that without using a combobox.
Do you perhaps not have access to the code for the compiled script?
-
- Newbie
- Posts: 4
- Joined: Mon Jan 20, 2020 6:45 pm
Re: Automating ComboBox while screen is locked
I am automating a suite of applications. It just so happens that the first one is a compiled MacroScheduler GUI. Other applications will be C++ MFC applications that also contain ComboBoxes that will need values modified during automation.
Re: Automating ComboBox while screen is locked
I've been experimenting and can't find a way to process a combobox in a Macro Scheduler compiled script. I have managed to cause text to display in the combobox using SetControlText> and UISetValue>, but the action of displaying text does not in itself cause the combobox to respond in any manner. That said, the results might be different in executables created by other applications.