Sign in to follow this  
Followers 0
flip2405

a little help with process's

12 posts in this topic

Heres what i have

$D2path = IniRead(@scriptdir & "\Config.ini","D2","Path","")
$D2params = IniRead(@scriptdir & "\Config.ini","D2","Params","")
$D2win= iniread(@Scriptdir & "\Config.ini","D2","D2window name","")
$Account = iniread(@Scriptdir & "\Config.ini","Bnet","Account","")
$Password = iniread(@Scriptdir & "\Config.ini","Bnet","Password","")
$Char = IniRead(@Scriptdir & "\Config.ini","Bnet", "Char","")

while 1
ProcessClose("Dwwin.exe")
$Process="Vex.exe"

    If ProcessExists($Process) Then
        Do
            Sleep(100)
        Until Not ProcessExists($Process)
        ProcessClose("D2Loader-1.11b.exe")
        Diablo()
        EndIf
WEnd


Func Diablo()
    ShellExecute($D2path,$D2Params)
        Sleep(600)
        Winmove($d2win,"",0,0)
        sleep(600)
        Mouseclick("Left",101,127)
        Sleep(500)
        MouseClick("Left",384,409)
        Sleep(500)
        Mouseclick("left",324,378)
        Sleep(200)
        Send("{Enter}")
        SLeep(100)
        Mouseclick("Left",416,378)
        sleep(5000)
        Mouseclick("Left",392,364)
        Sleep(200)
        Send("^a")
        Sleep(200)
        Send($Account)
        sleep(200)
        Send("{TAB}") 
        Sleep(200)
        Send($Password)
        sleep(200)
        Send("{ENTER}")
        sleep(200)
        If $char ="1" Then
            Mouseclick("left",158,153,2,5)
        ElseIf $char ="2" Then
            MouseClick("left",440,148,2,5)
        ElseIf $char ="3" Then
            MouseClick("Left",163,232,2,5)
        ElseIf $char ="4" Then
            MouseClick("Left",440,247,2,5)
        ElseIf $char ="5" Then
            MouseClick("left",166,337,2,5)
        ElseIf $char ="6" Then
            Mouseclick("left",446,343,2,5)
        ElseIf $char ="7" Then
            MouseClick("left"167,438,2,5)
        ElseIf $char ="8" Then
            Mouseclick("Left",429,433,2,5)
        EndIf
        sleep(200)
        MouseClick("left",593,488)
        sleep(100)
        MouseClick("Left",469,182)
        sleep(600)
        Send("adnfajks")
        Sleep(600)
        Send("{Tab}")
        Sleep(600)
        Send("akldshf")
        Sleep(600)
        Send("{Enter}")
        Sleep(5000)
        Mouseclick("left",314,257)      
        sleep(600)
        Send("{esc}")
        sleep(100)
        Mouseclick("left",307,224)
        sleep(600)
        Send("{Esc}")
        Sleep(1200)
        Send("{Esc}")
        sleep(1200)
        WinMinimizeAll()
        Sleep(1200)
        Shellexecute("D:\Documents and Settings\Dem0n\Desktop\zze\Redvex 3.2 2-25-08\vex.exe")
        Sleep(600)
        Send("^s")
        sleep(600)
        WinActivate("Diablo II")
        sleep(600)
        Mouseclick("left",328,410)
        sleep(600)
        MouseClick("left",292,404)
        Sleep(200)
        Send("{Enter}")
        Sleep(600)
        Mouseclick("left",406,379)
        Sleep(5000)
        ProcessClose("D2Loader-1.11b.exe")
        sleep(100)
        Processclose("vex.exe")
        SLeep(100)
        Shellexecute("D:\Documents and Settings\Dem0n\Desktop\Redvex 3.2 2-25-08\Vex.exe")
        sleep(200)
        WinActivate("Vex")
        sleep(200)
        Send("^s")
        
EndFunc

Okay my problem is some times dwwin.exe shows up some times it dont but regardles vex.exe crashes Now i want it to pay attention to both how ever if dwwin shows up i want it to close dwwin n not to worry about redvex because when ddwin shows up its just telling me redvex is not responding and when you close dwwin it closes vex.exe and the script will execute regardless

Share this post


Link to post
Share on other sites



Okay my problem is some times dwwin.exe shows up some times it dont but regardles vex.exe crashes Now i want it to pay attention to both how ever if dwwin shows up i want it to close dwwin n not to worry about redvex because when ddwin shows up its just telling me redvex is not responding and when you close dwwin it closes vex.exe and the script will execute regardless

