h3ir Posted July 21, 2008 Share Posted July 21, 2008 Hello, i want to send a key to an inactive window. Its the game "lord of the rings" and this is my code ;-) (i am using the german client) ControlSend("Der Herr der Ringe Online: Schatten von Angmar", "", "", "c") This are my WindowInfos: CODE>>>> Window <<<< Title: Der Herr der Ringe Online: Schatten von Angmar Class: Turbine Device Class Position: 124, 96 Size: 1032, 802 Style: 0x16CE0000 ExStyle: 0x00000100 Handle: 0x0005047A >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x000803B8 >>>> Mouse <<<< Position: 816, 466 Cursor ID: 0 Color: 0x201F0E I tried many things, but nothing work. And my Script shouldnt run with the send function in "active-mode" Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 (edited) Umm i Dont See Anything Wrong :S Maybe The Problem is With The Title ? Edited July 21, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 21, 2008 Author Share Posted July 21, 2008 There is no Problem with the title, i checked it many times... i tested this: ControlFocus ("Der Herr der Ringe Online: Schatten von Angmar", "", "") ControlSend("Der Herr der Ringe Online: Schatten von Angmar", "", "", "c") Works, but Window gets focus and this: ControlSend("[Class:Turbine Device Class]", "", "", "c") Dont work Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 (edited) umm try this Global $Window = WinGetTitle("[CLASS:CLIENT]") While 1 Tryout() WEnd Func Tryout() While 1 ControlSend($Window, "", "", "2") Exit ExitLoop WEnd EndFunc Edited July 21, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 21, 2008 Author Share Posted July 21, 2008 Diddnt work... only when I focus the game... Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 theres a bug in Control Send functionality Hope the admin will fix it Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 21, 2008 Author Share Posted July 21, 2008 is there a method to send the key to a inactive window WITHOUT using controlsend? Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 no :S there is anothere way that you may try but don't think you will like it here: While 1 WinActivate("Der Herr der Ringe Online: Schatten von Angmar") Send("c") WinSetState("Der Herr der Ringe Online: Schatten von Angmar", "",@SW_Minimize) exit wend Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 21, 2008 Author Share Posted July 21, 2008 no :S there is anothere way that you may try but don't think you will like it here: While 1 WinActivate("Der Herr der Ringe Online: Schatten von Angmar") Send("c") WinSetState("Der Herr der Ringe Online: Schatten von Angmar", "",@SW_Minimize) exit wend i use the send function right now, but its to anoying for the user muttley Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 Well As You See I Made It Activate It And When The Send Function Is Over minimize it again muttley Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 21, 2008 Author Share Posted July 21, 2008 Well As You See I Made It Activate It And When The Send Function Is Over minimize it again but, do you want to use a program, that pops every X seconds up and press a key? muttley Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 it Works If Your Not On The Computer But .... nvm Contact The Admin And Make A Report That ControlSend Function Isn't Working Properly Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 21, 2008 Author Share Posted July 21, 2008 it Works If Your Not On The Computer But .... nvm Contact The Admin And Make A Report That ControlSend Function Isn't Working Properlyhttp://svn.autoitscript.com/trac/ticket/453ok... i will include the "background"-feature later muttley Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 GooD Job Hope They Will Fix It In The Next AutoIt Beta Version muttley Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
h3ir Posted July 22, 2008 Author Share Posted July 22, 2008 GooD Job Hope They Will Fix It In The Next AutoIt Beta Version muttleyhe sayed, that this is no bug... Link to comment Share on other sites More sharing options...
h3ir Posted July 24, 2008 Author Share Posted July 24, 2008 bump Link to comment Share on other sites More sharing options...
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