Jump to content

REQ: How to send in a Hidden window.


Recommended Posts

I'm kinda new on this forum and not that familiar with Scite yet. I've made some research but I cant find one thing:

How do I send keys in a window that is hidden behind another window. Like if you have a bot that send keys in a program and at the same time want to read forums.

This is a example that I found at this forums that I want to do that in:

(Link to the original thread: original thread)

HotKeySet("{ESC}","esc");Useful for testing.
MsgBox(0, "Tibia 7.6 AFK Dance tool", "This program will make your character change direction every 30 sec.")
WinWait("Tibia");Checks if tibia client exists.
$pid = WinGetProcess("Tibia"); Getting the Process ID. I think that's usefull but not how.
While 1
    ProcessWait($pid); Wait until Tibia-process is running
    
;; I want to send these keys even if tibia-window is hidden under other windows like Firefox or IE etc.
    Send("{CTRLDOWN}")
    Send("{UP}")
    Send("{CTRLUP}")
        
    Send("{CTRLDOWN}")
    Send("{DOWN}")
    Send("{CTRLUP}")
        
    Send("{CTRLDOWN}")
    Send("{RIGHT}")
    Send("{CTRLUP}")
    Sleep(30000)
;;
WEnd

Func esc();Just to make it easy to test and escape  from the script.
    Exit
EndFunc
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...