notta Posted April 13, 2011 Posted April 13, 2011 (edited) Guys, I hate to ask this question again, but I've used the search tool and Google to find the answer to this question. I remember seeing a solution to this problem, but I cannot seem to find the answer. I have to uninstall a homebrew application that does not have any switches for uninstall. I have to click yes to a prompt if I want to uninstall and then at the end to click ok when the uninstall is complete. I have the script working when someone is logged in, but when the machine is sitting at ctrl+alt+delete the script is waiting for the "yes" button to be clicked. I thought I was doing it correctly by using WinActivate and WinWaitActive and then ControlClick, but no luck. Can this be done? If so can someone point me to a working example? Thanks. Edited April 13, 2011 by notta
AdmiralAlkex Posted April 13, 2011 Posted April 13, 2011 From the FAQ=Why doesn't my script work on a locked workstation?WOn locked station any window will never be active (active is only dialog with text "Press Ctrl+Alt+Del") In Windows locked state applications runs hidden (behind that visible dialog) and haven't focus and active status. So generally don't use Send() MouseClick() WinActivate() WinWaitActive() WinActive() etc. Instead use ControlSend() ControlSetText() ControlClick() WinWait() WinExists() WinMenuSelectItem() etc. This way you may have your script resistive against another active windows. It's possible to run such script from scheduler on locked Windows station. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
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