Jump to content
Sign in to follow this  
molay

Controlsend for "*" not working

Recommended Posts

molay

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
molay

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
Jos

I tried it and it gives me 8..

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

:D


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

Share this post


Link to post
Share on other sites
molay

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
Jos

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                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
molay

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
Jos

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                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.