Sign in to follow this  
Followers 0
Tadesign

Help on Script

15 posts in this topic

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

Share this post


Link to post
Share on other sites



just change the pause hotkey

Share this post


Link to post
Share on other sites

just change the pause hotkey

What u mean? change the Key? i tryed many keys and still same problem...

or u mean pause code? can u explain how i do that?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I tryed DEL/PAUSE key... still bug.. any other suggestion?

Edited by Tadesign

Share this post


Link to post
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.  

Share this post


Link to post
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..

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I mean i need to put scrip to run on top of all screens, so when i press the pause key

it will stop script... no matter in what screen i am game or windows

Edit :

BUMP

Edited by Tadesign

Share this post


Link to post
Share on other sites

None know what i can do? i need this help.. thx.,..

Bump

Share this post


Link to post
Share on other sites

Alittle help plz.. anyone?

Share this post


Link to post
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!"

Share this post


Link to post
Share on other sites

OK sry.. waited a day to do it so BUMP

Share this post


Link to post
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.

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