So, you want it to monitor for dwwin.exe, and if there, kill it; and then what? Or do you want it to kill vex.exe and if dwwin.exe shows up, kill it instead? Do you want to leave vex.exe running while dwwin.exe shows up?

I'm all confused. I like how you did some of what you wanted, but I'm confused about what you need. If i understand you correctly, you want something that will monitor the active processes on the computer, and if vex.exe is NOT running, to execute it; and if dwwin.exe is running kill it, and then check if vex.exe is running and if not start it, otherwise [leave it alone. *see note below]

Does that sound about right?

*but of course, if dwwin.exe comes up because vex.exe crashed, then um, you'll want to either a) kill dwwin.exe and vex.exe and then relaunch vex.exe or .... well, no, that's about your only option :D Unless of course your talking about dwwin.exe coming up because of another program failing which causes vex.exe to die.................................................................................................

.............................liked i said, i'm all confused about what you want :D Let us know tho, because some of us actually are learning Auto.IT and love creating things for people just to do it :)


-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Share this post


Link to post
Share on other sites

So, you want it to monitor for dwwin.exe, and if there, kill it; and then what? Or do you want it to kill vex.exe and if dwwin.exe shows up, kill it instead? Do you want to leave vex.exe running while dwwin.exe shows up?

I'm all confused. I like how you did some of what you wanted, but I'm confused about what you need. If i understand you correctly, you want something that will monitor the active processes on the computer, and if vex.exe is NOT running, to execute it; and if dwwin.exe is running kill it, and then check if vex.exe is running and if not start it, otherwise [leave it alone. *see note below]

Does that sound about right?

*but of course, if dwwin.exe comes up because vex.exe crashed, then um, you'll want to either a) kill dwwin.exe and vex.exe and then relaunch vex.exe or .... well, no, that's about your only option :D Unless of course your talking about dwwin.exe coming up because of another program failing which causes vex.exe to die.................................................................................................

.............................liked i said, i'm all confused about what you want :D Let us know tho, because some of us actually are learning Auto.IT and love creating things for people just to do it :)

Okay this is how it works im running a bot for diablo II okay now.... When dwwin.exe shows up it is the error you get when a program is not responding(vex.exe) so i want it to kill the dwwin.exe witch will automatically kill vex.exe But dwwin.exe dose not always show up sometimes vex.exe will just crash without dwwin.exe showing up witch is why i have it watching vex.exe so basicly i need it to watch for dwwin.exe to show up and if it dose then close it then vex will die and the script will continue but if vex crashes without dwwin showing up then i also want the script to continue if you dont understand what im saying then i dont know

Share this post


Link to post
Share on other sites

Okay this is how it works im running a bot for diablo II okay now.... When dwwin.exe shows up it is the error you get when a program is not responding(vex.exe) so i want it to kill the dwwin.exe witch will automatically kill vex.exe But dwwin.exe dose not always show up sometimes vex.exe will just crash without dwwin.exe showing up witch is why i have it watching vex.exe so basicly i need it to watch for dwwin.exe to show up and if it dose then close it then vex will die and the script will continue but if vex crashes without dwwin showing up then i also want the script to continue if you dont understand what im saying then i dont know

I would, however do what the poster above me did, just check if it exists and then close it if it does. If you are running windows dwwin.exe should come automatically if WINDOWS DETECTS that a program has crashed; if windows doesn't detect the crash, and the program just terminates or freezes, it can take some time for dwwin.exe to come up. So doing the repetitive test every few minutes should resolve your issue.

I don't mean my post to sound mean, by no means is that the case; but to be honest, it's very difficult to understand people sometimes why they absolutely refuse to use, oh, i don't know, punctuation :D


-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

so would this work

AdlibEnable("check",100)
Adlibenable("Check2",100)


; My script

Func check()
If ProcessExists("dwwin.exe") Then ProcessClose("dwwin.exe")
If processexists("Vex.exe") Then  
do 
sleep100
Untill not processexists("vex.exe")
EndFunc
Edited by d3m0n

Share this post


Link to post
Share on other sites

I would, however do what the poster above me did, just check if it exists and then close it if it does. If you are running windows dwwin.exe should come automatically if WINDOWS DETECTS that a program has crashed; if windows doesn't detect the crash, and the program just terminates or freezes, it can take some time for dwwin.exe to come up. So doing the repetitive test every few minutes should resolve your issue.

I don't mean my post to sound mean, by no means is that the case; but to be honest, it's very difficult to understand people sometimes why they absolutely refuse to use, oh, i don't know, punctuation :D

No dwwin.exe dosnt always comes up because the bot is programed to close if i die how ever some times it gose nonresponsive and the screen comes up

Share this post


Link to post
Share on other sites

