Amn Posted December 7, 2008 Share Posted December 7, 2008 I've been trying to use WinSetTitle and other commands on my Shadowbane (a game) window. The command works with all of my other windows, just not the Shadowbane window. I've done a WinList and am sure the windows title is Shadowbane, and if I do a WinActivate it does activate the Shadowbane window, but I can not change the windows title, or send commands to it. A year or two ago I know I was able to do this, but I was using XP as opposed to Vista at the time. So I'm not sure if it is due to Vista (unlikely as I'm able to send commands to other windows and change their titles), or if there is something that's been done to the Shadowbane program to not allow this. Anywho, my question is if anyone knows of a work around for this. Thanks. Link to comment Share on other sites More sharing options...
SoftVoile Posted December 7, 2008 Share Posted December 7, 2008 post the code you have tried. Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them. Link to comment Share on other sites More sharing options...
Amn Posted December 7, 2008 Author Share Posted December 7, 2008 post the code you have tried.I've tried quite a few different things, but below are some examples. This didn't work: $tmpTitle = WinGetTitle("Shadowbane") WinSetTitle($tmpTitle,"","SB")This did (with a new notepad window open): $tmpTitle = WinGetTitle("Untitled - Notepad") WinSetTitle($tmpTitle,"","SB")In that case I tried shortening the "Shadowbane" WinGetTitle down to "Sh" which should have worked also.This worked fine using notepad:While 1 WinActivate("Untitled - Notepad") Send("{Space}") sleep(1000)WendThis did activate the Shadowbane window, but did not send the Space being pressed (tried with several other buttons also, none were received by Shadowbane):While 1 WinActivate("Shadowbane") Send("{Space}") sleep(1000)WendI also tried using to use controlsend to both notepad and shadowbane, it worked fine in the case of notepad, not so much for shadowbane. Being that winactivate works with the shadowbane window I know that it's finding the shadowbane window, it's just not successfully interacting with it. Any ideas? Link to comment Share on other sites More sharing options...
oMBRa Posted December 7, 2008 Share Posted December 7, 2008 have u tried? ControlSend('Shadowbane', '', '', '{SPACE}') Link to comment Share on other sites More sharing options...
Amn Posted December 7, 2008 Author Share Posted December 7, 2008 have u tried? ControlSend('Shadowbane', '', '', '{SPACE}') Sure did. I even copy and pasted your code specifically, but no luck. As before though if I replace shadowbane with "Untitled - Notepad" is works fine on the notepad window. Any other ideas? Link to comment Share on other sites More sharing options...
SoftVoile Posted December 7, 2008 Share Posted December 7, 2008 Maybe Opt("WinTitleMatchMode", 2) can help you if you place it at top of your script. also use Au3Info tool to get correct window information. Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them. Link to comment Share on other sites More sharing options...
oMBRa Posted December 7, 2008 Share Posted December 7, 2008 post the informations u get with au3 info Link to comment Share on other sites More sharing options...
Amn Posted December 7, 2008 Author Share Posted December 7, 2008 (edited) post the informations u get with au3 infoThis is what I pulled up using au3info, it seems the title is correct at least.>>>> Window <<<<Title: ShadowbaneClass: OpenGLPosition: 0, 0Size: 800, 600Style: 0x96000000ExStyle: 0x00000000Handle: 0x00000000000706A8Also tried with the addition of Opt("WinTitleMatchMode", 2), but still no luck. Edited December 7, 2008 by Amn Link to comment Share on other sites More sharing options...
SoftVoile Posted December 7, 2008 Share Posted December 7, 2008 one more Tip/Hint, detect the window using [Class:Name] and then change it's title. Maybe it will work, but i am not sure. just try it. Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them. Link to comment Share on other sites More sharing options...
Amn Posted December 7, 2008 Author Share Posted December 7, 2008 one more Tip/Hint, detect the window using [Class:Name] and then change it's title. Maybe it will work, but i am not sure. just try it. Link to comment Share on other sites More sharing options...
Amn Posted December 7, 2008 Author Share Posted December 7, 2008 How do you detect it by the class name. Could you toss an example my way? Link to comment Share on other sites More sharing options...
Amn Posted December 8, 2008 Author Share Posted December 8, 2008 Ok, figured it out, with some assistance from a friend. Wanted to thank you guys for the help though. The issue ended up being Vista (no big surprise). I had to set it up to run as admin, and even with it set that way you have to run them from the script editor in admin mode for it to affect that program. Simply double clicking the au3 won't run them in admin mode, despite the setting. Thanks again. Link to comment Share on other sites More sharing options...
Mattraks Posted December 8, 2008 Share Posted December 8, 2008 Thats why there is #RequireAdmin 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