[S]ocola[S]an
14-07-10, 04:25 PM
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("JX_SPR Viewer v.1.1", 200, 400, 591, 363)
$Label1 = GUICtrlCreateLabel("Start at", 24, 32, 38, 17)
$Label2 = GUICtrlCreateLabel("Stop at", 24, 64, 38, 17)
$Label3 = GUICtrlCreateLabel("Time(ms)", 16, 96, 46, 17)
$Input1 = GUICtrlCreateInput("1", 80, 32, 89, 21)
$Input2 = GUICtrlCreateInput("5", 80, 64, 89, 21)
$Input3 = GUICtrlCreateInput("5000", 80, 96, 89, 21)
$Button1 = GUICtrlCreateButton("Start", 8, 136, 83, 25, $WS_GROUP)
$Group2 = GUICtrlCreateGroup("Save As", 8, 208, 177, 113)
$Radio1 = GUICtrlCreateRadio("Vu Khi", 24, 232, 57, 17)
$Radio2 = GUICtrlCreateRadio("Ngua", 112, 232, 49, 17)
$Radio3 = GUICtrlCreateRadio("Trang Bi", 24, 248, 73, 17)
$Radio4 = GUICtrlCreateRadio("NPC", 112, 248, 49, 17)
$Radio5 = GUICtrlCreateRadio("Quai", 112, 264, 49, 17)
$Radio6 = GUICtrlCreateRadio("Vat pham", 24, 264, 65, 17)
$Radio7 = GUICtrlCreateRadio("Vong sang", 24, 280, 73, 17)
$Radio8 = GUICtrlCreateRadio("Skill", 112, 280, 49, 17)
$Radio9 = GUICtrlCreateRadio("Other", 24, 296, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label4 = GUICtrlCreateLabel("File dang chay:", 8, 192, 72, 17)
$Label5 = GUICtrlCreateLabel("0", 160, 192, 50, 17)
$Group1 = GUICtrlCreateGroup("Spr Viewer", 8, 8, 177, 121)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Save ", 8, 328, 179, 25, $WS_GROUP)
$Label6 = GUICtrlCreateLabel("JX_Spr Viewer v1.1", 48, 360, 97, 17)
$Label7 = GUICtrlCreateLabel("Invented: Ken Gor (KenShiWo)", 24, 376, 151, 17)
$Progress1 = GUICtrlCreateProgress(8, 168, 182, 17)
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg = -3 then Exit
If $nMsg = $button1 then button1()
WEnd
Func button1()
$var = GUICtrlRead($input1)
$var0 = GUICtrlRead($label5)
Msgbox(0, "Read before you used!", "Inventor: Ken Gor (KenShiWo)")
Msgbox(0, "One more thing!", "This is the Trial, you can only use Section Spr Viewer!")
For $I = 1 To 100 Step +1
GUICtrlSetData($PROGRESS1, $I)
Sleep(10)
Next
If FileExists("ui\ui3\开始.ini") = 0 Then
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Msgbox(0, "Loi roi!", "He thong khong tim thay file (开始.ini)")
Msgbox(0, "Nhung khong sao!", "He thong da tu dong cap nhap file (开始.ini)")
Msgbox(0, "Tiep tuc nao", "He thong chuan bi bat dau view!")
sleep(1000)
GUICtrlSetData($label5, $var)
batdau()
Else
FileDelete("C:\CLIENT\ui\ui3\开始.ini")
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
MsgBox(0, "Clear", "He thong dang tay chay files")
MsgBox(0, "Input new files", "He thong dang cap nhap file moi")
Msgbox(0, "Begin", "He thong chuan bi bat dau view!")
sleep(1000)
GUICtrlSetData($label5, $var)
batdau()
EndIf
EndFunc
Func batdau()
$var1 = GUICtrlRead($label5)
$var2 = GUICtrlRead($input2)
$end = "Ket thuc!"
$i = $var1
Do
thaydoi()
$i = $i + 1
Until $i = $var2 + 1
GUICtrlSetData($Label4, $end)
EndFunc
Func thaydoi()
$var = GUICtrlRead($label5)
$var0 = $var-1
$var1 = GUICtrlRead($Input1)
$var2 = GUICtrlRead($Input2)
$var3 = ".txt"
$var4 = $var0+1
$var5 = $var4+1
$time = GUICtrlRead($input3)
$find = $var0&$var3
$replace = $var4&$var3
$filename = "ui\ui3\开始.ini"
$retval = _ReplaceStringInFile($filename,$find,$replace)
ShellExecute("game.exe")
sleep($time)
WinWaitActive("[CLASS:Sword3 Class]")
WinClose("[CLASS:Sword3 Class]")
Send("{enter}")
If $var < $var2 then
GUICtrlSetData($Label5, $var5)
Else
MsgBox(0, "Xong roi ne!", "Cac file ban can view da xong het roi")
EndIf
EndFunc
Tự compite nhé
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("JX_SPR Viewer v.1.1", 200, 400, 591, 363)
$Label1 = GUICtrlCreateLabel("Start at", 24, 32, 38, 17)
$Label2 = GUICtrlCreateLabel("Stop at", 24, 64, 38, 17)
$Label3 = GUICtrlCreateLabel("Time(ms)", 16, 96, 46, 17)
$Input1 = GUICtrlCreateInput("1", 80, 32, 89, 21)
$Input2 = GUICtrlCreateInput("5", 80, 64, 89, 21)
$Input3 = GUICtrlCreateInput("5000", 80, 96, 89, 21)
$Button1 = GUICtrlCreateButton("Start", 8, 136, 83, 25, $WS_GROUP)
$Group2 = GUICtrlCreateGroup("Save As", 8, 208, 177, 113)
$Radio1 = GUICtrlCreateRadio("Vu Khi", 24, 232, 57, 17)
$Radio2 = GUICtrlCreateRadio("Ngua", 112, 232, 49, 17)
$Radio3 = GUICtrlCreateRadio("Trang Bi", 24, 248, 73, 17)
$Radio4 = GUICtrlCreateRadio("NPC", 112, 248, 49, 17)
$Radio5 = GUICtrlCreateRadio("Quai", 112, 264, 49, 17)
$Radio6 = GUICtrlCreateRadio("Vat pham", 24, 264, 65, 17)
$Radio7 = GUICtrlCreateRadio("Vong sang", 24, 280, 73, 17)
$Radio8 = GUICtrlCreateRadio("Skill", 112, 280, 49, 17)
$Radio9 = GUICtrlCreateRadio("Other", 24, 296, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label4 = GUICtrlCreateLabel("File dang chay:", 8, 192, 72, 17)
$Label5 = GUICtrlCreateLabel("0", 160, 192, 50, 17)
$Group1 = GUICtrlCreateGroup("Spr Viewer", 8, 8, 177, 121)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Save ", 8, 328, 179, 25, $WS_GROUP)
$Label6 = GUICtrlCreateLabel("JX_Spr Viewer v1.1", 48, 360, 97, 17)
$Label7 = GUICtrlCreateLabel("Invented: Ken Gor (KenShiWo)", 24, 376, 151, 17)
$Progress1 = GUICtrlCreateProgress(8, 168, 182, 17)
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg = -3 then Exit
If $nMsg = $button1 then button1()
WEnd
Func button1()
$var = GUICtrlRead($input1)
$var0 = GUICtrlRead($label5)
Msgbox(0, "Read before you used!", "Inventor: Ken Gor (KenShiWo)")
Msgbox(0, "One more thing!", "This is the Trial, you can only use Section Spr Viewer!")
For $I = 1 To 100 Step +1
GUICtrlSetData($PROGRESS1, $I)
Sleep(10)
Next
If FileExists("ui\ui3\开始.ini") = 0 Then
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Msgbox(0, "Loi roi!", "He thong khong tim thay file (开始.ini)")
Msgbox(0, "Nhung khong sao!", "He thong da tu dong cap nhap file (开始.ini)")
Msgbox(0, "Tiep tuc nao", "He thong chuan bi bat dau view!")
sleep(1000)
GUICtrlSetData($label5, $var)
batdau()
Else
FileDelete("C:\CLIENT\ui\ui3\开始.ini")
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
MsgBox(0, "Clear", "He thong dang tay chay files")
MsgBox(0, "Input new files", "He thong dang cap nhap file moi")
Msgbox(0, "Begin", "He thong chuan bi bat dau view!")
sleep(1000)
GUICtrlSetData($label5, $var)
batdau()
EndIf
EndFunc
Func batdau()
$var1 = GUICtrlRead($label5)
$var2 = GUICtrlRead($input2)
$end = "Ket thuc!"
$i = $var1
Do
thaydoi()
$i = $i + 1
Until $i = $var2 + 1
GUICtrlSetData($Label4, $end)
EndFunc
Func thaydoi()
$var = GUICtrlRead($label5)
$var0 = $var-1
$var1 = GUICtrlRead($Input1)
$var2 = GUICtrlRead($Input2)
$var3 = ".txt"
$var4 = $var0+1
$var5 = $var4+1
$time = GUICtrlRead($input3)
$find = $var0&$var3
$replace = $var4&$var3
$filename = "ui\ui3\开始.ini"
$retval = _ReplaceStringInFile($filename,$find,$replace)
ShellExecute("game.exe")
sleep($time)
WinWaitActive("[CLASS:Sword3 Class]")
WinClose("[CLASS:Sword3 Class]")
Send("{enter}")
If $var < $var2 then
GUICtrlSetData($Label5, $var5)
Else
MsgBox(0, "Xong roi ne!", "Cac file ban can view da xong het roi")
EndIf
EndFunc
Tự compite nhé