Jump to content

Pencere Beklerken Başka Pencere Gelirse


bybordo
 Share

Recommended Posts

elimizde 3 tane pencere olsun (pencere1, pencere2, pencere3)

pencere1 için winwaitactive yazdık diyelim. scriptimiz bu pencereyi beklerken pencere2 önümüze geldi. o zaman scriptimiz pencere2 ile devam etsin. böyle bi kod yazabilecek var mı?

Edited by bybordo
Link to comment
Share on other sites

Basit bir örnek verirsem aşağıdaki gibi bir kodlama yapabilirsin....

 

Global $Window_1 = "Pencere_1"
Global $Window_2 = "Pencere_2"
Global $Window_3 = "Pencere_3"


While 1
    Sleep(100) ;Cpu Safe
    If WinExists($Window_1) Then
        _Window_1()
        ExitLoop
    ElseIf WinExists($Window_2) Then
        _Window_2()
        ExitLoop
    ElseIf WinExists($Window_3) Then
        _Window_3()
    Else
        ContinueLoop
    EndIf
    ExitLoop
WEnd
Exit

Func _Window_1()
    MsgBox(64, "Kodlar buraya", $Window_1)
EndFunc   ;==>_Window_1

Func _Window_2()
    MsgBox(64, "Kodlar buraya", $Window_2)
EndFunc   ;==>_Window_2

Func _Window_3()
    MsgBox(64, "Kodlar buraya", $Window_3)
EndFunc   ;==>_Window_3
Link to comment
Share on other sites

BlueLife üstad sanırım yanlış anlattım derdimi. pencereyi beklerken başka pencere gelirse o pencereden devam etmesini istiyorum. verdiğin kodda winwaitactive denedim ama işe yaramadı.

Global $Window_1 = "pencere", "title"

bi de bu şekilde yazınca hata veriyor. ayrıca yazdığınız kod pencere1 i bekliyor mu? pencere1 i beklerken pencere2  gelirse pencere2 den devam etmesi gerekiyor. ardından pencere3e geçip scripti bitiricek. tabi bu pencerelerin hepsinde controlcommand ayarlıcam.

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