byMaPa Posted August 13, 2013 Share Posted August 13, 2013 Run("x86.exe") If WinExists("Pencere","") Then WinWaitActive("Pencere","") BlockInput(1) ControlCommand("Pencere","", "Button1", "Check") WinWaitActive("Pencere","You need to reboot for changes to take effect.") ControlCommand("Pencere","", "Button1", "Check") BlockInput(0) ElseIf WinExists("Pencere","") Then If @OSArch = "X86" Then ProcessClose("x86.exe") Else ProcessClose("x64.exe") EndIf MsgBox(0x00000010, "Hata", " Zaten Kurul.", 5) EndIf Nerde hata yaptım ? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted August 13, 2013 Share Posted August 13, 2013 her iki koşulda aynı olduğu için her zaman ilk koşuldaki komutları uygular. if ve elseif WinExists("Pencere","") buna göre hareket ediyor ve ikiside aynı. Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 her iki koşulda aynı olduğu için her zaman ilk koşuldaki komutları uygular. if ve elseif WinExists("Pencere","") buna göre hareket ediyor ve ikiside aynı. WinExists("Pencere","1") şeklinde yapınca da olmadı ama Quote Link to comment Share on other sites More sharing options...
KintaRo Posted August 13, 2013 Share Posted August 13, 2013 Arkadaşım ben autoit bilmiyorum ama if/elseif döngü yapısı tüm programlama dillerinde aynıdır. O şemaya göre söyledim. WinExists(); komutu sanırım pencere başlığına bakarak o pencerenin olup olmadığına göre true/false döndürüyor, eğer doğruysam sen pencere title'inda "" yani boş olan ya da "1" yani 1 yazan bir pencere arıyorsun? yok mu ya bir autoitci yardım edin :) Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 Arkadaşım ben autoit bilmiyorum ama if/elseif döngü yapısı tüm programlama dillerinde aynıdır. O şemaya göre söyledim. WinExists(); komutu sanırım pencere başlığına bakarak o pencerenin olup olmadığına göre true/false döndürüyor, eğer doğruysam sen pencere title'inda "" yani boş olan ya da "1" yani 1 yazan bir pencere arıyorsun? yok mu ya bir autoitci yardım edin :) pencere ve "1" sembolik yazdım. 1. döngüde ("Pencere","1") gelmediği için direk ikinci döngüye geçmesi gerekiyor ama geçmiyor. Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 sanırım hata winexists de olmalı. onu ben "şu pencere gelirse şunu şunu" yap amaçlı yazdım ama uygun değil galiba Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 13, 2013 Editor Share Posted August 13, 2013 Run("x86.exe") If WinExists("Pencere") Then WinWaitActive("Pencere","") BlockInput(1) ControlCommand("Pencere","", "Button1", "Check") WinWaitActive("Pencere","You need to reboot for changes to take effect.") ControlCommand("Pencere","", "Button1", "Check") BlockInput(0) Else If @OSArch = "X86" Then ProcessClose("x86.exe") Else ProcessClose("x64.exe") EndIf MsgBox(0x00000010, "Hata", " Zaten Kurul.", 5) EndIf bu şekilde denermisin kardeşim. Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 Run("x86.exe") If WinExists("Pencere") Then WinWaitActive("Pencere","") BlockInput(1) ControlCommand("Pencere","", "Button1", "Check") WinWaitActive("Pencere","You need to reboot for changes to take effect.") ControlCommand("Pencere","", "Button1", "Check") BlockInput(0) Else If @OSArch = "X86" Then ProcessClose("x86.exe") Else ProcessClose("x64.exe") EndIf MsgBox(0x00000010, "Hata", " Zaten Kurul.", 5) EndIf bu şekilde denermisin kardeşim. aynısı değil mi? Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 13, 2013 Editor Share Posted August 13, 2013 Sence aynısımı. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted August 13, 2013 Share Posted August 13, 2013 bence değil Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 aynısı değilse de denedim olmadı :) Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 13, 2013 Editor Share Posted August 13, 2013 WinExists("Pencere") ile Pencere adında bir pencere varmı kontrol ediyoruz eger varsa winwaitactive ile kontrol edip komutlar gönderiyoruz. Eğer pencere isminde bir pencere yoksa x86 vey x64 duruma göre process ten kapatıyoruz.Kod bu işte. Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 WinExists("Pencere") ile Pencere adında bir pencere varmı kontrol ediyoruz eger varsa winwaitactive ile kontrol edip komutlar gönderiyoruz. Eğer pencere isminde bir pencere yoksa x86 vey x64 duruma göre process ten kapatıyoruz.Kod bu işte. controlcommanda sıkıntı var heralde. onu yapamıyorum Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted August 13, 2013 Editor Share Posted August 13, 2013 ControlCommand yerine tıklamak için send komutunu kullan. Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 ControlCommand yerine tıklamak için send komutunu kullan. bi yerde hata yapıyorum ama anlamadım Quote Link to comment Share on other sites More sharing options...
blackman12 Posted August 13, 2013 Share Posted August 13, 2013 pairsin verdiği çalışıyo arkadaşım dalga mı geçiyorsun? ama istediğinin tam örneği şöyle: Run("x86.exe") If WinExists("Pencere","") Then WinWaitActive("Pencere","") BlockInput(1) ControlCommand("Pencere","", "Button1", "Check") WinWaitActive("Pencere","You need to reboot for changes to take effect.") ControlCommand("Pencere","", "Button1", "Check") BlockInput(0) ElseIf WinExists("Pencere2","") Then If @OSArch = "X86" Then ProcessClose("x86.exe") Else ProcessClose("x64.exe") EndIf MsgBox(16, "Hata", " Zaten Kurul.", 5) ElseIf WinExists("[CLASS:Shell_TrayWnd]", "") Then If @OSArch = "X86" Then ProcessClose("x86.exe") Else ProcessClose("x64.exe") EndIf MsgBox(64, "Yeay!", "Görev çubuğun varmış senin", 5) Else MsgBox(16, "Hata", "Aranan hiçbir pencere bulunamadı.", 5) EndIf Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 sorun bunda değil ya. pencereyi scripte tanıyor winwait yapıp düğmeye tıklıyor ama exe haline getirince olmuyor Quote Link to comment Share on other sites More sharing options...
blackman12 Posted August 13, 2013 Share Posted August 13, 2013 öyle bi ihtimal var mı yahu mesajlarına bakıyorum da olmayacak şeyler diyosun. Sen sadece karşılaştığın sorunu söyle, sebebini tanımlayamıyorsun belliki Quote Link to comment Share on other sites More sharing options...
byMaPa Posted August 13, 2013 Author Share Posted August 13, 2013 öyle bi ihtimal var mı yahu mesajlarına bakıyorum da olmayacak şeyler diyosun. Sen sadece karşılaştığın sorunu söyle, sebebini tanımlayamıyorsun belliki abi dediğim gibi run script deyince winwaitactive de yani pencere gelince control command yapıp tıklıyor. ama scripti exe yapınca tıklamıyor. daha nasıl anlatayım? istersen gösterebilirim canlı olarak Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.