so would this work

AdlibEnable("check",100)
 Adlibenable("Check2",100)
 
 
; My script
 
 Func check()
 If ProcessExists("dwwin.exe") Then ProcessClose("dwwin.exe")
 If processexists("Vex.exe") Then  
 do 
 sleep100
 Untill not processexists("vex.exe")
 EndFunc
No you can only have one adlib, but what is Check2?

If need to have check2 also just call check2 from check :D


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

No you can only have one adlib, but what is Check2?

If need to have check2 also just call check2 from check :D

So now im confused look at the vary top of my script basicly thats what i need but i need it to work :/ so Check 2 is the main thing it is watching I dont know how to explain it you know how when one of your programs crash you get that little annying microsoft box it says do you want to send this error blah blah blah then you have button send dont sent well thats what dwwin.exe is now my actul bot witch is what dies is vex.exe dwwin dose not always show up when it crashes in that case it would crash then i would be left with the same problem im left with now it would not restart my bot because it did not show dwwin it just crashed but when dwwin shows up then the process of vex is still there please look at the vary top of my source

Share this post


Link to post
Share on other sites

OK so this?

$D2path = IniRead(@scriptdir & "\Config.ini","D2","Path","")
$D2params = IniRead(@scriptdir & "\Config.ini","D2","Params","")
$D2win= iniread(@Scriptdir & "\Config.ini","D2","D2window name","")
$Account = iniread(@Scriptdir & "\Config.ini","Bnet","Account","")
$Password = iniread(@Scriptdir & "\Config.ini","Bnet","Password","")
$Char = IniRead(@Scriptdir & "\Config.ini","Bnet", "Char","")
AdlibEnable("check")
while 1

Diablo()
sleep(20)
WEnd

Func check()
    If ProcessExists("dwwin.exe") Then ProcessClose("dwwin.exe")
    If Not ProcessExists("vex.exe") Then Run("vex.exe")
EndFunc

Func Diablo()
    ShellExecute($D2path,$D2Params)
        Sleep(600)
        Winmove($d2win,"",0,0)
        sleep(600)
        Mouseclick("Left",101,127)
        Sleep(500)
        MouseClick("Left",384,409)
        Sleep(500)
        Mouseclick("left",324,378)
        Sleep(200)
        Send("{Enter}")
        SLeep(100)
        Mouseclick("Left",416,378)
        sleep(5000)
        Mouseclick("Left",392,364)
        Sleep(200)
        Send("^a")
        Sleep(200)
        Send($Account)
        sleep(200)
        Send("{TAB}")
        Sleep(200)
        Send($Password)
        sleep(200)
        Send("{ENTER}")
        sleep(200)
        If $char ="1" Then
            Mouseclick("left",158,153,2,5)
        ElseIf $char ="2" Then
            MouseClick("left",440,148,2,5)
        ElseIf $char ="3" Then
            MouseClick("Left",163,232,2,5)
        ElseIf $char ="4" Then
            MouseClick("Left",440,247,2,5)
        ElseIf $char ="5" Then
            MouseClick("left",166,337,2,5)
        ElseIf $char ="6" Then
            Mouseclick("left",446,343,2,5)
        ElseIf $char ="7" Then
            MouseClick("left"167,438,2,5)
        ElseIf $char ="8" Then
            Mouseclick("Left",429,433,2,5)
        EndIf
        sleep(200)
        MouseClick("left",593,488)
        sleep(100)
        MouseClick("Left",469,182)
        sleep(600)
        Send("adnfajks")
        Sleep(600)
        Send("{Tab}")
        Sleep(600)
        Send("akldshf")
        Sleep(600)
        Send("{Enter}")
        Sleep(5000)
        Mouseclick("left",314,257)        
        sleep(600)
        Send("{esc}")
        sleep(100)
        Mouseclick("left",307,224)
        sleep(600)
        Send("{Esc}")
        Sleep(1200)
        Send("{Esc}")
        sleep(1200)
        WinMinimizeAll()
        Sleep(1200)
        Shellexecute("D:\Documents and Settings\Dem0n\Desktop\zze\Redvex 3.2 2-25-08\vex.exe")
        Sleep(600)
        Send("^s")
        sleep(600)
        WinActivate("Diablo II")
        sleep(600)
        Mouseclick("left",328,410)
        sleep(600)
        MouseClick("left",292,404)
        Sleep(200)
        Send("{Enter}")
        Sleep(600)
        Mouseclick("left",406,379)
        Sleep(5000)
        ProcessClose("D2Loader-1.11b.exe")
        sleep(100)
        Processclose("vex.exe")
        SLeep(100)
        Shellexecute("D:\Documents and Settings\Dem0n\Desktop\Redvex 3.2 2-25-08\Vex.exe")
        sleep(200)
        WinActivate("Vex")
        sleep(200)
        Send("^s")
        
