Jump to content

Send key to minimized window...


Icy
 Share

Recommended Posts

Hello,

I looked through many topics, but still didn't found any working answer. So I'm asking by myself:

How can I make simple command - to send "space" or "some letter" for minimized application? I guess ControlSend is for that, but ControlSend("NosTale","","","x") doesn't work... Only when maximized.

Please help me.

Link to comment
Share on other sites

Most basic example:

AutoItSetOption("WinTitleMatchMode",2)

Run("notepad.exe")

WinWait("Notepad")
WinSetState("Notepad","",@SW_MINIMIZE)
ControlSend("Notepad","","Edit1","This text was send when window was minimized.")
Sleep(1000)
WinSetState("Notepad","",@SW_RESTORE)

When the words fail... music speaks.

Link to comment
Share on other sites

Thanks dude, but I had to change it a bit. It worked on my LAST TRY. If it wouldn't work that time , then I would give up... It's working perfectly with these lines:

AutoItSetOption ("WinTitleMatchMode",2)

While 1

Sleep (2000)

ControlSend ("NosTale","","","{Space}")

WEnd

Link to comment
Share on other sites

oh... yes it works, but!! longer i had this script running - bigger problems starts to appear!! WTF??

Problem like:

- numeric keyboard stops working

- mouse doing weird stuff

- shift was held down without me...

- and more like these

Why??

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