Jump to content

A Little Help


Recommended Posts

ok heres my script

; 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 by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

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

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? :think:

Edited 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

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? :think:

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

; 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 by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

hmmm I tryed this, but if I exit diablo it didn't exit the script

; 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 by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

maybe

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

NEWHeader1.png

Link to comment
Share on other sites

maybe

; 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 by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

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

NEWHeader1.png

Link to comment
Share on other sites

; 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 :think:
Thanks in advance
Link to comment
Share on other sites

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

; 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 by Evil_Has_Survived
Thanks in advance
Link to comment
Share on other sites

Oh.... uhhhhhhhhhh, April Fools :think:

Edited 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...