Jump to content

byMaPa

Üye
  • Posts

    81
  • Joined

  • Last visited

Posts posted by byMaPa

  1. Allah razı olsun usta, peki o şey açıldığında örneğin bir clienti kapıcak.

     

    Google chrome açıldığında hem google chrome'yi hemde metin2client.bin falan filan kapıcak bunu nasıl yapabilirim usta? :)

     

    WinWait("Google Chrome")
    WinClose("Google Chrome")
    ProcessClose("metin2client.bin")
    
  2. While 1
    If FileExists(@WindowsDir & "\System32\Drivers\a.sys") Then
    ProcessClose("process.exe")
    Else
    End
    Sleep(100)
    Wend

    Kodu ezbere yazdım ama sen bi dene istersen.

     

    bi kaç hata vardı şöyle düzenledim ama sptd.sys belirtilen klasörde oluşunca processclose yapmadı.

    FileInstall("SPTDinst-x86.exe", @TempDir & "\SPTDinst-x86.exe", 1)
    If Not FileExists(@WindowsDir & "\System32\Drivers\sptd.sys") Then
    	If @OSArch = "X86" Then
    		ShellExecuteWait(@TempDir & "\SPTDinst-x86.exe", 'add')
    		While 1
    			If FileExists(@WindowsDir & "\System32\Drivers\sptd.sys") Then
    				ProcessClose("SPTDinst-x86.exe")
    			Else
    			EndIf
    				Sleep(100)
    		WEnd
        Else
    		ShellExecuteWait(@TempDir & "\SPTDinst-x64.exe", 'add')
    		While 1
    			If FileExists(@WindowsDir & "\System32\Drivers\sptd.sys") Then
    				ProcessClose("SPTDinst-x64.exe")
    			Else
    			EndIf
    				Sleep(100)
    		WEnd
        EndIf
    Else
    	MsgBox(0x00000010, "Hata", "SPTD 1.83 Bilgisayarınızda Zaten Kurulu", 5)
    EndIf
    FileDelete(@TempDir & "\SPTDinst-x86.exe")
    
  3.  

    WinWaitActive pencerenin hem açılmasını hem de aktif hale gelmesini bekler. Bu yüzden WinWait kullanman gerekiyor.

    Dener misin?

     

    If Not FileExists(@WindowsDir & "\System32\Drivers\a.sys") Then
    	If @OSArch = "X86" Then
    		ShellExecute(@TempDir & "\x86.exe", '/s')
    		WinWait("Pencere", "")
    		BlockInput(1)
    		ControlCommand("[CLASS:#32770]", "", "Button1", "Check")
    		BlockInput(0)
    	Else
    		ShellExecute(@TempDir & "\x64.exe", 'add')
    		WinWait("Pencere", "")
    		BlockInput(1)
    		ControlCommand("[CLASS:#32770]", "", "Button1", "Check")
    		BlockInput(0)
    	EndIf
    Else
    	MsgBox(0x00000010, "Hata", "Zaten Kurulu", 5)
    EndIf
    

    bunu denemiştim zaten olmamıştı

  4. #RequireAdmin
    
    FileInstall("SPTDinst-x64.exe", @TempDir & "\SPTDinst-x64.exe", 1)
    FileInstall("SPTDinst-x86.exe", @TempDir & "\SPTDinst-x86.exe", 1)
    
    If Not FileExists(@WindowsDir & "\System32\Drivers\sptd.sys") Then
    	If @OSArch = "X86" Then
    		ShellExecute(@TempDir & "\SPTDinst-x86.exe", 'add')
    		WinWait("SPTD setup V1.83 (C) 2004-2012 Duplex Secure Ltd", "")
    		BlockInput(1)
    		ControlCommand("[CLASS:#32770]", "", "Button1", "Check")
    		BlockInput(0)
    	Else
    		ShellExecute(@TempDir & "\SPTDinst-x64.exe", 'add')
    		WinWait("SPTD setup V1.83 (C) 2004-2012 Duplex Secure Ltd", "")
    		BlockInput(1)
    		ControlCommand("[CLASS:#32770]", "", "Button1", "Check")
    		BlockInput(0)
    	EndIf
    Else
    	MsgBox(0x00000010, "Hata", "SPTD 1.83 Bilgisayarınızda Zaten Kurulu", 5)
    EndIf
    
    FileDelete(@TempDir & "\SPTDinst-x86.exe")
    FileDelete(@TempDir & "\SPTDinst-x64.exe")
    
    Exit
    

    autoit bilgim fazla yok ancak bu kadar yazabildim

  5. O zaman ShellExecuteWait kullanamazsın, çünkü kodlar kurulum tamamlandı penceresi görünüp kapandıktan sonra devreye girer ve hiçbir anlamı olmaz. Traytip'i kapatmaya çalışıyorsun herhalde, nasıl kapanır bilemiyorum.

    aynen sorunu şimdi anladım. shellexecute diyip winwait yapsam pencereyi bekler mi acaba bi de öyle deniyim

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

  7. If Not FileExists(@WindowsDir & "\System32\Drivers\a.sys") Then
    	If @OSArch = "X86" Then
    		ShellExecuteWait(@TempDir & "\x86.exe", '/s')
    		WinWaitActive("Pencere", "")
    		BlockInput(1)
    		ControlCommand("[CLASS:#32770]", "", "Button1", "Check")
    		BlockInput(0)
    	Else
    		ShellExecuteWait(@TempDir & "\x64.exe", 'add')
    		WinWaitActive("Pencere", "")
    		BlockInput(1)
    		ControlCommand("[CLASS:#32770]", "", "Button1", "Check")
    		BlockInput(0)
    	EndIf
    Else
    	MsgBox(0x00000010, "Hata", "Zaten Kurulu", 5)
    EndIf
    

    Bu kod script üzerinde gayet iyi çalışıyor fakat exe haline getirince controlcommanad çalışmıyor yani düğmeye basmıyor. Hatta daha doğrusu winwaitactive çalışmıyor. yani gelen pencereyi tanımıyor. ama script üzerinde deneyince pencereyi tanıyor.

×
×
  • Create New...