Jump to content

Controlsend for "*" not working


 Share

Recommended Posts

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

  • Developers

I tried it and it gives me 8..

Can you show the ControlSend() line you used? (Just making sure it looks ok)

:D

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

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

  • Developers

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

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

  • Developers

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...