Jump to content

Autoit Kodumda Düzenleme Yapılacak


MetinIkiAilesi
 Share

Recommended Posts

Merhaba blue_life hocam kolay gelsin. Hocam daha önce bana Auto it ile benim size verdiğim kodlara ek olarak reklamlara mouse otomatik tıklama özelliği koymuştuk. Bunun için size minnettarım gerçekten. Şimdi sizden bir isteğim var yaparsanız beni çok memnun edersiniz. Ben dosya ve kodları size paylaşıyım. İstediğim şey ise kodlardan mouse otomatik tıklama özelliğini kaldırıp, yerine reklama tıklama zorunluluğu koyacağız. Oyuna Gir butonuna tıkladığımız zaman 'Reklama tıklamadan oyuna giremezsiniz' uyarısını verecek, tıkladığımızda ise Oyuna Gir butonu aktif hale gelecek. Kendi kodlarımı ve yapılmış bir örneğini yollayım ben size. Hocam yaparsanız karşılığı neyse veririm hiç önemli değil.

Hocam aşağıdaki linkte örnek dosya ve benim dosyam var koduyla birlikte upload ettim.
http://hotfile.com/dl/119929639/a6b83ab/AutoPack.rar.html

Herşey için çok teşekkür ederim. Saygılarımla...

NOT: PM atamadım bu yüzden konu açtım. Edited by MetinIkiAilesi
Link to comment
Share on other sites

