Jump to content

59 seconds loop?


Hekki
 Share

Recommended Posts

  • Developers

hi, i want create a loop with a duration from 59 seconds.

is it possible? i don't found an example :P

can you help me please? :)

bye hekki

something like?

$t = TimerInit()
While 1 
    If TimerDiff($t) > 59 *1000 then ExitLoop
    ; do your stuff
WEnd

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

HotKeySet ("{ESC}", "quitme")
; command line param: beep (0 = off, 1 = on)
Global $MakeNoise = 0
If $CmdLine[0] = 0 Then
    $MakeNoise = 0
ElseIf $CmdLine[1] = 1 Then
    $MakeNoise = 1
EndIf

Global Const $PI = 3.1415926535897932384626433832795
Global $Width = @DesktopWidth, $Height = @DesktopHeight, $MidX = $Width/2, $MidY = $Height/2
Global $Radius = 5
Global $Step = $PI/6
ToolTip ("Mouse Mover!!", $MidX, $MidY)
While 1
    Do
        For $angle = 0 To 2*$PI Step $Step
            $Radius += 5
            MouseMove ($MidX - (Cos ($angle) * $Radius), $MidY - (Sin ($angle) * $Radius), 0)
            If $MakeNoise = 1 Then
                Beep ($Radius*5, 2)
            EndIf
        Next
    Until $Radius >= $MidY
    Do
        For $angle = 0 To 2*$PI Step $Step
            $Radius -= 5
            MouseMove ($MidX - (Cos ($angle) * $Radius), $MidY - (Sin ($angle) * $Radius), 0)
            If $MakeNoise = 1 Then
                Beep ($Radius*5, 2)
            EndIf
        Next
    Until $Radius <= 5
WEnd

Func quitme()
    Exit
EndFunc

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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