Jump to content

Recommended Posts

Posted

I must be missing something. I have had this problem multiple times. Why does F6 key not send 6 times?  

Not working 

ControlSend("[CLASS:#32770]", "", "", ("{F6 6}"))

Working

ControlSend("[CLASS:#32770]", "", "", ("{F6}"))
      ControlSend("[CLASS:#32770]", "", "", ("{F6}"))
      ControlSend("[CLASS:#32770]", "", "", ("{F6}"))
      ControlSend("[CLASS:#32770]", "", "", ("{F6}"))
      ControlSend("[CLASS:#32770]", "", "", ("{F6}"))
      ControlSend("[CLASS:#32770]", "", "", ("{F6}"))

 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Posted

You haven't specified a Control you want to send the key to.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)
  On 11/30/2018 at 10:21 PM, SkysLastChance said:

ControlSend("[CLASS:#32770]", "", "", ("{F6 6}"))

Expand  

Should work, even without a control, I tested it on notepad.  Only reason I could think is you dont have focus on the right window.

BTW parenthesis are useless.  But it is not the problem :lol:

Edited by Nine
Posted

If you do not specify a Control, which Control gets the keys I send? The first, the active one ...?
Haven't found anything in the help file (but I'm old and blind ;) )

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

@SkysLastChance

Maybe the repetitive keys are being sent so quickly that the application cannot recognize or process them.  The default value for the SendKeyDelay is 5 ms.  You could try adjusting the delay to something a little more human-like, maybe:

Opt('SendKeyDelay', 200)            ; Default = 5 milliseconds

 

Edited by TheXman
Posted
  On 12/1/2018 at 4:23 PM, water said:

If you do not specify a Control, which Control gets the keys I send?

Expand  

[CLASS:#32770] seems to me like message box or an input box (could be a save file box by the use of F6).  So there should be only one at a time (normally).

  On 12/1/2018 at 4:59 PM, TheXman said:

Maybe the repetitive keys are being sent so quickly that the application cannot recognize or process them.

Expand  

Not a bad idea but I trust the keys sent by controlsend are all buffered.  But worth a try.

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
×
×
  • Create New...