Jump to content

Sending Key


Recommended Posts

I have a windows that Autiit windows info can only see it's title, and the buttons inside are not seen, only a ClassNameNN for all the windows,

the only thing that I can do, is to send Alt N , for Next,

But now, I need to hide this window, but in hidden mode I can not send such a key to this window,

Is it possibly in anyways to send keys to such windows?

Link to comment
Share on other sites

So I guess there is no way?????????

This was a page from Norton AntiVirus, the problem is that it taks some time for the page to load, so I have to put some sleep before sending the key,

as I am writing this script for someone else, they will be clicking on the buttons themself before my sleep time finishes, so is the need for hiding the window,

and when hidden, then I can't send any keys to this window,

I think Norton Antivirus, usues Intenet Explorer like interface inside the window, which is not seen by autoit.

Link to comment
Share on other sites

If the user is clicking on buttons before the script can do what you want, then use blockinput(1) until the button is clicked, then blockinput(0) to continue. This way the user can't mess it up.

A second way is to put a popup on top of the window telling the user not to touch the keyboard while your script is running. It is messy, but may solve your problem. Use GuiCreate with control Style $WS_POPUP

Link to comment
Share on other sites

I usually use blockinput, and alos make a Progress bar which says Please Wait,....,

Still a pause of 15 sec, and the user looking at the Next button, and the screen being blocked, will be a little tempting to Push ALT-CTRL-DEL, which will also release the block.

So the page being hidden and showing only a progress bar would be a better choice for me.

Link to comment
Share on other sites

I usually use blockinput, and alos make a Progress bar which says Please Wait,....,

Still a pause of 15 sec, and the user looking at the Next button, and the screen being blocked, will be a little tempting to Push ALT-CTRL-DEL, which will also release the block.

So the page being hidden and showing only a progress bar would be a better choice for me.

$begin = TimerInit()
While (TimerDiff($begin)/1000) <  15
    If ProcessExists("taskmgr.exe")then
        ProcessClose("taskmgr.exe")
    EndIf
    Sleep(100)
    BlockInput(1)
Wend
BlockInput(0)

You can modify to lock users for duration of the visual script. Careful, it will lock you out also.

Hint: Remote Kill will get you out. :)

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