Skip to content
AutoHotKey
2011.12.31 08:32

autohotkey) 핑테스트 프로그램

조회 수 18955 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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



핑테스트-text입력금지3.exe

핑테스트 및 c:\pingtest.txt 에 파일을 기록합니다.

핑로스는 c:\pingloss.txt에 파일을 기록합니다.


핑테스트-text입력금지-창안나오게하는거2.exe

핑로스만 c:\pingloss.txt에 파일을 기록합니다.

핑로스 발생시 ip 갱신여부를 확인하여 원인에 대한 메시지를 출력합니다.


#noTrayicon


;#IfWinActive, 핑테스트 ahk_class AutoHotkeyGUI

;{

;BlockInput, On

;}


;MsgBox % GetOSVersion() 

ver= % GetOSVersion() 

GetOSVersion() 

VarSetCapacity(v,148), NumPut(148,v) 

DllCall("GetVersionEx", "uint", &v) 

OSVer:=NumGet(v,4)NumGet(v,8) 

OSName:= OSVer=61 ? "Windows 7" 

:(OSVer=60 ? "Windows Vista" 

:(OSVer=52 ? "Windows XP 64-Bit Edition" 

:(OSVer=51 ? "Windows XP" 

:(OSVer=50 ? "Windows 2000" 

:"Unknown")))) 

return OSName 

}

;msgbox, 바보


; ******************* 추가적인 내용이 필요한 부분

; * IP / 

; 1. 키보드 후킹 기능을 이용하여 Edit 입력란에 키보드 입력을 막는다.

; 2. 적절한 컬러를 넣는다.

; 3. 시작시 IP할당과 오류만 수집, 정상만 수집, 모두 수집의 옵션 설정을 추가한다.

; ******************* 이정도 기능적인 부분이 추가된다면 괜찮겠죠?



ip=%1%

StringLen, OutputVar, ip

;msgbox, %ip%

if ip<1

{

ip=164.124.101.2

; msgbox, 없다? %ip%

}

if ip>1

{

; msgbox, 있다? %ip%

}

;msgbox, %ip%



Gui, Add, Edit, x6 y40 w510 h350 readonly, 

;Gui, Add, Text, x6 y10 cBlue IP1, 로컬IP : %A_IPAddress1%

;Gui, Add, Text, x160 y10 cBlue IP2, 대상Ping : %ip%

;Gui, Add, Text, x320 y10 cBlue IP3, 저장위치 : C:\pingTest.txt

;Gui, Add, Text, x320 y25 cBlue IP3, 오류위치 : C:\pingloss.txt

Gui, Add, Text, x6 y10 cBlue, 로컬IP : %A_IPAddress1%

Gui, Add, Text, x160 y10 cBlue, 대상Ping : %ip%

Gui, Add, Text, x320 y10 cBlue, 저장위치 : C:\pingTest.txt

Gui, Add, Text, x320 y25 cBlue, 오류위치 : C:\pingloss.txt

Gui, Show, x398 y110 h400 w520, 핑테스트



loop

