- Arawn's Dev Blog
- Outsider's Dev Story
- Toby's Epril
- Benelog
- NHN 개발자 블로그
- SK 플래닛 기술 블로그
- OLC CENTER
- 소프트웨어 경영/공학 블로그
- 모바일 컨버전스
- KOSR - Korea Operating System …
- 넥스트리 블로그
- 리버스코어 ReverseCore
- SLiPP
- 개발자를 위하여... (Nextree 임병인 수석)
- "트위터 부트스트랩: 디자이너도 놀라워할 매끈하고 직관…
- Learning English - The English…
- real-english.com
- 'DataScience/Deep Learning' 카테…
- Deep Learning Summer School, M…
- Deep Learning Courses
민서네집
[Autohotkey] 네이버 자동로그인 스크립트 본문
http://www.autohotkey.co.kr/cgi/board.php?bo_table=qna&wr_id=44764
;#[출처] http://www.autohotkey.co.kr/cgi/board.php?bo_table=qna&wr_id=44764
#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.
#SingleInstance Off
Gui, Add, Edit, x22 y20 w110 h20 vID, 아이디
Gui, Add, Edit, x22 y50 w110 h20 vPW, 패스워드
Gui, Add, Button, x22 y100 w100 h30 gLogin, 로그인
Gui, Show, x127 y87 h152 w166, Edit Box Test
OnMessage(0x201, "WM_LBUTTONDOWN")
Return
WM_LBUTTONDOWN(wParam, lParam) ; Thanks to Jackie Sztuk _Blackholyman - https://autohotkey.com/board/topic/86639-clear-edit-box-on-click/?p=551360
{
if (A_GuiControl = "ID" || A_GuiControl = "PW")
GuiControl,,% A_GuiControl,
}
Login:
Gui, Submit, NoHide
pwb:= ComObjCreate( "InternetExplorer.Application" )
pwb.navigate( "https://nid.naver.com/nidlogin.login" )
pwb.Visible := True
Sleep, 1000
;MsgBox %ID%
pwb.document.getElementById( "id" ).value := ID ; <---여기에 변수입력을 하고싶어요.
pwb.document.getElementById( "pw" ).value := PW ; <---여기에 변수입력을 하고싶어요.
pwb.document.getElementById("frmNIDLogin").submit()
Return
GuiClose:
ExitApp
[참고]
Gui, Submit, NoHide 를 해줘야지 Edit 컨트롤의 변수값에 현재 Edit 컨트롤에 있는 내용이 할당된다.
ID, PW 변수값을 웹브라우저에 입력할 때 % 없이 적어야 하는 것도 중요!
Clear Edit Box on Click
'Autohotkey' 카테고리의 다른 글
[Autohotkey] 크롬 브라우저 5분마다 새로고침 하기 (0) | 2017.11.08 |
---|---|
[Autohotkey] GUI 프로그래밍 (0) | 2017.11.08 |
AutoHotKey 설정 및 인코딩 변환 (0) | 2017.11.08 |
Autohotkey 디버그 방법 (0) | 2017.11.07 |
Autohotkey 편집 프로그램 (0) | 2017.11.07 |