FTP 이용해서 다운로드 하는것 까지는
소스를 완성했는데요.
다운로드 진행상황을 구현해보고 싶습니다.
이미지도 좋고
백분율 표시도 좋고
총용량/받은용량 등으로 수치화 해도 좋구요.
혹시 비슷한 경험이 있으시거나
조언 주실수 있는 분 계실까요?
하나하나 필요한 것들 만들어 내다보니
엄청 재밌네요. ㅎ
시간탐험대를 요즘에 하는데
허접 매크로 나름 만들어 쓰고 있는데
자꾸 다른데로 눈이 가네요.
조언 부탁드립니다.
앱 플레이어 모바일 게임 과몰입 방지 매크로 등 인터넷상의 재밌는 것을 찾아 연구하는 사람들의 모임
FTP 이용해서 다운로드 하는것 까지는
소스를 완성했는데요.
다운로드 진행상황을 구현해보고 싶습니다.
이미지도 좋고
백분율 표시도 좋고
총용량/받은용량 등으로 수치화 해도 좋구요.
혹시 비슷한 경험이 있으시거나
조언 주실수 있는 분 계실까요?
하나하나 필요한 것들 만들어 내다보니
엄청 재밌네요. ㅎ
시간탐험대를 요즘에 하는데
허접 매크로 나름 만들어 쓰고 있는데
자꾸 다른데로 눈이 가네요.
조언 부탁드립니다.
제가 약 1달전에
여기저기 뒤적거려가며 여러개를 토대로 만들어놓은게 있는데
결과적으로는 실패를 했습니다.
이유는
다운로드진행창과 다 좋은데
파일의 다운받은 용량이 바로바로 갱신이 되지 않고 일정시간이 지나야 갱신이 되는데,,
갱신이 되야 Progress로 진행상태가 올라가는데 갱신이 될때까지 가만히있다가 실제 파일은 다운로드가 끝나버리더군요
이걸 해결할 방법을 못찾았습니다.
다운받는 방식은 똑같으나
첫번두번째꺼는 스크립트작성시 미리 지정한 경로에만 다운이 가능하게 처음 만들었던거구요
두번째는 좀더 편하게하려고 다운받을때 경로설정창이 떠 직접 다운받을 위치를 지정하게
수정했습니다.
한번 써보시고 개선가능하시면 개선해서좀 알려주세요 ㅎㅎ
다운로드에 쓰인 파일은 알약니다.
==================================첫번째==================================
Gui, Color, White
Gui, Add, Progress, x5 y20 w350 h20 vPercent, 123
Gui, Add, Text, x5 y45 w350 h15 cGreen vPercent2 +Center,
Gui, Add, Text, x10 y60 w250 h20 cRed +Center, (다운이 완료되면 이창은 자동으로 닫힘)
Gui, Add, Button, x280 y55 w70 h25 gButton, 취소
Gui, Show, w360,
goto 1
return
GuiClose:
exitapp
1:
gui,submit,nohide
SetTimer, 2, 0
UrlDownloadToFile, http://xdn-altools.cdn.x-cdn.com/altools/setup/ALYac25.exe, ALYac25.exe
SetTimer, 2, off
MsgBox,,완료,다운로드가 끝났습니다.
ExitApp
return
2:
gui,submit,nohide
SetBatchLines, -1
FileGetSize, size, ALYac25.exe, K ;ALYac25.exe의 파일크기를 확인 (M=MB단위,B=BYTE단위)
if (size > 0)
GuiControl,, Percent, 1
if (size > 3743)
GuiControl,, Percent, 10
if (size > 7486)
GuiControl,, Percent, 20
if (size > 11229)
GuiControl,, Percent, 30
if (size > 14972)
GuiControl,, Percent, 40
if (size > 18715)
GuiControl,, Percent, 50
if (size > 22458)
GuiControl,, Percent, 60
if (size > 26201)
GuiControl,, Percent, 70
if (size > 29944)
GuiControl,, Percent, 80
if (size > 33687)
GuiControl,, Percent, 90
if (size > 37438)
GuiControl,, Percent, 100
return
Button:
ExitApp
return
===========================================================================
================================== 두번째 ==================================
gosub 0
Gui, Color, White
Gui, Add, Progress, x5 y20 w350 h20 vPercent, 123
Gui, Add, Text, x5 y45 w350 h15 cGreen vPercent2 +Center,
Gui, Add, Text, x10 y60 w250 h20 cRed +Center, (다운이 완료되면 이창은 자동으로 닫힘)
Gui, Add, Button, x280 y55 w70 h25 gButton, 취소
Gui, Show, w360,
goto 1
return
GuiClose:
exitapp
0:
gui,submit,nohide
FileSelectFolder, Folder, , 3
if Folder =
{
MsgBox, 취소되었습니다.
ExitApp
return
}
else
MsgBox, 3, 확인, 선택한경로는`n%Folder% 입니다`n`n맞습니까?
IfMsgBox, Yes
{
Return
}
IfMsgBox, No
{
Goto, 0
}
IfMsgbox, Cancel
{
ExitApp
return
}
1:
gui,submit,nohide
SetTimer, 2, 0
UrlDownloadToFile, http://xdn-altools.cdn.x-cdn.com/altools/setup/ALYac25.exe, %Folder%\ALYac25.exe
SetTimer, 2, off
MsgBox,,완료,다운로드가 끝났습니다.
ExitApp
return
2:
gui,submit,nohide
SetBatchLines, -1
FileGetSize, size, %Folder%\ALYac25.exe, M ;ALYac25.exe의 파일크기를 확인 (M=MB단위,B=BYTE단위)
if size > 0
GuiControl,, Percent, 1
if size > 3.6
GuiControl,, Percent, 10
if size > 7.2
GuiControl,, Percent, 20
if size > 10.8
GuiControl,, Percent, 30
if size > 14.4
GuiControl,, Percent, 40
if size > 18
GuiControl,, Percent, 50
if size > 21.6
GuiControl,, Percent, 60
if size > 25.2
GuiControl,, Percent, 70
if size > 28.8
GuiControl,, Percent, 80
if size > 32.4
GuiControl,, Percent, 90
if size > 36
GuiControl,, Percent, 100
return
Button:
MsgBox, 4, 경고!!, 다운로드를 취소하시겠습니까?
IfMsgBox, Yes
{
SetTimer, 2, off
ExitApp
Return
}
IfMsgBox, No
{
return
}
Gui, Color, White
Gui, Add, Progress, x5 y10 w350 h20 vPercent, 123
Gui, Add, Text, x105 y40 w140 h15 cGreen vPercent2 +Center, 다운로드 중비중
;Gui, Add, Text, x10 y60 w250 h20 cRed +Center, 이?
Gui, Add, Text, x110 y65 h20 cGreen +Center, 이용가능시간:09:00~18:00
Gui, Add, Button, x280 y55 w70 h25 gButton,취 소
Gui, Show, w360, 멜론 다운로드
goto 1
return
GuiClose:
exitapp
1:
gui,submit,nohide
SetTimer, 2, 1000
UrlDownloadToFile, ftp://주소/Music/Melon.zip, Melon.zip
SetBatchLines, -1
FileGetSize, tsize, ftp://주소/Music/Melon.zip, M ;(M=MB단위,B=BYTE단위)
SetTimer, 2, off
MsgBox, ,완료,다운로드 완료
ExitApp
return
2:
gui,submit,nohide
SetBatchLines, -1
FileGetSize, size, Melon.zip, M ;(M=MB단위,B=BYTE단위)
CC:= size/840*100
CC:=Floor(CC+0.5)
Gui, Add, Text, x105 y40 w160 h16 cRed +Center, 다운로드 중 `[%size%MB %CC%`%`] %tsize%
loop, 100
{
GuiControl,, Percent, %CC%
}
return
run, Melon.zip
Button:
ExitApp
return
아 단백질님이셨구나.
단백질님 소스는 이렇게 제가 수정해서 쓰고 있어요. ㅎ
백분율료 퍼센트를 계산해서 변수로 잡았습니다.
감사드립니다.
멜론백곡 다운받는 소스인데요.
멜론이 업데이트 될때마다 용량이 달라서
위에 소스에서는 임의로 840MB 로 고정했는데
정확히 사이즈를 가져올 방법이 없네요. ㅜㅜ
광고
전체 최신 인기글
전체 주간 인기글
FTP로 다운받는 소스가 어떤식으로 구성되있는지는 모르겠습니다만
파일의 전체 용량과 현재 다운받은 용량을 알수있다면 Progress로 나타내는것도 괜찮을거같네요.