{

sleep, 2000

runwait, %comspec% /c "%systemroot%\system32\ping %ip% -n 1 > C:\Ping.txt",, hide

;FileRead, ping, C:\ping.txt

if (ver="Windows 7") or (ver="Windows Vista")

{

FileReadLine, ping, C:\ping.txt, 3

}

if (ver="Windows XP") or (ver="Windows XP 64-Bit Edition") or (ver="Windows 2000") or (ver="Unknown")

{

FileReadLine, ping, C:\ping.txt, 7

}


filedelete, C:\ping.txt

Ifinstring, Ping, Request

{


; pingline3=%pingline2%

; pingline2=%pingline1%

pingline1=%pingline%



if pingline3

{

pinglines=%pingline3%`n

}


if pingline2

{

pinglines=%pingline2%`n

}


if pingline1

{

pinglines=%pingline1%`n

}


pingline=%pinglines%%A_Mon%월 %A_MDay%일 %A_Hour%시 %A_Min%분 %A_Sec%초 Request TimeOut. 점검요망.

GuiControl, Text, Edit1, % pingline

FileAppend, %pingline%`n, C:\pingTest.txt

FileAppend, %pingline%`n, C:\pingloss.txt

; return

}


else

{

stringgetpos, pos1, ping, time

stringtrimleft, TTL, ping, %pos1%

stringgetpos, pos2, TTL, TTL

StringLeft, Time, TTL, %pos2%

Stringtrimleft, TTL, TTL, %pos2%

Stringtrimright, time, time, 1


timenum:=RegExReplace(time,"[^0-9]") 

if timenum=1

{


; pingline3=%pingline2%

; pingline2=%pingline1%

pingline1=%pingline%



if pingline3

{

pinglines=%pingline3%`n

}


if pingline2

{

pinglines=%pingline2%`n

}


if pingline1

{

pinglines=%pingline1%`n

}


pingline=%pinglines%%A_Mon%월 %A_MDay%일 %A_Hour%시 %A_Min%분 %A_Sec%초 자신의 컴퓨터 입니다.

GuiControl, Text, Edit1, % pingline

FileAppend, %pingline%`n, C:\pingTest.txt

}


else

{

; pingline3=%pingline2%

; pingline2=%pingline1%

pingline1=%pingline%



if pingline3

{

pinglines=%pingline3%`n

}


if pingline2

{

pinglines=%pingline2%`n

}


if pingline1

{

pinglines=%pingline1%`n

}



pingline=%pinglines%%A_Mon%월 %A_MDay%일 %A_Hour%시 %A_Min%분 %A_Sec%초 [ %ping% ]

SendMessage, 0x0C, 0, &pingline, Edit1, %A%

GuiControl, Text, Edit1, % pingline

FileAppend, %pingline%`n, C:\pingTest.txt

}

}


}


IP:

return


^R::

reload

return


GuiClose:

ExitApp

return


^X::

ExitApp

return


^#!`::

Winhide, 핑테스트 ahk_class AutoHotkeyGUI

return


^#!1::

Winshow, 핑테스트 ahk_class AutoHotkeyGUI

return



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

?
  • ?
    ㅎㅎ 2012.01.18 04:05

    164.124.101.2 파워콤껀데 KT껄로 IP전환할수잇거나 바꿔주실수있나요?????

     


  1. 22
    Feb 2012
    07:24

    Autohotkey) Find WM_COMMAND parameter with Winspector

    CategoryAutoHotKey Views35874
    Read More
  2. 08
    Jan 2012
    16:24

    autohotkey) 네 코드를 보여, 내가 당신에게서 배우고 싶어요

    CategoryAutoHotKey Views15118
    Read More
  3. 31
    Dec 2011
    17:18

    autohotkey) Virus?

    CategoryAutoHotKey Views34687
    Read More
  4. 31
    Dec 2011
    08:32

    autohotkey) 핑테스트 프로그램

    CategoryAutoHotKey Views18955
    Read More
  5. 31
    Dec 2011
    08:00

    autohotkey) Mutex에 대해서

    CategoryAutoHotKey Views24128
    Read More
  6. 30
    Dec 2011
    19:09

    autohotkey) IPv6 모두 사용안함 설정하기

    CategoryAutoHotKey Views19135
    Read More
  7. 26
    Dec 2011
    08:58

    Ahk) ip할당 진단프로그램

    CategoryAutoHotKey Views12131
    Read More
  8. 21
    Dec 2011
    19:17

    autohotkey) 맥어드레스 추출

    CategoryAutoHotKey Views15086
    Read More
  9. 17
    Dec 2011
    17:24

    부팅완료 메시지 프로그램

    CategoryAutoHotKey Views12728
    Read More
  10. 29
    Nov 2011
    08:55

    autohotkey) 웹페이지의 프레임 내용보기 & 클릭하기

    CategoryAutoHotKey Views15155
    Read More
  11. 08
    Aug 2011
    12:57

    [AHK_B&AHK_L] 익스플로러 HTML 문서정보 알아내기(IE HTML Element Spy)

    CategoryAutoHotKey Views15163
    Read More
  12. 02
    Aug 2011
    17:03

    [AHK_B&AHK_L] 엑셀 제어 비교.

    CategoryAutoHotKey Views20262
    Read More
  13. 02
    Aug 2011
    16:39

    [AHK_L] 현재 열려진 인터넷 창 값 가져오기

    CategoryAutoHotKey Views16582
    Read More
  14. 30
    Mar 2011
    17:18

    정보수집

    CategoryAutoHotKey Views16094
    Read More
  15. 25
    Feb 2011
    08:54

    [ahk]웹페이지가 띄워진 창 내용을 추출하여 로딩이 완료되었는지를 확인할 수 있는 소스

    CategoryAutoHotKey Views14750
    Read More
  16. 24
    Feb 2011
    18:33

    ahk로 만든 파일을 exe로 컴파일 한 후 실행시킬때 변수를 임의

    CategoryAutoHotKey Views15344
    Read More
  17. 22
    Feb 2011
    13:00

    클릭해서 새창열리는 페이지에 클릭 또는 값설정 가능한가요?

    CategoryAutoHotKey Views14731
    Read More
  18. 22
    Feb 2011
    01:31

    ahk_l 웹페이지 파일로 저장한 뒤 불러와 필요한 부분 추출하여 출력하기

    CategoryAutoHotKey Views16996
    Read More
  19. 22
    Feb 2011
    01:22

    ahk_l 웹페이지 앞, 뒤페이지 제어 예제소스 및 설명첨부

    CategoryAutoHotKey Views17546
    Read More
  20. 22
    Feb 2011
    01:15

    ahk_l 과 com 의 이해

    CategoryAutoHotKey Views17495
    Read More
Board Pagination Prev 1 2 3 4 Next
/ 4

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소