iconz Posted July 2, 2005 Share Posted July 2, 2005 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 More sharing options...
FuryCell Posted July 2, 2005 Share Posted July 2, 2005 (edited) 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 $PausedHotKeySet("{Enter}", "TogglePause")HotKeySet("{ESC}", "Terminate")call("TogglePause")While 1 Send("{F8}") sleep(1000)WEndFunc TogglePause()$Paused = NOT $PausedWhile $Pausedsleep(100)ToolTip('Script is "Paused"',0,0)WEndToolTip("")EndFuncFunc Terminate()Exit 0EndFunc<{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("") EndFuncAlso , 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 July 2, 2005 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 More sharing options...
iconz Posted July 2, 2005 Author Share Posted July 2, 2005 ty i will try this im playing GunBound it is protected by Nprotect so maybe that mite be the reason? Link to comment Share on other sites More sharing options...
FuryCell Posted July 2, 2005 Share Posted July 2, 2005 (edited) 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 July 2, 2005 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 More sharing options...
Valuater Posted July 2, 2005 Share Posted July 2, 2005 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) Link to comment Share on other sites More sharing options...
iconz Posted July 2, 2005 Author Share Posted July 2, 2005 Maybe this could help to get focus on the game windowControlSend("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 help8)<{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 More sharing options...
FuryCell Posted July 2, 2005 Share Posted July 2, 2005 (edited) 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 July 2, 2005 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 More sharing options...
iconz Posted July 2, 2005 Author Share Posted July 2, 2005 noperz..... sayme error Link to comment Share on other sites More sharing options...
FuryCell Posted July 2, 2005 Share Posted July 2, 2005 (edited) 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 July 2, 2005 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 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