Lakesat Posted September 11, 2004 Posted September 11, 2004 I'm automating net use command and it's working fine for most case but... E.g.: Send("net use \\" & $ProjectIP & "\ipc$ " & $Password & " /user:" & $Domain & "\administrator") Cases that aren't working are those that contains symbols in the password like "#"... Look like Autoit isn't seeing it as "string" Is there a way to input my password this way and make sure all caracters will be recognized? Louis Vigneault
Andre Posted September 11, 2004 Posted September 11, 2004 Hi, Use Chr.... $text = "" For $i = 65 to 90 $text = $text & Chr($i) Next MsgBox(0, "Uppercase alphabet", $text Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Lakesat Posted September 11, 2004 Author Posted September 11, 2004 I can't really use Chr, because i'm reading the password from an ini file and special character are not always at the same position (password of 10 char), I have 32 password in it, and i might get more. is there a way to make what I read a complete recognizable string?
this-is-me Posted September 11, 2004 Posted September 11, 2004 Not sure, but have you tried String($Password) ? Who else would I be?
Lakesat Posted September 11, 2004 Author Posted September 11, 2004 Not sure, but have you tried String($Password) ? <{POST_SNAPBACK}>Not working That was something to try though
ezzetabi Posted September 11, 2004 Posted September 11, 2004 (edited) RTFM, Faq 10 ... Ok, I am so evil to leave with only wrote that 12 chars. But... READ THE MANUAL! Solution: The command send, see some chars as special character for combinations, e.g. !{F4} means ALT+F4 not writing ! { F 4 and } When you are using Send with variants it is a good idea use the RAW mode that always send the keys 'as they are wrote' so !{F4} indeed means ! { F 4 and }. Since you can't know if the variant will keep special chars or not. Your command: Send("net use \\" & $ProjectIP & "\ipc$ " & $Password & _ " /user:" & $Domain & "\administrator",1) Just for your knowledge the # means the Win key... Did I mentioned to read the manual? Edited September 12, 2004 by ezzetabi
ezzetabi Posted September 12, 2004 Posted September 12, 2004 but I was wondering, why use Send()? It is not better using Run()?
SlimShady Posted September 12, 2004 Posted September 12, 2004 but I was wondering, why use Send()? It is not better using Run()? <{POST_SNAPBACK}>Most definitely.
Lakesat Posted September 12, 2004 Author Posted September 12, 2004 RTFM, Faq 10 ... Ok, I am so evil to leave with only wrote that 12 chars. But... READ THE MANUAL! Solution: The command send, see some chars as special character for combinations, e.g. !{F4} means ALT+F4 not writing ! { F 4 and } When you are using Send with variants it is a good idea use the RAW mode that always send the keys 'as they are wrote' so !{F4} indeed means ! { F 4 and }. Since you can't know if the variant will keep special chars or not. Your command: Send("net use \\" & $ProjectIP & "\ipc$ " & $Password & _ " /user:" & $Domain & "\administrator",1) Just for your knowledge the # means the Win key... Did I mentioned to read the manual? <{POST_SNAPBACK}>Ouch!! Sorry about this one, should have look at the manual first (well, i've read it like 2-3 weeks ago and didn't remebered this info). Next time i'll look carefully before posting here... Thanks for leading me to the answer, I appreciate Louis Vigneault
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