Jump to content

send works, but controlsend doesn't.


provi
 Share

Recommended Posts

Hi, as the topic title says:

WinWaitActive("Audi")

Send("{F1}")

This works, but:

ControlSend("Audition", "", "", "{F1}")

Does not work. If it is a string, it will work (it will tpye some text). But the "F1" key does not work.

And I want to do it so the windows I want to send the keystroke does not need to be focused. Thats why I am trying with ControlSend.

WinWaitActive("Audi")

ControlSend("Audition", "", "", "{F1}")

This is also, not working.

I tried with the flag on, but it seems its not working with special keys, am I right?

Any ideas?

Edited by provi
Link to comment
Share on other sites

$x=WinGetHandle("Audition");Try both Audi or Audition here

WinWaitActive("Audi")

ControlSend("$x, "", "", "{F1}")

Maybe?

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Link to comment
Share on other sites

Tried in NotePad, the F1 function works.

Tried other Fx buttons that should trigger something in the window Audition, but nothing happens. However, writing a string and {ENTER} will work with controlsend. BUT I think I managed to narrow down the problem...maybe.

I have found that those keys actually use directInput, and the string does not. I guess directinput works with send BUT is unable to work with controlsend.

Edit: The above code won't work either. ControlSend won't work with Fx buttons. Wether the window is active or not, controlsend does not work.

And I know I can do it with send, but I am trying to not lose focus of what I am currently doing in my computer.

Also, is there a way to send the F1 key with RAW mode in controlsend?

Edited by provi
Link to comment
Share on other sites

Just out of curiosity, is this Adobe Audition? I have 3.0 and the ControSend() works(brings up the help in the default browser).

I noticed in your first post, you had different titles for your WinWaitActive() and ControlSend() lines. cound that be a problem? Here is what I tried

WinWaitActive("[TITLE:Adobe Audition; CLASS:Audition v3.0]")
ControlSend("[TITLE:Adobe Audition; CLASS:Audition v3.0]", "", "", "{F1}")
Link to comment
Share on other sites

Hehe, nice try, but nope, it's not Adobe Audition.

And the different titles it's not a problem, tried with the full title and still does not work, and if I send a string, it will be printed in the window correctly.

Seems to me that the string can be printed without directinput, but those special keys DO need the directinput.dll in order to work.

Thanks guys for your help anyways :)

Link to comment
Share on other sites

I should add some relevant info:

Send command didn't work in a 32 bit OS (it happened the same as it happens with ControlSend, you can send strings but not directinput buttons) but it does work in a 64 bit OS (controlsend however doesnt work either). Quite puzzling.

Sorry for the double post.

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