Jump to content

Komutları Tekrarlatma


vandan2
 Share

Recommended Posts

[b]Merhaba,

Mesela bir programımız var şuraya bas şunu yap şunu yaz gibi. Çalıştıra basıyoruz program çalışıyor ama işlemi 1 kez yapıyor. Bunu Nasıl sürekli tekrarlatıcağız ? Yani repeat komutu falan var mı ? Yardım ederseniz sevinirim.

Teşekkürler.[/b]
Link to comment
Share on other sites

@vandan2
Tam olarak ne yapacağını anlamadım ama sana şöyle basit bir örnek verebilirim;
while 1
msgbox(0,"dikkat","bu mesaj while içinde olduğu için durmadan tekrarlanır.",2)
wend

Edited by asmazh
Link to comment
Share on other sites

Yok arkadaşlar mesela şu şekilde. Kodlarım var şuraya tıkla şunu yaz falan filan. bunları yaptıktan sonra tekrardan yapmasını istiyorum. mesela notepadi açıp asdasdsad yazıyor bitiriyor. ben tekrardan notepadi açıp asdsadas yazmasını istiyorum bunun gibi.

Kodlar burada :
[code]While 1

$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
MouseClick ("left",718,465)
MouseWheel("down", 4)
MouseClick ( "left",726,800)

Send("merhaba dünya ")
MouseWheel("down", 1)
MouseClick ( "left",285,840)
Sleep(3000)




Case $Button2
MsgBox (0, "Kodlayan" , "Bu program benim tarafından kodlanmıştır")
Exit

Case $Label1
EndSwitch
WEnd
[/code]

Case $Button1
MouseClick ("left",718,465)
MouseWheel("down", 4)
MouseClick ( "left",726,800)

Send("merhaba dünya ")
MouseWheel("down", 1)
MouseClick ( "left",285,840)
Sleep(3000)

bu kısmın sürekli tekrarlanmasını istiyorum mesela. sleepde 3 sn durucak sonra tekrardan mouse click whell click send tekrar bekle sonra yine başa dön bu şekilde...

Edited by vandan2
Link to comment
Share on other sites

şu şekilde yaptım ama olmadı :

case $button1
global $start = 1


While 1
if $start= 1 then

$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
MouseClick ("left",718,465)
MouseWheel("down", 4)
MouseClick ( "left",726,800)

Send("selam dünya")
MouseWheel("down", 1)
MouseClick ( "left",285,840)
Sleep(3000)
EndIf



Case $Button2
MsgBox (0, "Kodlayan" , "Bu program ben tarafından kodlanmıştır")
Exit

Case $Label1
EndSwitch
WEnd

Link to comment
Share on other sites

@vandan2

Komutlarınızı forumda verirken, çalışabilecek durumda olmalarına özen gösteriniz!
Aşağıdaki gibi bir şey mi istiyorsun?

[codebox]Global $ISLEM = False
Opt("GUIOnEventMode", 1)

Global $Form1 = GUICreate("Form1", 300, 200, 0, 0)
GUISetOnEvent(-3, "Form1Close")
Global $Baslat_Durdur = GUICtrlCreateButton("Baslat", 10, 140, 120, 25)
GUICtrlSetOnEvent(-1, "_Baslat_Durdur")
Global $Button2 = GUICtrlCreateButton("Hakkında", 140, 140, 120, 25)
GUICtrlSetOnEvent(-1, "_About")

GUISetState(@SW_SHOW)

While 1
If $ISLEM = True Then
MouseClick("left", 718, 465)
MouseWheel("down", 4)
MouseClick("left", 726, 800)
Send("merhaba dünya ")
MouseWheel("down", 1)
MouseClick("left", 285, 840)
Sleep(3000)
Else
Sleep(100)
EndIf
WEnd

Func _Baslat_Durdur()
If $ISLEM = True Then
GUICtrlSetData($Baslat_Durdur, "Başlat")
Else
GUICtrlSetData($Baslat_Durdur, "Durdur")
EndIf
$ISLEM = Not $ISLEM
EndFunc ;==>_Baslat_Durdur

Func _Durdur()
$ISLEM = False
EndFunc ;==>_Durdur

Func _About()
MsgBox(0, "Kodlayan", "Bu program benim tarafından kodlanmıştır", 0, $Form1)
EndFunc ;==>_About

Func Form1Close()
Exit
EndFunc ;==>Form1Close[/codebox]

Edited by blue_life
Link to comment
Share on other sites

Olmaz çünkü yanlış yapmışsın.
While 1

if $start = 1 then
MouseClick ("left",718,465)
MouseWheel("down", 4)
MouseClick ( "left",726,800)
Send("selam dünya")
MouseWheel("down", 1)
MouseClick ( "left",285,840)
Sleep(3000)
EndIf

$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1

global $start = 1
Case $Button2
MsgBox (0, "Kodlayan" , "Bu
program ben tarafından
kodlanmıştır")
Exit
Case $Label1
EndSwitch
WEnd

Link to comment
Share on other sites

blue life aynı yaptığın gibi ama sen ayrı bir form üzerinde yapmışsın. basınca 2 tane form açılıyor senin yaptığın çalışıyor. acaba benimkini düzeltebilir misin ? yani yaptığını benim forma geçirebilir misin ? başlata basınca kapat olmasın 2 ayrı tuş olsun yani. kapata basınca hakkımda kısmı çıksın. Aslında benim yapmak istediğim tek şey komutların kendini tekrarlamasıydı bu kadar zor olucağını hiç düşünmemiştim :)

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