ddr4lyfe Posted March 8, 2008 Posted March 8, 2008 I'm trying to run a script that will run two instances of a program (that have the same title), move and resize each of them so they don't overlap, and change the title of each. The problem that I'm having though is that sometimes the WinSetTitle doesn't seem to work correctly. Here's my code of what I have so far:Opt("MouseCoordMode", 1)Run ("C:\Program Files\Dofus_Beta\Dofus.exe")Sleep (3000)WinSetTitle ("Dofus", "", "Dofus1")Sleep (1000)WinMove ("Dofus1", "", 0, 0, 960, 768)Run ("C:\Program Files\Dofus_Beta\Dofus.exe")Sleep (3000)WinSetTitle ("Dofus", "", "Dofus2")Sleep (1000)WinMove ("Dofus2", "", 960, 0, 960, 768)Thanks in advance,Rossy
Valuater Posted March 8, 2008 Posted March 8, 2008 This works for me Opt("MouseCoordMode", 1) Run ("notepad.exe") WinWaitActive("") WinSetTitle ("", "", "Dofus1") Sleep (1000) WinMove ("Dofus1", "", 0, 0, 400, 300) Run ("notepad.exe") WinWaitActive("") WinSetTitle ("", "", "Dofus2") Sleep (1000) WinMove ("Dofus2", "", 400, 0, 400, 300) 8)
JusGellin Posted March 8, 2008 Posted March 8, 2008 (edited) This works for me Opt("MouseCoordMode", 1) Run ("notepad.exe") WinWaitActive("") WinSetTitle ("", "", "Dofus1") Sleep (1000) WinMove ("Dofus1", "", 0, 0, 400, 300) Run ("notepad.exe") WinWaitActive("") WinSetTitle ("", "", "Dofus2") Sleep (1000) WinMove ("Dofus2", "", 400, 0, 400, 300) 8) Wow, I'm intregued. I see you are using blanks to find the notepad window. Does that work because you use WinWaitActive and WinSetTitle right after notepad is run? That's pretty cool. Edited March 8, 2008 by JusGellin
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