Sign in to follow this  
Followers 0
Lakesat

How can I?

9 posts in this topic

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

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Not sure, but have you tried String($Password) ?


Who else would I be?

Share this post


Link to post
Share on other sites

Not sure, but have you tried String($Password) ?

<{POST_SNAPBACK}>

Not working :ph34r:

That was something to try though :(

Share this post


Link to post
Share on other sites

#6 ·  Posted (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... :ph34r:

Did I mentioned to read the manual?

Edited by ezzetabi

Share this post


Link to post
Share on other sites

but I was wondering, why use Send()?

It is not better using Run()?

Share this post


Link to post
Share on other sites

but I was wondering, why use Send()?

It is not better using Run()?

<{POST_SNAPBACK}>

Most definitely.

Share this post


Link to post
Share on other sites

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...  :ph34r:

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0