psynegy Posted November 13, 2019 Share Posted November 13, 2019 Hello, this might be an impossible task, but we have a small utility that is provided in part of a software package, it has a very simple GUI, which we want to automate as part of a scheduled task, so, essentially not logged in. I've been able to get it to work visible, but I'm beginning to wonder if it's going to be possible when not logged in, as I've not had any luck so far. Any pointers? Thanks! Link to comment Share on other sites More sharing options...
Developers Jos Posted November 13, 2019 Developers Share Posted November 13, 2019 The answer probably depends heavily on what exactly is done with that utility. Does it need to be run in the user context to function? What exactly does it do? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
psynegy Posted November 13, 2019 Author Share Posted November 13, 2019 Hi Jos, Other than operating only by way of GUI, no, it's basically a 4 field form with an OK button, it's for changing passwords on a database (a database that we're not allowed to touch via any other method than with their tools). It's very frustrating that they refuse to provide a command line interface for doing this, but, it is what it is unfortunately. Thanks! Link to comment Share on other sites More sharing options...
Zedna Posted November 13, 2019 Share Posted November 13, 2019 Look here: https://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
psynegy Posted November 13, 2019 Author Share Posted November 13, 2019 Okay, fantastic, thank you, it seems to work now I'm not using anything 'Active'. If I need to get the value of an alert message that presents itself, how do I do that? I've been trying to get _WinAPI_GetWindow($hWnd, $GW_CHILD) to give me the hWnd of the child window, but, I've not been having any success. I imagine I'm missing something really obvious. Thanks again! Link to comment Share on other sites More sharing options...
psynegy Posted November 15, 2019 Author Share Posted November 15, 2019 Finally figured that issue out; there's an undocumented option of $GW_ENABLEDPOPUP for _WinAPI_GetWindow which returns what I need. I've run into a different problem now though. The software I'm running will not launch that popup when run non-interactively. Seems to be a built in 'MessageBox' feature: if (!SystemInformation.UserInteractive && (options & (MessageBoxOptions.ServiceNotification | MessageBoxOptions.DefaultDesktopOnly)) == (MessageBoxOptions)0) { throw new InvalidOperationException(SR.GetString("CantShowModalOnNonInteractive")); } Unfortunately, I really need the information in that popup. Is there any way I can falsify the SystemInformation.UserInteractive variable for that application? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now