lylemann Posted August 27, 2010 Share 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. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 27, 2010 Share 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) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Juvigy Posted August 27, 2010 Share 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. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 27, 2010 Share 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 Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 27, 2010 Share 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. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
lylemann Posted August 28, 2010 Author Share 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? 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