Jump to content

Recommended Posts

Posted

Hey.

I need to do 2 function on the {Home} Key

when i do

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

HotKeySet("{Home}", "Trial")

it dont work.

Fix please : D

Thx

ZanaxNL

Posted

Ok,

but i have on that [home] key a sending key script. but i want that he automatic close in 30minutes. but than will the sending keys stops by the line. sleep(1800000) so he will only wait.. how to fix that ?

Posted

With the HOME key he will start the progress (Sending keystrokes)

And when the HOME key is pressed then there most be a timer that says Over 30minutes > Exit

Help me : (

Posted

Func TogglePause()
    $UnPaused = NOT $UnPaused
    While $UnPaused
        ToolTip("Bot Active",0,0)
        If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{TAB}"),0)    
        Sleep (500)
        If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0)    
        If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F1}"),0)
        Sleep (1000)
        If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0)    
        Sleep (500) 
    WEnd

EndFunc

I want that when TogglePause, ((HOME) key) is pressed/run than after 30minutes he will shutdown automaticly. when i write down Sleep (1800000) he wil stop also sending those controlsends. Please Fix this : ( !!

THANKS

ZanaxNL

Posted

It only count how long it takes... can u fix it in the scirpt what i post in my last post.

I dont understand what u mean...

Sorry,

ZanaxNL

Posted

OMG?

u can better what to fill in.

not giv some script codes.

Just tell what to do. timerinit just count how much 1 loop cost in time.

i want that that over 30minutes the looping stopt and > exit

Posted (edited)

something like this perhaps

Global $time
Func TogglePause()
    $UnPaused = NOT $UnPaused
    If $UnPaused Then
        $time  = TimerInit()
    EndIf
    If TimerDiff($time) >= (1000 * 60) * 30 Then
        Exit
    EndIf   
    While $UnPaused
        ToolTip("Bot Active",0,0)
        If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{TAB}"),0)    
        Sleep (500)
        If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0)    
        If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F1}"),0)
        Sleep (1000)
        If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0)    
        Sleep (500) 
    WEnd

EndFunc

edit: ZOMG !!!

Edited by JohnOne

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

Monkey's are, like, natures humans.

Posted

"ToolTip("Bot Active",0,0)"

I'm done. ;)

OMG?

u can better what to fill in.

not giv some script codes.

Yup, he's making a BOT. He won't show us the ControlSend title because he knows we're not going to help him that way. :)

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Posted (edited)

Pfffffff, why do you think that. its about mozzilla. but not evrybody has to know that.

Yes its a game. but flash game on game site.

Just wanna know how to stop the scirpt in a time

Im im new, play with it around a week or someting

Edited by ZanaxNL
Posted

Try this:

#include <GUIConstantsEx.au3>

HotKeySet("{HOME}", "FunctionH")

Global $Form1 = GUICreate("Form1", 349, 49, 429, 265)
Global $Label1 = GUICtrlCreateLabel("Press HOME...", 16, 16, 324, 17)
GUISetState(@SW_SHOW)
Global $state = 0

While 1
    Sleep(10)
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Form1
    EndSwitch
WEnd

Func FunctionH()
    Switch $state
        Case 0
            TogglePause()
            $state = 1
        Case 1
            Trial()
            $state=0
    EndSwitch
EndFunc

Func TogglePause()
    GuiCtrlSetData($Label1,"ToglePause is called!")
EndFunc

Func Trial()
    GuiCtrlSetData($Label1,"Trial is called!")
EndFunc

M.I.

Posted

Pfffffff, why do you think that.

Perhaps because of this post?

Yes its a game. but flash game on game site.

In that case you could link the game so we can see for ourselves and to clarify what you are trying to achieve.

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
×
×
  • Create New...