molay Posted March 26, 2009 Share Posted March 26, 2009 Hi All, i wrote a scipt to run cmd.exe and past a text when the pc is locked using the "Controlsend" command. every thing if working fine and it sending the correct text except fot "*" (star). I used the asc character equivakent (ALT 42) but still not able to send "*". it is always giving me "8" instead. Any help will be appreciated? Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted March 26, 2009 Developers Share Posted March 26, 2009 And what about "+8" ? 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...
molay Posted March 26, 2009 Author Share Posted March 26, 2009 Hi thanks for the quick reply. do you mean i have to put +8 instead of ALT 42 ? Link to comment Share on other sites More sharing options...
molay Posted March 26, 2009 Author Share Posted March 26, 2009 I tried it and it gives me 8.. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 26, 2009 Developers Share Posted March 26, 2009 I tried it and it gives me 8..Can you show the ControlSend() line you used? (Just making sure it looks ok) 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...
molay Posted March 26, 2009 Author Share Posted March 26, 2009 Here is the code ( very simple) Run("cmd.exe","") sleep (2000) ControlSend ("C:\WINNT\system32\cmd.exe", "", "", "+8") It gives "*" when the station is not locked but it gives "8" when it is locked Do you have any idea why ? Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted March 26, 2009 Developers Share Posted March 26, 2009 (edited) I didn't expect the ControlSend() work at all as there is no real valid control in a CMD window. Maybe StdinWrite() is an option for you? Edited March 26, 2009 by 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...
molay Posted March 26, 2009 Author Share Posted March 26, 2009 Thanks, But how come all the other texts worked fine excep this "*" For StdinWrite() , do you have a simple example. I was unable to understand the example inthe help. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 26, 2009 Developers Share Posted March 26, 2009 (edited) Thanks,But how come all the other texts worked fine excep this "*"Don't know, all I remember is that ControlSend() was changed and believe it doesn't work without a valid control, but others for sure will chime in when its different.As for the example, there are many examples posted in the forum to show what you can do with it.Jos Edited March 26, 2009 by 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...
molay Posted March 26, 2009 Author Share Posted March 26, 2009 Thanks Jos for your great help. 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