Bounty666 Posted June 24, 2008 Posted June 24, 2008 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
AdmiralAlkex Posted June 24, 2008 Posted June 24, 2008 Use ControlSend() .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Bounty666 Posted June 25, 2008 Author Posted June 25, 2008 Use ControlSend()Thanks. Took some time 'til I understood that I shouldn't write any ControlID but now it works.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now