Sign in to follow this  
Followers 0
Evil_Has_Survived

Help Me If You Don't Mind :p

5 posts in this topic

ok in a game I play I want to be able tell the script the game is running, and I want to bind space bar to

alt-f4 so when I tap on the spacebar I quickly log out, so It would look something like this please

running("game")

and if game is not running message box pops up saying ("game not found")

bind/space_pressed = alt-f4

this will help in my game alot because I don't want to die and lose gold.

Thanks in advance


Thanks in advance

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

try this :

; When it is a browser game then check for the window instead of the game.exe or take the broswer.exe

If ProcessExists("game.exe") 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

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

try this :

; When it is a browser game then check for the window instead of the game.exe or take the broswer.exe

If ProcessExists("game.exe") 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

So long,

Mega

wow I love how you got it set up, but when Im in the game I hit the script and It says im not in the game, and I gave it the right location to. Ill keep screwing with it for now. :) hmm im still new but I wonder if I used WinExists instead of ProcessExists would it make a differents, because WinExists Checks to see if a specified window exists. Well ProcessExists Checks to see if a specified process exists, It doesn't sound like it would make a differents but ill try. HOLY SHIT lol I was correct thanks Mega you have gave me a great start. hehe I don't lose gold now Thanks again.

Edited by Evil_Has_Survived

Thanks in advance

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

wow I love how you got it set up, but when Im in the game I hit the script and It says im not in the game, and I gave it the right location to. Ill keep screwing with it for now. :) hmm im still new but I wonder if I used WinExists instead of ProcessExists would it make a differents, because WinExists Checks to see if a specified window exists. Well ProcessExists Checks to see if a specified process exists, It doesn't sound like it would make a differents but ill try. HOLY SHIT lol I was correct thanks Mega you have gave me a great start. hehe I don't lose gold now Thanks again.

HI,

there is a difference. WinExists is for windows and ProcessExists for processes. What is it for a game? Browser or has it got a exe that you can see in the taskmanager?

For getting the correct WindowsTitle take the " Autoit Window Info "and have a look at Opt("WinTitleMatchMode", X)

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

HI,

there is a difference. WinExists is for windows and ProcessExists for processes. What is it for a game? Browser or has it got a exe that you can see in the taskmanager?

For getting the correct WindowsTitle take the " Autoit Window Info "and have a look at Opt("WinTitleMatchMode", X)

So long,

Mega

Thanks I got it working it was a WinExists


Thanks in advance

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