Evil_Has_Survived Posted April 8, 2006 Share Posted April 8, 2006 (edited) ok heres my script expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) Else EndIf Func Close() Send("!{F4}") EndFunc While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc and heres what I want it to look like please ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) Else if game does not exist then exit script ..... ..... ..... ..... so if the game gets closed the script will close with it thanks Edited April 8, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
AutoChris Posted April 8, 2006 Share Posted April 8, 2006 I typically do something like... While ProcessExists("diablogame.exe") ...your stuff here... WEnd -or- Do ...your stuff here... Until Not ProcessExists("diablogame.exe") At the end of your script you can through in a nice little "Exit" to quit the script if the game isn't running. You can also do WinExists, Not WinExists of course, if that works better for you. Link to comment Share on other sites More sharing options...
Infinitex0 Posted April 8, 2006 Share Posted April 8, 2006 (edited) So what your trying to do is whenever someone tries to get on diablo II this will close the program, and make the player think that there is something wrong with the game. That sounds a bit... Malicifent(probably not a real word). Why are you making a program like this? Edited April 8, 2006 by Infinitex0 The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center] Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 8, 2006 Author Share Posted April 8, 2006 (edited) So what your trying to do is whenever someone tries to get on diablo II this will close the program, and make the player think that there is something wrong with the game. That sounds a bit... Malicifent(probably not a real word). Why are you making a program like this? umm no you have it all wrong lol, it is soppose to do this, well since on hardcore if you die you die for good, so i made space bar exit the game fast, but after every time I have to login to diablo2 again I turn the script on again, but then theres two running that look like this expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf Func Close() Send("!{F4}") EndFunc While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc so if diablo is exited by the space bar, it gets rid of the script and pushing exit will also exit it so all I need is to add a line of script game not running kill script automatically Edited April 8, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 8, 2006 Author Share Posted April 8, 2006 (edited) hmmm I tryed this, but if I exit diablo it didn't exit the script expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) IfWinNotExist send("{EXIT}") EndIf Func Close() Send("!{F4}") EndFunc While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc well if the window didn't exist it was soppose to send exit which would get rid of the script, oh and well im here I might as well ask for help on pausing it, when I pushed the pause key on the keyboard it says the script is paused, but when I go to type, pushing the space bar it kicks me out instead, of spacing my text to send to friends for. chatting Edited April 8, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Valuater Posted April 8, 2006 Share Posted April 8, 2006 maybe expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else ToolTip( "The game isn´t running!",0,0) ;Exit(0) EndIf Sleep(100) WEnd ;;;; Functions Func Close() Send("!{F4}") EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc 8) Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 8, 2006 Author Share Posted April 8, 2006 (edited) maybe expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else ToolTip( "The game isn´t running!",0,0) ;Exit(0) EndIf Sleep(100) WEnd ;;;; Functions Func Close() Send("!{F4}") EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc 8) it works flawessly, one little problem when I push pause, then goto type, it says the script is paused, so I hit space to space my words but instead it boots me out of the game. Edited April 8, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Valuater Posted April 8, 2006 Share Posted April 8, 2006 (edited) thats what you set "space" to do... close the game with[F4] 8) Edited April 8, 2006 by Valuater Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 8, 2006 Author Share Posted April 8, 2006 thats what you set "space" to do... close the game with[F4] 8) I know but if I pause the script shoudn't it not read it, until I unpause it,,, Thanks in advance Link to comment Share on other sites More sharing options...
Valuater Posted April 8, 2006 Share Posted April 8, 2006 expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else ToolTip( "The game isn´t running!",0,0) ;Exit(0) EndIf Sleep(100) WEnd ;;;; Functions Func Close() Send("!{F4}") EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) HotKeySet("{Space}") ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc 8) Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 8, 2006 Author Share Posted April 8, 2006 expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else ToolTip( "The game isn´t running!",0,0) ;Exit(0) EndIf Sleep(100) WEnd ;;;; Functions Func Close() Send("!{F4}") EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) HotKeySet("{Space}") ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc 8) wow your so smart, but I don't get how you made it pause ill keep looking until I figure that out, thats sweet Thanks in advance Link to comment Share on other sites More sharing options...
Valuater Posted April 8, 2006 Share Posted April 8, 2006 just be thankful that.... "Good has Survived" 8) Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 8, 2006 Author Share Posted April 8, 2006 (edited) just be thankful that.... "Good has Survived" 8) rofl smart and funny I LOVE it well here it is the final hardcore safer I am making for now expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; MsgBox(64, "Done.", "©2006 - John Matthews Thanks goes out to autoit.com and everybody who helped special thanks to Valuater.") While 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else ToolTip( "The game isn´t running!",0,0) ;Exit(0) EndIf Sleep(100) WEnd ;;;; Functions Func Close() Send("!{F4}") EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) HotKeySet("{Space}") ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Edited April 8, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Infinitex0 Posted April 9, 2006 Share Posted April 9, 2006 (edited) Oh.... uhhhhhhhhhh, April Fools Edited April 9, 2006 by Infinitex0 The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center] Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 9, 2006 Author Share Posted April 9, 2006 Oh.... uhhhhhhhhhh, April Fools rofl Thanks in advance 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