Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <_HttpRequest.au3>
#include <Array.au3>
#include <File.au3>
#include <GuiComboBox.au3>
#include <Color.au3>
Global $File_Setting = @ScriptDir & 'setting.ini', $MyForm = ''
Global $Result = 2
Global $Search_cl[2] = [131,344]
If DirGetSize(@ScriptDir&'Data') = -1 Then DirCreate(@ScriptDir&'Data')
Check_Update()
Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3)
Opt('pixelcoordmode', 0)
Opt('MouseCoordMode', 0)
#Region ### START Koda GUI section ### Form=
$MyForm = GUICreate("LoL Mastery Manger", 330, 175, 595, 281)
$Cb_Champion = GUICtrlCreateCombo("", 70, 16, 200, 25)
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
$Cb_Lane = GUICtrlCreateCombo("", 70, 48, 200, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
$Cb_Type = GUICtrlCreateCombo("", 70, 80, 200, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
$Bnt_Start = GUICtrlCreateButton("Cộng Bảng", 50, 128, 100, 25)
$Bnt_Update = GUICtrlCreateButton("Cập Nhật", 190, 128, 100, 25)
GUICtrlCreateLabel("Tướng", 16, 16, 50, 17)
GUICtrlCreateLabel("Vai Trò", 16, 48, 50, 17)
GUICtrlCreateLabel("Thống Kê", 16, 80, 50, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$hTray = TrayCreateItem("Hiện")
TrayItemSetOnEvent(-1, "To_Tray")
$hExit = TrayCreateItem("Thoát")
TrayItemSetOnEvent(-1, "_Exit")
Load_Champ()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_MINIMIZE
To_Tray()
Case $Bnt_Update
Update_Database()
Case $Bnt_Start
_Start()
EndSwitch
WEnd
Func _Exit()
Exit
EndFunc ;==>_Exit
Func _Start()
$Read_Click = IniRead(@ScriptDir & 'Data' & GUICtrlRead($Cb_Champion) & '.ini', GUICtrlRead($Cb_Lane), GUICtrlRead($Cb_Type), 'Null')
If $Read_Click = 'Null' Then
MsgBox(0, 'Thông báo', 'Bạn chưa chọn đủ các mục hoặc chưa cập nhật dữ liệu')
Return
EndIf
If Not WinExists('PVP.net Client') Then
MsgBox(0, 'Thông báo', 'Bạn chưa mở Lol Client')
Return
EndIf
$Handle = WinGetHandle('PVP.net Client')
If WinGetHandle('[ACTIVE]','') <> $Handle Then WinActivate($Handle)
MouseClick('left',$Search_cl[0]+70, $Search_cl[1]+31)
$Split = StringSplit($Read_Click, '|')
For $i = 1 To $Split[0]
_Click($Split[$i])
Next
MouseClick('left',$Search_cl[0]+70, $Search_cl[1]-120)
Send("["&GUICtrlRead($Cb_Champion)&'-'&GUICtrlRead($Cb_Lane)&"]")
MouseClick('left',$Search_cl[0]+70, $Search_cl[1])
EndFunc ;==>_Start
Func _Click($cCode)
Switch $cCode
Case 6111
$x = $Search_cl[0] + 295
$y = $Search_cl[1] - 95
Case 6114
$x = $Search_cl[0] + 363
$y = $Search_cl[1] - 95
Case 6311
$x = $Search_cl[0] + 566
$y = $Search_cl[1] - 95
Case 6312
$x = $Search_cl[0] + 632
$y = $Search_cl[1] - 95
Case 6211
$x = $Search_cl[0] + 842
$y = $Search_cl[1] - 95
Case 6212
$x = $Search_cl[0] + 908
$y = $Search_cl[1] - 95
Case 6121
$x = $Search_cl[0] + 258
$y = $Search_cl[1] - 20
Case 6122
$x = $Search_cl[0] + 320
$y = $Search_cl[1] - 20
Case 6123
$x = $Search_cl[0] + 397
$y = $Search_cl[1] - 20
Case 6321
$x = $Search_cl[0] + 535
$y = $Search_cl[1] - 20
Case 6322
$x = $Search_cl[0] + 600
$y = $Search_cl[1] - 20
Case 6323
$x = $Search_cl[0] + 665
$y = $Search_cl[1] - 20
Case 6221
$x = $Search_cl[0] + 808
$y = $Search_cl[1] - 20
Case 6223
$x = $Search_cl[0] + 870
$y = $Search_cl[1] - 20
Case 6222
$x = $Search_cl[0] + 941
$y = $Search_cl[1] - 20
Case 6131
$x = $Search_cl[0] + 290
$y = $Search_cl[1] + 50
Case 6134
$x = $Search_cl[0] + 363
$y = $Search_cl[1] + 50
Case 6331
$x = $Search_cl[0] + 566
$y = $Search_cl[1] + 50
Case 6332
$x = $Search_cl[0] + 635
$y = $Search_cl[1] + 50
Case 6231
$x = $Search_cl[0] + 842
$y = $Search_cl[1] + 50
Case 6232
$x = $Search_cl[0] + 908
$y = $Search_cl[1] + 50
Case 6141
$x = $Search_cl[0] + 258
$y = $Search_cl[1] + 120
Case 6142
$x = $Search_cl[0] + 320
$y = $Search_cl[1] + 120
Case 6143
$x = $Search_cl[0] + 397
$y = $Search_cl[1] + 120
Case 6341
$x = $Search_cl[0] + 535
$y = $Search_cl[1] + 120
Case 6342
$x = $Search_cl[0] + 600
$y = $Search_cl[1] + 120
Case 6343
$x = $Search_cl[0] + 665
$y = $Search_cl[1] + 120
Case 6241
$x = $Search_cl[0] + 808
$y = $Search_cl[1] + 120
Case 6242
$x = $Search_cl[0] + 870
$y = $Search_cl[1] + 120
Case 6243
$x = $Search_cl[0] + 941
$y = $Search_cl[1] + 120
Case 6151
$x = $Search_cl[0] + 287
$y = $Search_cl[1] + 190
Case 6154
$x = $Search_cl[0] + 363
$y = $Search_cl[1] + 190
Case 6351
$x = $Search_cl[0] + 566
$y = $Search_cl[1] + 190
Case 6352
$x = $Search_cl[0] + 635
$y = $Search_cl[1] + 190
Case 6251
$x = $Search_cl[0] + 842
$y = $Search_cl[1] + 190
Case 6252
$x = $Search_cl[0] + 908
$y = $Search_cl[1] + 190
Case 6161
$x = $Search_cl[0] + 258
$y = $Search_cl[1] + 265
Case 6162
$x = $Search_cl[0] + 320
$y = $Search_cl[1] + 265
Case 6164
$x = $Search_cl[0] + 397
$y = $Search_cl[1] + 265
Case 6361
$x = $Search_cl[0] + 535
$y = $Search_cl[1] + 265
Case 6362
$x = $Search_cl[0] + 600
$y = $Search_cl[1] + 265
Case 6363
$x = $Search_cl[0] + 665
$y = $Search_cl[1] + 265
Case 6261
$x = $Search_cl[0] + 808
$y = $Search_cl[1] + 265
Case 6262
$x = $Search_cl[0] + 870
$y = $Search_cl[1] + 265
Case 6263
$x = $Search_cl[0] + 941
$y = $Search_cl[1] + 265
EndSwitch
$Get_Active = WinGetTitle('[ACTIVE]','')
If $Get_Active <> 'PVP.net Client' Then
WinActivate('PVP.net Client','')
WinWaitActive('PVP.net Client','',3)
EndIf
MouseClick('left', $x, $y)
EndFunc ;==>_Click
Func To_Tray()
If TrayItemGetText($hTray) = "Ẩn" Then
GUISetState(@SW_HIDE, $MyForm)
TrayItemSetText($hTray, "Hiện")
Else
GUISetState(@SW_SHOW, $MyForm)
GUISetState(@SW_RESTORE, $MyForm)
TrayItemSetText($hTray, "Ẩn")
EndIf
EndFunc ;==>To_Tray
Func Load_Champ()
If FileExists($File_Setting) Then
$Read_Champ = IniRead($File_Setting, 'Setting', 'Champion', 'Null')
If $Read_Champ = 'Null' Then
$Msg_Box = MsgBox(3, 'Thông báo', 'Dữ liệu bị lỗi' & @CRLF & 'Bạn có muốn cập nhật không ?')
Select
Case $Msg_Box = 6
Update_Database()
Case $Msg_Box = 7
Exit
Case $Msg_Box = 2
Exit
EndSelect
EndIf
GUICtrlSetData($Cb_Champion, $Read_Champ)
Else
$Msg_Box = MsgBox(3, 'Thông báo', 'Bạn chưa có dữ liệu' & @CRLF & 'Bạn có muốn cập nhật không ?')
Select
Case $Msg_Box = 6
Update_Database()
Case $Msg_Box = 7
Exit
Case $Msg_Box = 2
Exit
EndSelect
EndIf
EndFunc ;==>Load_Champ
Func Check_Update()
Local $sMain_Site = _HttpRequest($Result, 'http://champion.gg/')
If @error Or Not $sMain_Site Then
MsgBox(0, 0, 'Không thể kết nối đến Http://champion.gg')
Return
EndIf
If FileExists($File_Setting) Then
$Read_ini_Version = IniRead($File_Setting, 'Setting', 'Version', 'Null')
If $Read_ini_Version = 'Null' Then
$Msg_Box = MsgBox(3, 'Thông báo', 'Chưa có dữ liệu' & @CRLF & 'Bạn có muốn cập nhật không ?')
Select
Case $Msg_Box = 6
Update_Database()
Case $Msg_Box = 7
Exit
Case $Msg_Box = 2
Exit
EndSelect
EndIf
$sVersion = StringRegExp($sMain_Site, '?v=(.*?)"', 1)
If @error Or Not IsArray($sVersion) Then
MsgBox(0, 0, 'Không thể lấy thông tin Version')
Return
EndIf
If $Read_ini_Version = $sVersion[0] Then
Return
Else
$Msg_Box = MsgBox(3, 'Thông báo', 'Đã có dữ liệu mới' & @CRLF & 'Bạn có muốn cập nhật không ?')
Select
Case $Msg_Box = 6
Update_Database()
Case $Msg_Box = 7
Return
Case $Msg_Box = 2
Return
EndSelect
EndIf
Else
$Msg_Box = MsgBox(3, 'Thông báo', 'Bạn chưa có dữ liệu' & @CRLF & 'Bạn có muốn cập nhật không ?')
Select
Case $Msg_Box = 6
Update_Database()
Case $Msg_Box = 7
Exit
Case $Msg_Box = 2
Exit
EndSelect
EndIf
EndFunc ;==>Check_Update
Func Update_Database()
$sMain_Site = _HttpRequest($Result, 'http://champion.gg/')
If @error Or Not $sMain_Site Then
MsgBox(0, 0, 'Không thể kết nối đến Http://champion.gg')
Return
EndIf
$sVersion = StringRegExp($sMain_Site, '?v=(.*?)"', 1)
If @error Or Not IsArray($sVersion) Then
MsgBox(0, 0, 'Không thể lấy thông tin Version')
Return
EndIf
$sVersion = $sVersion[0]
$Write_Version_Ini = IniWrite($File_Setting, 'Setting', 'Version', $sVersion)
If $Write_Version_Ini = 0 Then
MsgBox(0, 0, 'Không thể ghi File Version' & @error)
Return
EndIf
$Reg_Champion = StringRegExp($sMain_Site, '<div class="champ-index-img (.*?)">', 3)
If @error Or Not IsArray($Reg_Champion) Then
MsgBox(0, 0, 'Không thể lấy danh sách Tướng')
Return
EndIf
$Write_Champ_Ini = IniWrite($File_Setting, 'Setting', 'Champion', _ArrayToString($Reg_Champion))
If $Write_Champ_Ini = 0 Then
MsgBox(0, 0, 'Không thể ghi dữ liệu')
Return
EndIf
$Reg_Link_All = StringRegExp($sMain_Site, '(/champion/.*?/.*?)"', 3)
If @error Or Not IsArray($Reg_Link_All) Then
MsgBox(0, 0, 'Không thể lấy link Tướng')
Return
EndIf
For $i = 0 To UBound($Reg_Link_All) - 1
If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
Local $Champ = StringRegExp($Reg_Link_All[$i], '/champion/(.*?)/', 1)[0]
If Not $Champ Then
MsgBox(0, 0, 'Không thể lấy Link bảng bổ trợ')
Return
EndIf
Local $Lane = StringRegExp($Reg_Link_All[$i], '/champion/.*?/(.*?)$', 1)[0]
If Not $Lane Then
MsgBox(0, 0, 'Không thể lấy Link bảng bổ trợ')
Return
EndIf
Local $File_Champ = @ScriptDir & 'Data' & $Champ & '.ini'
ToolTip('Đang cập nhật dữ liệu'&@crlf&'Tướng: '&$Champ,@DesktopWidth -200,@DesktopHeight -100 ,'Thông báo',1)
Local $sHtml = _HttpRequest($Result, 'http://champion.gg' & $Reg_Link_All[$i])
If @error Or Not $sHtml Then
MsgBox(0, 0, 'Không thể lấy thông tin Tướng: ' & $Champ)
Return
EndIf
$Reg_Mastery = StringRegExp($sHtml, ' mastery-(.*?) mastery-active', 3)
If @error Or Not IsArray($Reg_Mastery) Then ContinueLoop
For $p = 0 To UBound($Reg_Mastery)
If $Reg_Mastery[$p] > $Reg_Mastery[$p + 1] Then
ExitLoop
EndIf
Next
$Many_Use = _ArrayToString($Reg_Mastery, '|', 0, 9)
$Win_Rate = _ArrayToString($Reg_Mastery, '|', 10)
$Write_ini = IniWrite($File_Champ, $Lane, 'Most Frequent', $Many_Use)
If $Write_ini = 0 Then
MsgBox(0, 0, 'Không thể ghi dữ liệu vào máy tính')
Return
EndIf
$Write_ini = IniWrite($File_Champ, $Lane, 'Highest Win', $Win_Rate)
If $Write_ini = 0 Then
MsgBox(0, 0, 'Không thể ghi dữ liệu vào máy tính')
Return
EndIf
Next
ToolTip('',@DesktopWidth -200,@DesktopHeight -100)
If $MyForm Then
MsgBox(0, 'Thông báo', 'Cập nhật thành công' & @CRLF & 'Mở lại chương trình để sử dụng')
Exit
EndIf
EndFunc ;==>Update_Database
;~ _ArrayDisplay($Reg_Link_All)
;~ MsgBox(0,0,$sVersion)
Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
$hWndFrom = $lParam
$iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word
$iCode = BitShift($wParam, 16) ; Hi Word
If Not IsHWnd($iIDFrom) Then $hWndCombo = GUICtrlGetHandle($iIDFrom)
Switch $hWndFrom
Case $Cb_Champion, $hWndCombo
Switch $iCode
Case $CBN_CLOSEUP ; Sent when the list box of a combo box has been closed
Case $CBN_DBLCLK ; Sent when the user double-clicks a string in the list box of a combo box
Case $CBN_DROPDOWN ; Sent when the list box of a combo box is about to be made visible
Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box
Switch $iIDFrom
Case $Cb_Champion
_GUICtrlComboBox_AutoComplete($Cb_Champion)
Case $Cb_Lane
_GUICtrlComboBox_AutoComplete($Cb_Lane)
Case $Cb_Type
_GUICtrlComboBox_AutoComplete($Cb_Type)
EndSwitch
Case $CBN_EDITUPDATE ; Sent when the edit control portion of a combo box is about to display altered text
Case $CBN_ERRSPACE ; Sent when a combo box cannot allocate enough memory to meet a specific request
Case $CBN_SELCHANGE, $CBN_KILLFOCUS ; Sent when the user changes the current selection in the list box of a combo box
Switch $iIDFrom
Case $Cb_Champion
$Champ_Pick = GUICtrlRead($Cb_Champion)
$Read_ini_Lane = IniReadSectionNames(@ScriptDir & 'Data' & $Champ_Pick & '.ini')
If @error Then Return
_GUICtrlComboBox_ResetContent($Cb_Lane)
GUICtrlSetData($Cb_Lane, _ArrayToString($Read_ini_Lane, '|', 1))
Case $Cb_Lane
$Champ_Pick = GUICtrlRead($Cb_Champion)
$Lane_Pick = GUICtrlRead($Cb_Lane)
$Read_ini_Type = IniReadSection(@ScriptDir & 'Data' & $Champ_Pick & '.ini', $Lane_Pick)
If @error Then Return
_GUICtrlComboBox_ResetContent($Cb_Type)
For $i = 1 To $Read_ini_Type[0][0]
GUICtrlSetData($Cb_Type, $Read_ini_Type[$i][0])
Next
EndSwitch
Case $CBN_SELENDCANCEL ; Sent when the user selects an item, but then selects another control or closes the dialog box
Case $CBN_SELENDOK ; Sent when the user selects a list item, or selects an item and then closes the list
Case $CBN_SETFOCUS ; Sent when a combo box receives the keyboard focus
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
![]() |
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team