Shyke Posted September 8, 2005 Share Posted September 8, 2005 How could I select a window and maximize it without using the run command? Link to comment Share on other sites More sharing options...
seandisanti Posted September 8, 2005 Share Posted September 8, 2005 How could I select a window and maximize it without using the run command?<{POST_SNAPBACK}>check out WinActivate and WinSetState Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 Thank-you very much, I will try that. Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 Didn't work... I used: WinActivate("wowemu.exe") WinSetState("C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe", "", @SW_MINIMIZE) It didn't make it maximize... Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 8, 2005 Share Posted September 8, 2005 (edited) Didn't work...I used:WinActivate("wowemu.exe") WinSetState("C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe", "", @SW_MINIMIZE)It didn't make it maximize...<{POST_SNAPBACK}>u dont put the pathname..just put the title of the window WinSetState("WowMenu","",@SW_MINIMIZE) Edited September 8, 2005 by B3TA_SCR1PT3R [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 I am not quite that bad of a programmer... " C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe " is the title. Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 8, 2005 Share Posted September 8, 2005 (edited) I am not quite that bad of a programmer..." C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe " is the title.<{POST_SNAPBACK}>oh lolWinActivate("C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe","") WinSetState("C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe","",@SW_MAXIMIZE") Edited September 8, 2005 by B3TA_SCR1PT3R [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
seandisanti Posted September 8, 2005 Share Posted September 8, 2005 I am not quite that bad of a programmer..." C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe " is the title.<{POST_SNAPBACK}>why not just use Opt("WinTitleMatchMode",4) WinActivate("wowemu") WinSetState("wowemu","",@SW_MAXIMIZE) Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 Sleep(1000) WinSetOnTop("wowemu.exe", "", 1) opt("WinTitleMatchMode", 4) ProcessWait("wowemu.exe") WinActivate("wowemu") ProcessWait("wowemu.exe") WinSetState("wowemu", "", @SW_MAXIMIZE) ProcessWait("wowemu.exe") That code does not work!!! Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 8, 2005 Share Posted September 8, 2005 Sleep(1000) opt("WinTitleMatchMode", 4) WinSetOnTop("wowemu.exe", "", 1) ProcessWait("wowemu.exe") WinActivate("wowemu") ProcessWait("wowemu.exe") WinSetState("wowemu", "", @SW_MAXIMIZE) ProcessWait("wowemu.exe")<{POST_SNAPBACK}> [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 And yet again still no worky... Link to comment Share on other sites More sharing options...
Valuater Posted September 8, 2005 Share Posted September 8, 2005 (edited) I tried this numerous times and it worked notice " your program is already running" Run("explorer.exe", "", @SW_MINIMIZE ) Sleep(1500) ; the program is already running ( your program) WinActivate("My Documents"); title i want to activate ( give focus ) WinWait("") WinSetState("", "", @SW_MAXIMIZE) i thought i saw your window title as "G:\WOW\Wowemu.exe" ( or close to that ) in your other post 8) Edited September 9, 2005 by Valuater Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 Wow... now I don't know if it my computer or not!Download this: http://www.geocities.com/shykexmaster/MockUp.zipAnd try it with this code:HotKeySet("{ESC}", "Terminate") MsgBox(0, "WoW Server Restarter", "Running WoW server and minimizing..." & @CRLF & "Read read-me for other credits and information!") While 1 Sleep(2500) Start_WoW() WEnd Func Start_WoW() If Not ProcessExists("wowemu.exe") Then Sleep(1000) Run("loader_new.exe") EndIf ProcessWait("wowemu.exe") If ProcessExists("loader_new.exe") Then ProcessClose("loader_new.exe") EndIf Sleep(1000) opt("WinTitleMatchMode", 4) WinActivate("wowemu") WinWait("") WinSetState("", "", @SW_MAXIMIZE) $pixel = PixelGetColor(93, 95) If $pixel = 16776960 Then ProcessClose("wowemu.exe") EndIf EndFunc Func Terminate() Exit 0 EndFuncDoes the script work with those on your computer? Link to comment Share on other sites More sharing options...
Valuater Posted September 8, 2005 Share Posted September 8, 2005 first do this ;opt("WinTitleMatchMode", 4) ^ comment it out then let me know 8) Link to comment Share on other sites More sharing options...
Shyke Posted September 8, 2005 Author Share Posted September 8, 2005 OMG! YES!!! It finally works!! Thank-you, all of you that helped!!! Link to comment Share on other sites More sharing options...
Valuater Posted September 8, 2005 Share Posted September 8, 2005 (edited) OK... I tested your program and it worked here is the code expandcollapse popupHotKeySet("{ESC}", "Terminate") MsgBox(0, "WoW Server Restarter", "Running WoW server and minimizing..." & @CRLF & "Read read-me for other credits and information!") Start_WoW() While 1 Sleep(2500) WEnd Func Start_WoW() If Not ProcessExists("wowemu.exe") Then Sleep(1000) Run("C:\Temp\MockUp\loader_new.exe") EndIf ProcessWait("wowemu.exe") If ProcessExists("loader_new.exe") Then ProcessClose("loader_new.exe") EndIf Sleep(1000) ;opt("WinTitleMatchMode", 4) WinActivate("C:\Temp\MockUp\loader_new.exe") WinWait("") WinSetState("", "", @SW_MAXIMIZE) $pixel = PixelGetColor(93, 95) If $pixel = 16776960 Then ProcessClose("wowemu.exe") EndIf EndFunc Func Terminate() Exit 0 EndFunc it disappeared so fast that i test with this statement $pixel = "" ; PixelGetColor(93, 95) and it stayed on my screen... then i removed the "" ; like it was $pixel = PixelGetColor(93, 95) and it closed the dos window again YES it worked 8) EDIT Oh GREAT.... after all that effort he's got right.... thats really good for you and your desire (frustration too) .... happy for ya 8) Edited September 8, 2005 by Valuater Link to comment Share on other sites More sharing options...
Hayly Posted September 9, 2005 Share Posted September 9, 2005 (edited) alright dude, I tracked you down through like 3 threads to give you this, I'm sure you have a way to do this now based on your post, but I was in an older post, I hope this helps someone some day at least Dim $t Dim $line Dim $processID HotKeySet("{ESC}", "Terminate") MsgBox(0, "WoW Server Restarter", "Running WoW server and minimizing..." & @CRLF & "Read read-me for other credits and information!") Call("Start_WoW") While 1 Call("Start_WoW") Sleep(5000) WEnd Func Start_WoW() If Not ProcessExists ("wowemu.exe") Then $processID = Run("wowemu.exe", "", @SW_MINIMIZE, 6) EndIf Sleep(1000) $line = StdoutRead($processID) If StringInStr($line, ":This key is not for this computer.") Then Call("Stop_WoW") EndFunc Func Stop_WoW() $processID = ProcessExists("wowemu.exe") If $processID Then ProcessWaitClose($processID) Sleep(100) EndFunc Func Terminate() Exit 0 EndFunc requires a beta of some sort, but if nothing else, i thought it was an elegant solution. Edit 1: it's in reply to your closing based on text in it. I decided to post this because it doesnt rely on text color or pixel checking, but based on the text Edit 2: beta 3.1.1.74 Edited September 9, 2005 by Hayly Link to comment Share on other sites More sharing options...
Shyke Posted September 9, 2005 Author Share Posted September 9, 2005 Hayly... that one didn't work at all for varification if it works anyways thank-you for giving me some good idea's. Here's the bad new... Another problem has arised which is that on my bosses computer it does everything but it doesn't work for varification pixelwise so if it's a failure then it just treats it as a success... any idea? Link to comment Share on other sites More sharing options...
Valuater Posted September 9, 2005 Share Posted September 9, 2005 Hayly... that one didn't work at all for varification if it works anyways thank-you for giving me some good idea's.Here's the bad new...Another problem has arised which is that on my bosses computer it does everything but it doesn't work for varification pixelwise so if it's a failure then it just treats it as a success... any idea?<{POST_SNAPBACK}>expand your pixel search... you only have this$pixel = PixelGetColor(93, 95)try more of the abilities pixelsearch has by creating more of a boxed area to searchPixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )look at it in help8) Link to comment Share on other sites More sharing options...
Shyke Posted September 10, 2005 Author Share Posted September 10, 2005 $pixel = PixelGetColor(93, 95) worked on 8 resolutions, I don't think it is that. Are there any dlls or anything that must be sent with the program or other possible problems? 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