Jump to content

latop problem with send F8 key


Recommended Posts

Hey i have a problem i used a scribt by a nice user on this forum n it doesn't work on my laptop well it does actually its just that it works perfect but its not pressing the f8 key every 2 seconds as its suppose to when i play the game but normally it does like on the desktop it presses any key i want to but in game it does not can any1 help? i would greatly apreciate it.

oh heres script ..

#include <GuiConstants.au3>

Global $Paused

HotKeySet("{Enter}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

call("TogglePause")

While 1

Send("{F8}")

sleep(1000)

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Link to comment
Share on other sites

Hey i have a problem i used a scribt by a nice user on this forum n it doesn't work on my laptop well it does actually its just that it works perfect but its not pressing the f8 key every 2 seconds as its suppose to when i play the game but normally it does like on the desktop it presses any key i want to but in game it does not can any1 help? i would greatly apreciate it.

oh heres script ..

#include <GuiConstants.au3>

Global $Paused

HotKeySet("{Enter}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

call("TogglePause")

While 1

    Send("{F8}")

    sleep(1000)

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

<{POST_SNAPBACK}>

First of all I see Sleep(1000). This should be Sleep(2000) otherwise it will be every second. Second why is there #Include <GuiConstants.au3> when there is no GUI?

About you problem: Enter is a commonly used key in games and the game might be stealing the key so maybe you should try a different HotKey Like "{F2}" so try this.

Global $Paused
HotKeySet("{F2}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
call("TogglePause")

While 1
    Send("{F8}")
    sleep(2000)
WEnd

Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Also , what game are you playing? I (or another AutoIt user) might have it and be able to test the script so i (or they) can fix it.

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

ty i will try this im playing GunBound it is protected by Nprotect so maybe that mite be the reason?

<{POST_SNAPBACK}>

I thought NProtect was a part of Norton Utilties, Not something to protect games. Also if it is AFIAK they only try to stop memory editing which is not done in this script so it probably would not cause a problem.

P.S. Your Welcome.

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

Maybe this could help to get focus on the game window

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")

ControlSend works in a similar way to Send but it can send key strokes directly to a window, rather than just to the active window.

read about this in help

8)

NEWHeader1.png

Link to comment
Share on other sites

Maybe this could help to get focus on the game window

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")

ControlSend works in a similar way to Send but it can send key strokes directly to a window, rather than just to the active window.

read about this in help

8)

<{POST_SNAPBACK}>

so how would the script be if the window name is "GunBound"

and btw i tried that script with the f2 and i get this error:

Link to comment
Share on other sites

so how would the script be if the window name is "GunBound"

and btw i tried that script with the f2 and i get this error:

<{POST_SNAPBACK}>

About the error: Maybe you copied it incorrectly and forgot to highlight the terminate func. I have made that mistake before.

Here is the script as a file.

Edit:File removed since there is an updated one below.

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

noperz..... sayme error

<{POST_SNAPBACK}>

Oops. :"> It was my fault. I forgot to copy and paste the terminate func. See. Told you i made that mistake before and i did it agian.

Here it is again. Now you should not get the error.

F8Script.au3

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
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...