Jump to content

Bir Fonksiyonu Sürekli Çalıştırtmak.


hakanight
 Share

Recommended Posts

Merhaba arkadaşlar.

Atıyorum ;

func _hakan()

 

 

Endfunc 

diye bir fonksiyon oluşturdum.

O fonksiyonu bir kodla atıyorum 5 saniyede bir çalıştırabilirmiyiz?

Ben bunu bir ara görmüştüm. Fakat unuttum. Ve forumu aradım bulamadım.

Lütfen söylermisiniz?

Link to comment
Share on other sites

GUICreate("GUI", 300, 150)
GUISetState()

Local $TIMER_1[4] = [TimerInit(), 0, 0, 0], $ileribaslat = 0

Local $click = GUICtrlCreateButton("Tıklayınız!", 20, 30, 150, 40)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = -3
            GUIDelete()
            Exit
        Case $msg = $click
            $ileribaslat = 1
    EndSelect

    If $ileribaslat = 1 Then
        $TIMER_1[1] = Round(TimerDiff($TIMER_1[0]) / 1000)
        If $TIMER_1[1] <> $TIMER_1[2] Then
            $TIMER_1[2] = $TIMER_1[1]
            $TIMER_1[3] += 1

			if StringIsInt($TIMER_1[3] / 5) Then
				; fonksiyon
			EndIf

        EndIf
    EndIf
WEnd

; fonksiyon kısmına tekrar etmesini istediğiniz kodları yazabilirsiniz.

 

Oluşturduğunuz fonksiyonu orada çalıştırmak yerine fonksiyonun kodlarını oraya yazın. Böylece fonksiyon işlenirken programın diğer işlevleri devre dışı kalmaz.

Link to comment
Share on other sites

Adlibregister ben de çalışmıyor yahu ! Acaba kullandığım Autoit sürümünden dolayı mıdır ?

 

Hangi sürümü kullanıyorsun? Sürümden kaynaklandığını sanmıyorum. Sen göster bakim nasıl yaptığını, niye çalışmadığını anlarız.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...