Jump to content

Help on Script


Tadesign
 Share

Recommended Posts

Hi guys, im jsut new on AutoIt, and i got a question tried many things but not work...

i found a code here and its work perfectly on the game that i want.. but i got a problem

it has a pause key.. but when im on windows screen i can pause but when i go to the game...its dosent pause..

so i need alt+tab to windows press pause and back to game.. can someone help me.. to put the scrip on top so when i press the pause button on game.. it will stop script... the script are this one:

; Press Esc to terminate script, T to "pause"

Global $Paused
HotKeySet("{t}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage");Shift-Alt-d

;;;; Body of program would go here;;;;
While 1
    $begin = TimerInit()
    sleep(01)
    $dif= TimerDiff($begin) 
    send ("{8}{7}{6}")    
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
Link to comment
Share on other sites

If you took 1 minute to read the section on 'Hotkeys' in the helpfile, you would have understood that hot202 was telling you to change the configuration on your Hotkey setup

HotKeySet("t", "TogglePause"); 't' will pause
HotKeySet("!{TAB}", "TogglePause"); 'ALT+TAB' will pause
HotKeySet("!{TAB}t", "TogglePause"); 'ALT+TAB+t' will pause

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

If you took 1 minute to read the section on 'Hotkeys' in the helpfile, you would have understood that hot202 was telling you to change the configuration on your Hotkey setup

HotKeySet("t", "TogglePause"); 't' will pause
HotKeySet("!{TAB}", "TogglePause"); 'ALT+TAB' will pause
HotKeySet("!{TAB}t", "TogglePause"); 'ALT+TAB+t' will pause

Na man... i mean my pause key dont work when im in game screen

so i need alt+tab to go to windows and use the T key to pause

i want to press only a key into the game screen and it pause script..

Link to comment
Share on other sites

You will be getting no help as long as you keep bumping your thread. Read my signature.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Firsty, you are automating a game, so you are unlikely to get much help with that.

For future info, if a window wont accept its input unless its active then activate it.

Look up WinActivate in the help file.

If you insist on your alt and tab, then look up the Send function, also in the helpfile.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...