Automating ComboBox while screen is locked

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
steven.deyo.bae
Newbie
Posts: 4
Joined: Mon Jan 20, 2020 6:45 pm

Automating ComboBox while screen is locked

Post by steven.deyo.bae » Mon Jan 20, 2020 6:58 pm

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.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1350
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Automating ComboBox while screen is locked

Post by Dorian (MJT support) » Tue Jan 21, 2020 11:11 am

Yes, we have a Custom Scripting Service. Message me or go here

steven.deyo.bae
Newbie
Posts: 4
Joined: Mon Jan 20, 2020 6:45 pm

Re: Automating ComboBox while screen is locked

Post by steven.deyo.bae » Thu Jan 23, 2020 6:33 pm

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.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Automating ComboBox while screen is locked

Post by Marcus Tettmar » Fri Jan 24, 2020 6:35 pm

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?

steven.deyo.bae
Newbie
Posts: 4
Joined: Mon Jan 20, 2020 6:45 pm

Re: Automating ComboBox while screen is locked

Post by steven.deyo.bae » Mon Jan 27, 2020 2:53 pm

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

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Automating ComboBox while screen is locked

Post by JRL » Mon Jan 27, 2020 3:33 pm

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.
Steven,
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?

steven.deyo.bae
Newbie
Posts: 4
Joined: Mon Jan 20, 2020 6:45 pm

Re: Automating ComboBox while screen is locked

Post by steven.deyo.bae » Mon Jan 27, 2020 3:50 pm

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.

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Automating ComboBox while screen is locked

Post by JRL » Mon Jan 27, 2020 4:55 pm

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.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts