Festae Posted March 30, 2012 Share Posted March 30, 2012 Merhaba. Aranıza yeni katıldım. C# üzerinden autoitx3 kütüphanesini kullanarak çalışıyorum. Oynadığım oyun için klavye otomasyonu yapıyordum. Oyunda basmak isteiğim tuşları controlsend() ile gönderemiyorum. Oysaki notepad arka planda da çalışsa controlsend() işe yarıyor.Oyunda bunu engelleyen ne olabilir ya da neleri eksik yapmış olabirim. Fonksiyonum: ControlSend("Oyunun texti", "", "edit1", sText) Quote Link to comment Share on other sites More sharing options...
blackman12 Posted March 30, 2012 Share Posted March 30, 2012 ControlSend("Oyunun texti", "", "edit1", sText) oyunun texti gelmicek oraya handleı gelecek ya da title ı Quote Link to comment Share on other sites More sharing options...
Festae Posted March 30, 2012 Author Share Posted March 30, 2012 [quote name='blackman12' date='31 March 2012 - 00:49 ' timestamp='1333147757' post='1177999'] ControlSend("Oyunun texti", "", "edit1", sText) oyunun texti gelmicek oraya handleı gelecek ya da title ı [/quote] İmlecimle oyunun başlat çubuğundaki simgesine geldiğimde gözüken ismini yazıyordum. Handle'ı nasıl bulup kullanabilirim. Quote Link to comment Share on other sites More sharing options...
Festae Posted March 31, 2012 Author Share Posted March 31, 2012 Şimdi farkettiğim bir durum ise: controlsend() komutu tuşları oyun ekranına gönderiyor fakat ancak oyunun chat kısmına yazabiliyor. send() fonksiyonu gibi iş görmesi mümkün değil mi? send() fonksiyonunu kullandığımda skilleri basabiliyordu. Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 31, 2012 Share Posted March 31, 2012 @Festae Emin deyiyim ama aşağıdaki örneği kendine göre düzenlersen çalışabilir... [codebox]Run("notepad.exe") Local $WinHwnd = WinGetHandle("[CLASS:Notepad]") ;Başlıktan Handlesini alalım ControlFocus($WinHwnd, "", "Edit1") ;focus yapalım, sen bu satırı silebilirsin. ;controlID kısmını boş bırakırsan, focus olan controlide mesaj gider ControlSend($WinHwnd, "", "", "This is a line of text in the notepad window")[/codebox] Quote Link to comment Share on other sites More sharing options...
Festae Posted March 31, 2012 Author Share Posted March 31, 2012 Malesef dediğiniz gibi de olmadı. Bu "Edit1" contolID si sorun çıkarıyor olabilir mi. Başka bir metod yazamaz mıyız Edit1 yerine. Quote Link to comment Share on other sites More sharing options...
blue_life Posted March 31, 2012 Share Posted March 31, 2012 ControlSend işe yaramıyorsa, send komutunu niye kullanmıyorsun? [code]Local $WinHwnd = WinGetHandle("[CLASS:Notepad]") ;Başlıktan Handlesini alalım ;Pencere aktif ise send komutu çalışacak! If BitAND(WinGetState($WinHwnd), Then Send("Selam millet") EndIf[/code] Quote Link to comment Share on other sites More sharing options...
Festae Posted March 31, 2012 Author Share Posted March 31, 2012 Çünkü send komutu oyun ekranı görüntüde değilken oyuna tuş göndermiyor. Quote Link to comment Share on other sites More sharing options...
asmazh Posted March 31, 2012 Share Posted March 31, 2012 (edited) Arkadaşım ne kadar uğraşsan da nafile. Anladığım kadarıyla bir online oyun için otomasyon yapmak istiyorsun. Fakat hiçbir online oyun otomasyona izin vermez. Peki ya yapanlar yok mu? Çok. Profesyonel bir programcı olman lazım+ Autoit ile yapılabileceğini sanmıyorum. Zamanında çok demedim de. :-) Iyisi mi? Hakkıyla oynayıp derece kazanmak. Edited March 31, 2012 by asmazh Quote Link to comment Share on other sites More sharing options...
Festae Posted April 1, 2012 Author Share Posted April 1, 2012 AutoIt ile online oyun üzerinde istediğim birçok şeyi yapıyorum. Fakat bu controlsend() muhtemelen oyuna yolladığını açık eden bir fonksiyon. Programlama bilgim fena sayılmaz fakat hack vb. işlerle uğraşmadım. Bu yüzden bu tarz ufak bir otomasyonla işi kotarıyorum. Tekrar controlsend() 'e gelecek olursam; ilginiz için teşekkür ediyorum. Elimdekilerle idare edeceğim artık. Quote Link to comment Share on other sites More sharing options...
ByUzZy Posted April 29, 2012 Share Posted April 29, 2012 ControlSend( "a", "", "b", "c") a : pencerenin adı (örn. : "Facebook - Google Chrome") b : pek önemli değil burada. Herhangi bir şey yazabilirsiniz. c : Gönderilecek tuş. Mesela A harfine basmak için küme parantezine alıp yazıyoruz tırnaklara. {A} Örnek ControlSend( "Facebook - Google Chrome", "", "Edit1", "{A}") Opt("SendKeyDelay", 1000) ;1 saniye de basar. Quote Link to comment Share on other sites More sharing options...
daft117 Posted April 29, 2012 Share Posted April 29, 2012 illa Edit1 gibi birşey girmek zorunda değilsin. control ismini boş bırakıp yani "" sadece title ve yollayacağın şeyi girerek, send komutu mantığında kullanabilirsin. ama yine de olacağını sanmıyorum. çoğu online veya herhangi bi oyun (directx vs kullanan) genelde bu tarz programları engelliyo bilerek veya bilmeyerek. çoğu oyuna bu yöntem sökmez, Trainer'lar neden var sanıyorsun? oyunlara yazılan botlar, oyun ekranından çok, oyunun ram'deki değerlerini okuyup/yazarak çalışır. sağlam bir tersine mühendislik eseridir yani. Quote Link to comment Share on other sites More sharing options...
efeerk Posted June 30, 2012 Share Posted June 30, 2012 [b]Şunu dene $handle = WinGetHandle("Oyun title") ControlSend($handle, "", "", "{ENTER}") // enter e bas edit1 gereksiz.[/b] 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.