Jump to content

Recommended Posts

Posted

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...

Posted (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 by B3TA_SCR1PT3R

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Posted (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 lol

WinActivate("C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe","")
WinSetState("C:\Documents and Settings\Shyke\Desktop\Mock-Up\WoWemu.exe","",@SW_MAXIMIZE")
Edited by B3TA_SCR1PT3R

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Posted

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)
Posted

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!!!

Posted

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]

Posted (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 by Valuater

NEWHeader1.png

Posted

Wow... now I don't know if it my computer or not!

Download this: http://www.geocities.com/shykexmaster/MockUp.zip

And 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
EndFunc

Does the script work with those on your computer?

Posted (edited)

OK... I tested your program and it worked

here is the code

HotKeySet("{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 by Valuater

NEWHeader1.png

Posted (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 :P

Edit 2: beta 3.1.1.74

Edited by Hayly
Posted

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?

Posted

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 search

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

look at it in help

8)

NEWHeader1.png

Posted

$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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...