#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Gui, Add, Text, x6 y9 w30 h10 , URL
Gui, Add, Edit, x34 y5 w300 h20 vINPUT_URL, https://
Gui, Add, Progress, x12 y89 w350 h10 vProgrs, 0
Gui, Add, Text, x162 y109 w30 h20 vPOST_NUM,
Gui, Add, Text, x6 y31 w30 h20 , Path
Gui, Add, Edit, x34 y29 w300 h20 vFILE_PATH,C:\Users\%A_USERNAME%
GuiControl, Disable, FILE_PATH
Gui, Add, Button, x337 y29 w40 h20 , 선택
Gui, Add, Text, x12 y63 w90 h20 , 포스트 범위
Gui, Add, Edit, x82 y59 w100 h20 vSTART_NUM, 1
Gui, Add, Text, x192 y63 w10 h10 , -
Gui, Add, Edit, x212 y59 w100 h20 vEND_NUM, 5
Gui, Add, Text, x12 y139 w200 h20 , F1 : 시작 - F9 : 중지 | 재시작
Gui, Add, Text, x212 y138 w100 h20 , 페이지 로딩 시간
Gui, Add, DropDownList, x312 y135 w40 h75 vPaging_time Choose2, 2초|3초|4초|5초
Gui, Add, Text, x252 y112 w50 h20 , 브라우저
Gui, Add, DropDownList, x312 y109 w40 h50 vSel_Browser Choose1, IE|Chrome
; Generated using SmartGUI Creator 4.0
Gui, Show, x553 y172 h167 w385, html 스크래퍼
Return
GuiClose:
ExitApp
global URL := ""
global SAVE_PATH = ""
global Browser := ""
send_func(wait1)
{
run,%Browser% "%URL%"
Sleep wait1
SendInput,^s
Sleep 1000
SendInput,^l
Clipboard := SAVE_PATH
SendInput,^v{Enter}
Sleep 500
SendInput,{tab 9}{Enter}
if ( Browser = "iexplore.exe" )
{
Sleep 6500
SendInput,^w
}
}
Button선택:
{
FileSelectFolder,File_Path
if (!FILE_PATH)
{
FILE_PATH = C:\Users\%A_USERNAME%
}
GuiControl,,File_Path,%FILE_PATH%
}
F1::
GuiControl, , Progrs , 0
Gui,Submit,nohide
POST := START_NUM
URL := INPUT_URL
SAVE_PATH := FILE_PATH
sleep_time := 3000
Browser := "iexplore.exe"
if (URL and END_NUM >= START_NUM)
{
GuiControl, Disable, INPUT_URL
GuiControl, Disable, START_NUM
GuiControl, Disable, END_NUM
GuiControl, Disable, Paging_time
GuiControl, Disable, Sel_Browser
if ( Sel_Browser = "Chrome" )
{
Browser := "chrome.exe"
}
if ( Paging_time = "2초" ) {
sleep_time := 2000
}
else if ( Paging_time = "4초" ) {
sleep_time := 4000
}
else if ( Paging_time = "5초" ) {
sleep_time := 5000
}
while( POST <= END_NUM ) {
URL = %INPUT_URL%%POST%
PROGRESS := END_NUM - START_NUM + 1
send_func(sleep_time)
gauge := A_INDEX / PROGRESS * 100
GuiControl, , POST_NUM , %gauge%`%
GuiControl, , Progrs , %gauge%
POST++
}
} else {
msgbox,{URL is Empty or A is greater than B}
}
GuiControl, enable, INPUT_URL
GuiControl, enable, START_NUM
GuiControl, enable, END_NUM
GuiControl, enable, Paging_time
GuiControl, enable, Sel_Browser
return
F9::
pause
return