Skip to content
조회 수 20331 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄


ahk와 ahk_l 의 웹페이지 로딩완료 체크 비교

How to know when the webpage in done loading? 
- Sean's IEReady() function is great for this, and can be found here. Here is an example using the ReadyState property, which should work in may scenarios: 

Code:
; AutoHotkey_L:

pwb := ComObjCreate( "InternetExplorer.Application" ) ; Create an IE object
pwb.Visible := True ; Make the IE object visible

pwb.Navigate( "www.AutoHotkey.com" )
While, pwb.ReadyState <> 4
; While, pwb.Busy
   Continue
Code:
; AHK Basic:

COM_Init() ; Initialize COM
pwb := COM_CreateObject( "InternetExplorer.Application" ) ; Create an IE object
COM_Invoke( pwb, "Visible", True ) ; Make the IE object visible

COM_Invoke( pwb, "Navigate""www.AutoHotkey.com" )
While, COM_Invoke( pwb, "ReadyState" ) <> 4
; While, COM_Invoke( pwb, "Busy" )
   Continue

OR - here is an example using the DocumentComplete event: 
Code:
; AutoHotkey_L:

pwb := ComObjCreate( "InternetExplorer.Application" )
pwb.Visible := True
ComObjConnect( pwb, "IE_" ), loading = 1 ; Connect IE object & set var "loading" as TRUE
pwb.Navigate( "www.AutoHotkey.com" )
While, loading
   Continue
MsgBox, DONE!
ComObjConnect( pwb ) ; Disconnect IE object
Return

IE_DocumentComplete() { ; the "IE_" prefix corresponds to the ComObjConnect() function above
   Global loading = 0 ; Break the While-Loop
}
Code (Expand):
; AHK Basic:

COM_Init()
pwb := COM_CreateObject( "InternetExplorer.Application" )
COM_Invoke( pwb, "Visible""True" )
sink := COM_ConnectObject( pwb, "IE_" ), loading = 1 ; Connect IE object & set var "loading" as TRUE
COM_Invoke( pwb, "Navigate""www.AutoHotkey.com" )
While, loading
   Sleep, 10
MsgBox, DONE!
COM_DisconnectObject( sink ) ; Disconnect IE object
COM_Release( pwb )COM_Term()
Return

IE_DocumentComplete() { ; the "IE_" prefix corresponds to the COM_ConnectObject() function above
   Global loading = 0 ; Break the While-Loop
}










로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
697 컴퓨터잡담 Microsoft .NET Framework 버전 2.0 재배포 가능 패키지(x86) 1 1 file 2011.12.15 5092
696 Server Minify로 CSS, JS파일, gzip으로 한꺼번에 압축해서 전송하기 file 2016.11.27 4373
695 컴퓨터잡담 MouseOver - Background color, 마우스오버시 백그라운드 컬러 지정 7 2010.07.10 11041
694 컴퓨터잡담 MP3 소리 크기 조절 프로그램 file 2016.08.14 3645
693 Excel MS Office 2007 Excel 최근 문서 목록 삭제하기 1 2012.02.13 22243
692 WindowsTip MS 에센셜 정식한글판 (MSE) 2 3 2012.08.07 6731
691 WindowsTip MS-DOS 모드에서 Windows 복원 방법 3 2013.02.26 8188
690 Server MySQL - 속도저하에 따른 웹페이지 접속 지연 2016.03.03 1321
689 Server mysql 16CPU / 16GB My.cnf 1 2016.07.26 2529
688 Server MySQL 5.6 my.cnf 글로벌 변수인지 세션변수인지 확인 2016.03.24 1548
687 컴퓨터잡담 MySQL FEDERATED / InnoDB is disabled, myint64.dll 오류 어찌하오리 4 2010.04.19 27709
686 컴퓨터잡담 MYSQL my.cnf 최적화 15 2010.04.07 22600
685 컴퓨터잡담 MYSQL Qcache 값 조정~~~ 1 2010.04.13 19556
684 컴퓨터잡담 MySQL TABLE 손상시 대응방법(db 내용이 안 나올때) file 2009.08.24 31859
683 컴퓨터잡담 mysql threads_created 뭐냥? 4 2010.04.13 12247
682 컴퓨터잡담 mysql 날짜타입에 기본값으로 현재시간넣기 1 2009.12.07 38589
681 컴퓨터잡담 mysql 명령어 1 2 2009.12.04 12370
680 컴퓨터잡담 MYSQL 미 해결 과제 : Can't connect to MySQL server on 'localhost'(10055) 3 3 2009.11.21 64265
679 컴퓨터잡담 MYSQL 설정에 관한 조언 2 2012.02.04 4604
678 Server mysql 실행이 안되거나 테이블(사용중) 손상이 잃어난 경우 2 2012.07.14 13113
Board Pagination Prev 1 ... 10 11 12 13 14 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소