[warning][color=#FF0000][b]DİKKAT: Konu Başlığını forum Kurallarına gore yeniden düzenleyiniz. Aksi halde cope tasınacaktır.

[topic=872]Forum Kuralları[/topic] - [ Madde 10-16 ]

Konu düzenlenene kadar yazılan tüm iletiler silinecektir.[/b][/color][/warning]

Link to comment
Share on other sites

[quote name='Legion' date='05 June 2011 - 17:16 ' timestamp='1307279794' post='1024653']
[warning][color=#FF0000][b]DİKKAT: Konu Başlığını forum Kurallarına gore yeniden düzenleyiniz. Aksi halde cope tasınacaktır.

[topic=872]Forum Kuralları[/topic] - [ Madde 10-16 ]

Konu düzenlenene kadar yazılan tüm iletiler silinecektir.[/b][/color][/warning]
[/quote]

Hocam bilgilendirme için teşekkür ederim, düzelttim.

Link to comment
Share on other sites

@MetinIkiAiles

Umarım istediğin gibi olmuştur... Bakar sonucu yazarsın.
Kolay gelsin...

[codebox]#NoTrayIcon
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=patchskin\update.ico
#AutoIt3Wrapper_Res_Comment=Mt2ci Patcher
#AutoIt3Wrapper_Res_Description=Mt2ci Patcher
#AutoIt3Wrapper_Res_LegalCopyright=Mt2ci Patcher
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Global $hUser32 = DllOpen("User32.dll")
Global $Title = "Mt2ci Patcher"
Global $SITE = "www.mt2ci.com/pack"
Global $CLICK = False,$Mpos

Opt("MouseCoordMode", 0)
Opt("GUIOnEventMode", 1)

Global $MainWindow = GUICreate($Title, 650, 594)
GUISetOnEvent(-3,"_Gui_Exit")

Local $BLUE_OIE = ObjCreate("Shell.Explorer.2")
Local $IE_OBJECT = GUICtrlCreateObj($BLUE_OIE, 0, 0, 360, 310)
GUICtrlSetResizing(-1, 802)
GUICtrlSetState(3-1,2)
$BLUE_OIE.navigate("http://" & $SITE & "/patch.php")

Global $Statedisp = GUICtrlCreateEdit("", 28, 350, 330, 105)
Global $ProgressBar = GUICtrlCreateProgress(28, 460, 330, 17)
Global $Sizedisp = GUICtrlCreateLabel("", 175, 502, 124, 17)
GUICtrlSetBkColor(-1, -2)
Global $Percentdisp = GUICtrlCreateLabel("", 175, 539, 124, 17)
GUICtrlSetBkColor(-1, -2)

DirCreate(@ScriptDir & "\patchskin")
If FileExists(@ScriptDir & "\patchskin\start.jpg") = 0 Then FileInstall("patchskin\start.jpg",@ScriptDir & "\patchskin\start.jpg")
Global $Startgame = GUICtrlCreatePic(@ScriptDir & "\patchskin\start.jpg", 390, 16, 123, 36, 67240192)
GUICtrlSetOnEvent($Startgame,"_Gui_Start")

If FileExists(@ScriptDir & "\patchskin\settings.jpg") = 0 Then FileInstall("patchskin\settings.jpg",@ScriptDir & "\patchskin\settings.jpg")
Global $Settings = GUICtrlCreatePic(@ScriptDir & "\patchskin\settings.jpg", 390, 56, 123, 21, 67240192)
GUICtrlSetOnEvent($Settings,"_Gui_Config")

If FileExists(@ScriptDir & "\patchskin\exit.jpg") = 0 Then FileInstall("patchskin\exit.jpg",@ScriptDir & "\patchskin\exit.jpg")
Global $Exit = GUICtrlCreatePic(@ScriptDir & "\patchskin\exit.jpg", 390, 460, 123, 21, 67240192)
GUICtrlSetOnEvent($Exit,"_Gui_Exit")

If FileExists(@ScriptDir & "\patchskin\background.jpg") = 0 Then FileInstall("patchskin\background.jpg",@ScriptDir & "\patchskin\background.jpg")
Global $Background = GUICtrlCreatePic(@ScriptDir & "\patchskin\background.jpg", 0, 0, 650, 592, 67240192)

GUICtrlSetData($Statedisp, "Internet bağlantısı kontrol ediliyor." & @CRLF ,1)
GUISetState(@SW_SHOW)
DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1)
While 1
Sleep (100)
If $CLICK = False And (_IsPressed("01", $hUser32) And WinActive($MainWindow) <> 0) Then
$Mpos = MouseGetPos()
If ($Mpos[0] > 5 And $Mpos[1] > 5) And ($Mpos[0] < 330 And $Mpos[1] < 300) Then
$CLICK = True
Endif
EndIf
WEnd

Func _Gui_Exit()
Exit
EndFunc

Func _Gui_Start()
If $CLICK = True Then
Run("Mt2ciPVP.exe")
Exit
Else
MsgBox(16,$Title,'Reklama tıklamadan oyuna giremezsiniz',0,$MainWindow)
EndIf
EndFunc

Func _Gui_Config()
ShellExecute("Config.exe")
EndFunc

Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
; $hexKey must be the value of one of the keys.
; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is.
Local $a_R = DllCall($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
If @error Then Return SetError(@error, @extended, False)
Return BitAND($a_R[0], 0x8000) <> 0
EndFunc ;==>_IsPressed[/codebox]

Link to comment
Share on other sites

Abi çok güzel olmuş, ben şimdi kendime göre düzenledim ama kordinatlarla ilgili bir problem var galiba. Reklam dışına yani reklamın dış çevresine tıkladığımda da Oyunu başlat butonu aktif oluyor. Reklam 300x250 boyutlarında ama mouse tıklama genişliği 300x25o den fazla galiba çünkü dışa tıklayınca aktif ediyor Oyuna Başla butonunu. Birde reklamın atrafındaki kaydırma çubuklarını yok edemezmiyiz?

Kodlarım Şu Şekil
[code]#NoTrayIcon
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=patchskin\update.ico
#AutoIt3Wrapper_Res_Comment=Mt2ci Patcher
#AutoIt3Wrapper_Res_Description=Mt2ci Patcher
#AutoIt3Wrapper_Res_LegalCopyright=Mt2ci Patcher
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Global $hUser32 = DllOpen("User32.dll")
Global $Title = "Mt2ci Patcher"
Global $SITE = "www.mt2ci.com/pack"
Global $CLICK = False,$Mpos

Opt("MouseCoordMode", 0)
Opt("GUIOnEventMode", 1)

Global $MainWindow = GUICreate($Title, 473, 415)
GUISetOnEvent(-3,"_Gui_Exit")

Local $BLUE_OIE = ObjCreate("Shell.Explorer.2")
Local $IE_OBJECT = GUICtrlCreateObj($BLUE_OIE, 0, 0, 300, 250)
GUICtrlSetResizing(-1, 802)
GUICtrlSetState(3-1,2)
$BLUE_OIE.navigate("http://" & $SITE & "/patch.php")

Global $Statedisp = GUICtrlCreateEdit("", 0, 275, 320, 105)
Global $ProgressBar = GUICtrlCreateProgress(0, 385, 320, 17)
Global $Sizedisp = GUICtrlCreateLabel("", 335, 320, 124, 17)
GUICtrlSetBkColor(-1, -2)
Global $Percentdisp = GUICtrlCreateLabel("", 335, 350, 124, 17)
GUICtrlSetBkColor(-1, -2)

DirCreate(@ScriptDir & "\patchskin")
If FileExists(@ScriptDir & "\patchskin\start.jpg") = 0 Then FileInstall("patchskin\start.jpg",@ScriptDir & "\patchskin\start.jpg")
Global $Startgame = GUICtrlCreatePic(@ScriptDir & "\patchskin\start.jpg", 335, 16, 123, 36, 67240192)
GUICtrlSetOnEvent($Startgame,"_Gui_Start")

If FileExists(@ScriptDir & "\patchskin\settings.jpg") = 0 Then FileInstall("patchskin\settings.jpg",@ScriptDir & "\patchskin\settings.jpg")
Global $Settings = GUICtrlCreatePic(@ScriptDir & "\patchskin\settings.jpg", 335, 56, 123, 21, 67240192)
GUICtrlSetOnEvent($Settings,"_Gui_Config")

If FileExists(@ScriptDir & "\patchskin\exit.jpg") = 0 Then FileInstall("patchskin\exit.jpg",@ScriptDir & "\patchskin\exit.jpg")
Global $Exit = GUICtrlCreatePic(@ScriptDir & "\patchskin\exit.jpg", 335, 382, 123, 21, 67240192)
GUICtrlSetOnEvent($Exit,"_Gui_Exit")

If FileExists(@ScriptDir & "\patchskin\background.jpg") = 0 Then FileInstall("patchskin\background.jpg",@ScriptDir & "\patchskin\background.jpg")
Global $Background = GUICtrlCreatePic(@ScriptDir & "\patchskin\background.jpg", 0, 0, 473, 415, 67240192)

GUICtrlSetData($Statedisp, "Internet bağlantısı kontrol ediliyor." & @CRLF ,1)
GUISetState(@SW_SHOW)
DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1)
While 1
Sleep (100)
If $CLICK = False And (_IsPressed("01", $hUser32) And WinActive($MainWindow) <> 0) Then
$Mpos = MouseGetPos()
If ($Mpos[0] > 5 And $Mpos[1] > 5) And ($Mpos[0] < 330 And $Mpos[1] < 300) Then
$CLICK = True
Endif
EndIf
WEnd

Func _Gui_Exit()
Exit
EndFunc

Func _Gui_Start()
If $CLICK = True Then
Run("Mt2ciPVP.exe")
Exit
Else
MsgBox(0,$Title,'Reklama tıklamadan oyuna giremezsiniz!',0,$MainWindow)
EndIf
EndFunc

Func _Gui_Config()
ShellExecute("Config.exe")
EndFunc

Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
; $hexKey must be the value of one of the keys.
; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is.
Local $a_R = DllCall($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
If @error Then Return SetError(@error, @extended, False)
Return BitAND($a_R[0], 0x8000) <> 0
EndFunc ;==>_IsPressed
[/code]

Edited by MetinIkiAilesi
Link to comment
Share on other sites

Hocam sorun yok güzel çalışıyorda zannedersem kalabalık kod var diye bazı kodları silmişsiniz, siteden güncelleme dosyalarını çelmiyor. Bende orjinalini tekrar yollayım dedim. Hocam yolladığım dosyada orjinali var. Hani önceki yaptığınız düzenlemeler varya bu şimdi linkini verdiğim kodlara yaparsanız sorun tamam olacak. Sizide yoruyorum hocam biliyorum ama çok önemli benim için. Şuan sizden iyide bu kodlamayı bilen yok sanırsam. Bu son hocam bu düzenlemeden sonra bir sorun kalacağını sanmıyorum. Herşey için çok teşekkür ederim hocam.

http://hotfile.com/dl/120541130/7a105e8/Auto_Pack.rar.html

Link to comment
Share on other sites

@MetinIkiAilesi

Şimdi biraz baktım, lakin malesef tek taraflı olmuyor.
Yani hangi dosya nere incek? Bunun için serverde bir döküman olmalı.
Hatta her seferinde program çalıştığında ilgili dosyaları tekrar tekrar indirmesi çok mantıksız.

Bunun için md5 - sha1 vs. gibi kontorl yapmak iyi olur.
Kısaca incecek dosya sabit mi?
Sabit ise linki nedir?

Sabit deyilse inecek dosyanın linkini nerden okuyacağız?
Bu linkleri barındıran bir *.txt dölümanını serverinde bulundurabilirmisin?
vs. vs. gibi ince detaylar lazım...

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