EndFunc

Or do you need to restart the Diablo function as well if vex.exe has crashed?


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

OK so this?

$D2path = IniRead(@scriptdir & "\Config.ini","D2","Path","")
$D2params = IniRead(@scriptdir & "\Config.ini","D2","Params","")
$D2win= iniread(@Scriptdir & "\Config.ini","D2","D2window name","")
$Account = iniread(@Scriptdir & "\Config.ini","Bnet","Account","")
$Password = iniread(@Scriptdir & "\Config.ini","Bnet","Password","")
$Char = IniRead(@Scriptdir & "\Config.ini","Bnet", "Char","")
AdlibEnable("check")
while 1

Diablo()
sleep(20)
WEnd

Func check()
    If ProcessExists("dwwin.exe") Then ProcessClose("dwwin.exe")
    If Not ProcessExists("vex.exe") Then Run("vex.exe")
EndFunc



Func Diablo()
    ShellExecute($D2path,$D2Params)
        Sleep(600)
        Winmove($d2win,"",0,0)
        sleep(600)
        Mouseclick("Left",101,127)
        Sleep(500)
        MouseClick("Left",384,409)
        Sleep(500)
        Mouseclick("left",324,378)
        Sleep(200)
        Send("{Enter}")
        SLeep(100)
        Mouseclick("Left",416,378)
        sleep(5000)
        Mouseclick("Left",392,364)
        Sleep(200)
        Send("^a")
        Sleep(200)
        Send($Account)
        sleep(200)
        Send("{TAB}")
        Sleep(200)
        Send($Password)
        sleep(200)
        Send("{ENTER}")
        sleep(200)
        If $char ="1" Then
            Mouseclick("left",158,153,2,5)
        ElseIf $char ="2" Then
            MouseClick("left",440,148,2,5)
        ElseIf $char ="3" Then
            MouseClick("Left",163,232,2,5)
        ElseIf $char ="4" Then
            MouseClick("Left",440,247,2,5)
        ElseIf $char ="5" Then
            MouseClick("left",166,337,2,5)
        ElseIf $char ="6" Then
            Mouseclick("left",446,343,2,5)
        ElseIf $char ="7" Then
            MouseClick("left"167,438,2,5)
        ElseIf $char ="8" Then
            Mouseclick("Left",429,433,2,5)
        EndIf
        sleep(200)
        MouseClick("left",593,488)
        sleep(100)
        MouseClick("Left",469,182)
        sleep(600)
        Send("adnfajks")
        Sleep(600)
        Send("{Tab}")
        Sleep(600)
        Send("akldshf")
        Sleep(600)
        Send("{Enter}")
        Sleep(5000)
        Mouseclick("left",314,257)        
        sleep(600)
        Send("{esc}")
        sleep(100)
        Mouseclick("left",307,224)
        sleep(600)
        Send("{Esc}")
        Sleep(1200)
        Send("{Esc}")
        sleep(1200)
        WinMinimizeAll()
        Sleep(1200)
        Shellexecute("D:\Documents and Settings\Dem0n\Desktop\zze\Redvex 3.2 2-25-08\vex.exe")
        Sleep(600)
        Send("^s")
        sleep(600)
        WinActivate("Diablo II")
        sleep(600)
        Mouseclick("left",328,410)
        sleep(600)
        MouseClick("left",292,404)
        Sleep(200)
        Send("{Enter}")
        Sleep(600)
        Mouseclick("left",406,379)
        Sleep(5000)
        ProcessClose("D2Loader-1.11b.exe")
        sleep(100)
        Processclose("vex.exe")
        SLeep(100)
        Shellexecute("D:\Documents and Settings\Dem0n\Desktop\Redvex 3.2 2-25-08\Vex.exe")
        sleep(200)
        WinActivate("Vex")
        sleep(200)
        Send("^s")
        
EndFunc

Or do you need to restart the Diablo function as well if vex.exe has crashed?

I need it to run the diablo function if vex has crashed aswell but your understanding what i mean now tyvm for your time and help sorry for being impaitent i have been working on this script since about 12:00 it is now 9:00 Edited by d3m0n

Share this post


Link to post
Share on other sites

I need it to run the diablo function if vex has crashed aswell but your understanding what i mean now tyvm for your time and help sorry for being impaitent i have been working on this script since about 12:00 it is now 9:00

Well I'm getting veeery sleepy now, it's 3:30 am in Sweden now :D

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0