Jump to content

Send keys issue.


jessem
 Share

Recommended Posts

I'm sending keys 0-9 to my local machine and using tcp client/server to replicate the string to my laptop as commands.

Here's a basic example of the issue I'm getting.

HotKeySet("1", "One")
 
While 1
  sleep(100)
WEnd
 
 
Func One()
   Send("1")
EndFunc

The return on my local machine is either nothing or 1111111111111111111111etc...

I've tried Send("{NUMPAD1}") as a solution, but my game doesn't support the NumPad.

Any suggestions on how to use the '1' key to trigger the number 1?

Also, please don't Lock this thread without examples of the code that poses a threat. Any save, file, network or messaging code can be distorted for the use of diabolical deeds.

Link to comment
Share on other sites

You were doing so well... And then you mentioned the 'g' word.

Yep, Sunday is my game day, and I've used AutoIt for six years to assist. It's far more fun that way. Until now I've only used it on my own machine for things like pixel search and to Automate tasks for efficiency.

And this was the first post this morning that was locked when my question became an idea conceptually distorted.

Thanks for the help guys, real sweet of you.

Link to comment
Share on other sites

Six years eh?

Then you ought to know better than most that the rules apply to all, even the one about starting another thread on a closed topic.

Furthermore you should know not to make a thread about a bog standard topic sound dodgy.

And even more so, by now you should know how to unset a hotkey that is being sent.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I've been an American for 37 years, I ought to know the number of members in Congress but I suppose that's what the internet is for.

Thanks for the hint, here is the solution I have for anyone else searching the forums later (such as myself).

HotKeySet("1", "One")
 
While 1
  sleep(100)
WEnd
 
 
Func One()
   HotKeySet("{1}")
    Send("{1}")
    Sleep(100)
    HotKeySet("{1}", "One")
 
EndFunc
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...