Sign in to follow this  
Followers 0
molay

Controlsend for "*" not working

10 posts in this topic

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

Share this post


Link to post
Share on other sites



Hi thanks for the quick reply.

do you mean i have to put +8 instead of ALT 42 ?

Share this post


Link to post
Share on other sites

I tried it and it gives me 8..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thanks Jos for your great help.

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