lylemann 0 Posted August 27, 2010 I have a very simple script that I run that runs a batch script and enters a password when the script prompts. The only problem I am having is that sometimes I run the script remotely. I am trying to find a way to script this so it will work when the computer is locked. The command window will not become the active window when the computer is locked so the script will never type the password like I need it too. Share this post Link to post Share on other sites
PsaltyDS 39 Posted August 27, 2010 Use ControlSend() vice Send() and the window does not have to be active. Make sure you don't use any WinWaitActive() either. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
kaotkbliss 146 Posted August 27, 2010 I do not think there is a solution to that. I had the same problem and the only work-around I could come up with is to not allow the computer to get locked. I created a simple script that simply moves the mouse a couple of pixels every minute or so (since I don't have permission to change the settings) (Actually the script checks the current mouse position then moves it 2x2 pixels towards the center of the screen) 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Juvigy 49 Posted August 27, 2010 My script works when computer is locked. It just need to have an account logged in. If there is no logged in account - then there is a problem. You can fix that my creating a local admin account that can be used for that. Share this post Link to post Share on other sites
PsaltyDS 39 Posted August 27, 2010 An admin account is not required, providing the logged in account has enough perms to do what the script is doing. The script can run with the console locked as long as you don't ever expect any particular window to be ACTIVE. The OP didn't specify what "the command window" was, so maybe there are other issues. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
kaotkbliss 146 Posted August 27, 2010 Since nothing of the script was ever shown, it could be regular Send() and MouseClick() as mentioned by Psalty in his first post. Also looking for particular active windows will not work either. (again, as mentioned in the first reply) I'm not even sure what the point of Juvigy's post was since no one has posted any code anywhere so no one knows what script anyone uses. I could say My script doesn't need a computer... There is no relevance. 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
lylemann 0 Posted August 28, 2010 So exactly what I am trying to do is type a string of text into a command prompt window. I have heard that controlsend() doesn't work for command prompt is this correct? Also if it will work what controlID do I need to use? Share this post Link to post Share on other sites