Shyke Posted September 2, 2005 Posted September 2, 2005 Hello all, I just found out about this wonderful scripting launguage and compiler so I am a complete newbie to it but not a newbie to programming. I came accross a problem for the new WoW Servers that they crashed once every four hours or so depending on what players were doing and I wanted to make a program to automatically restart them when they failed. I know how to do this in the other programming launguage that I come from but I have no clue how to in this launguage... I went through the whole help file and I couldn't quite piece together what I needed it to do in code. I wish to try a little bit more before I give up and ask one of you to help me but below I will list what I need the program to do: - Tell the user that the process has started and that WoW is being launched (done) - Minimize to tray with right click option (exit) - Check to see if WoWe.exe is running and if not then launches it and continues this cycle indefinatly I am sure that most of you guys see this as very easy to do but I am having problems with it and I need to get this done asap. If you help me out on this then you will get credit. Thanks in advance, Shyke.
Valuater Posted September 2, 2005 Posted September 2, 2005 show us your script that is (Done) so we can add to it 8)
Shyke Posted September 2, 2005 Author Posted September 2, 2005 (edited) You just wanna laugh at how sad this is, anyway remember that I am a newbie... MsgBox(0, "WoW server Restarter", "Running WoW and minimizing...") But yeah, other then that I have nothing done... it is rather late (morning because so late) so my mind isn't thinking very well. EDIT: I just found something that I could use... I missed a whole section because I am so tired... lo! Edited September 2, 2005 by Shyke
Shyke Posted September 2, 2005 Author Posted September 2, 2005 Sorry for the double post but... How do I say if process doesn't exist?
Shyke Posted September 3, 2005 Author Posted September 3, 2005 Alright, thanks. Now I have everything done except for getting it to minimize... help?
Valuater Posted September 3, 2005 Posted September 3, 2005 Alright, thanks.Now I have everything done except for getting it to minimize... help?<{POST_SNAPBACK}>now show us what script you have.... ( always show the script)8)
Shyke Posted September 3, 2005 Author Posted September 3, 2005 (edited) Alright, I will remember that from now on... MsgBox(0, "WoW Server Restarter", "Running WoW and minimizing...") If Not ProcessExists ("wowemu.exe") Then Run("wowemu.exe") EndIf It doesn't quite work properly, I want it to continually repeat that and I still need to figure out how to get the thing to run until exited while still in the tray. EDIT: Another thing, how do you create another line in the text boxes so it would look like this: [WoW Server Restarter] (Title) Running WoW and minimizing... Info crap here [Ok] (Where it would normally be) Edited September 3, 2005 by Shyke
Valuater Posted September 3, 2005 Posted September 3, 2005 (edited) here ya go... glad you tried HotKeySet("{ESC}", "Terminate") Call("Start_WoW") AdlibEnable("Start_WoW", 5000); 1000 equals every second Func Start_WoW() If Not ProcessExists ("wowemu.exe") Then Run("wowemu.exe") MsgBox(0, "WoW server Restarter", "Running WoW and minimizing..." & @CRLF & " info crap here! ") EndIf EndFunc Func Terminate() Exit 0 EndFunc 8) EDIT: I changed it to show the message box everytime it restarts WoW 8) Edited September 3, 2005 by Valuater
Shyke Posted September 3, 2005 Author Posted September 3, 2005 here ya go... glad you triedHotKeySet("{ESC}", "Terminate") Call("Start_WoW") AdlibEnable("Start_WoW", 5000); 1000 equals every second Func Start_WoW() If Not ProcessExists ("wowemu.exe") Then Run("wowemu.exe") MsgBox(0, "WoW server Restarter", "Running WoW and minimizing..." & @CRLF & " info crap here! ") EndIf EndFunc Func Terminate() Exit 0 EndFunc8)EDIT:I changed it to show the message box everytime it restarts WoW8)<{POST_SNAPBACK}>I wish I could have done more work on it but even that didn't work!I perposefully made the server crash and the program didn't restart it nor did it go to taskbar... Hmm...
Valuater Posted September 3, 2005 Posted September 3, 2005 are sure about this part Run("wowemu.exe") maybe it should be Run("C:\Program Files\Wow\wowemu.exe") or .... something like thst... i do not have wow to look for it 8)
Shyke Posted September 3, 2005 Author Posted September 3, 2005 (edited) I am sure, in the readme I have told the user to put it in the base directory. Here is the exact name of the WoW server "WoWemu.exe" EDIT: Another thing is that you have it set to close the program instead of keeping it open and minimizing it... Edited September 3, 2005 by Shyke
Valuater Posted September 3, 2005 Posted September 3, 2005 (edited) it is not set to exit... only if you press the"escape" button try this Run("C:\WoWemu.exe", "", @SW_MINIMIZE) 8) Edited September 3, 2005 by Valuater
Shyke Posted September 3, 2005 Author Posted September 3, 2005 You can't use that, the user has to be able to drop the exe into the wow server folder, .
Valuater Posted September 3, 2005 Posted September 3, 2005 You can't use that, the user has to be able to drop the exe into the wow server folder, .<{POST_SNAPBACK}>and where is thatC:\...where???
Shyke Posted September 3, 2005 Author Posted September 3, 2005 It depends on the person... I have mine at C:\Documents and Settings\Owner\Desktop\WoWEmu_4500_1.9\ but some people may have it in thier prgram files and such.
Valuater Posted September 3, 2005 Posted September 3, 2005 It depends on the person... I have mine at but some people may have it in thier prgram files and such.<{POST_SNAPBACK}>now that.... can be a problem8)
Valuater Posted September 3, 2005 Posted September 3, 2005 so lets try yours first HotKeySet("{ESC}", "Terminate") Call("Start_WoW") AdlibEnable("Start_WoW", 5000); 1000 equals every second Func Start_WoW() If Not ProcessExists ("wowemu.exe") Then Run("C:\Documents and Settings\Owner\Desktop\WoWEmu_4500_1.9\wowemu.exe", "", @SW_MINIMIZE) MsgBox(0, "WoW server Restarter", "Running WoW and minimizing..." & @CRLF & " info crap here! ") EndIf EndFunc Func Terminate() Exit 0 EndFunc let me know 8)
Valuater Posted September 3, 2005 Posted September 3, 2005 AdLib doesn't seem to do its jobb ( i will figure that out later) new code with while .... i tested with a program i have... it worked Dim $t HotKeySet("{ESC}", "Terminate") Call("Start_WoW") While 1 $t = $t + 1 If $t = 5 Then Call("Start_WoW") $t = "" EndIf Sleep(1000) WEnd Func Start_WoW() If Not ProcessExists ("wowemu.exe") Then Run("C:\Documents and Settings\Owner\Desktop\WoWEmu_4500_1.9\wowemu.exe", "", @SW_MINIMIZE) MsgBox(0, "WoW server Restarter", "Running WoW and minimizing..." & @CRLF & " info crap here! ") EndIf EndFunc Func Terminate() Exit 0 EndFunc still unsure of your location for the exe file 8)
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