Skip to content
AutoHotKey
2011.12.31 08:32

autohotkey) 핑테스트 프로그램

조회 수 18950 추천 수 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. 16
    Jul 2012
    16:25

    GET.CELL 매크로함수 응용

    CategoryExcel Views40175
    Read More
  2. 12
    May 2012
    17:06

    AHK) AUTOKEY 웹페이지 열지않고 소스 가져오기 또는 로그인 하기

    CategoryAutoHotKey Views52952
    Read More
  3. 16
    Mar 2012
    08:06

    Autohotkey) 화면보호기(ScreenSaver) On/Off 방법

    CategoryAutoHotKey Views40675
    Read More
  4. 13
    Mar 2012
    23:06

    autohotkey) 편입 변수

    CategoryAutoHotKey Views28888
    Read More
  5. 06
    Mar 2012
    08:34

    autohotkey) 윈도우 ahk_id 추출하기

    CategoryAutoHotKey Views30088
    Read More
  6. 25
    Feb 2012
    12:39

    인터넷 익스플러러 속도 향샹을 위한 팁

    Category컴퓨터잡담 Views24571
    Read More
  7. 22
    Feb 2012
    08:19

    autohotkey) postmessage mouse control

    CategoryAutoHotKey Views28628
    Read More
  8. 22
    Feb 2012
    07:24

    Autohotkey) Find WM_COMMAND parameter with Winspector

    CategoryAutoHotKey Views35869
    Read More
  9. 08
    Jan 2012
    16:24

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

    CategoryAutoHotKey Views15114
    Read More
  10. 31
    Dec 2011
    17:18

    autohotkey) Virus?

    CategoryAutoHotKey Views34679
    Read More
  11. 31
    Dec 2011
    08:32

    autohotkey) 핑테스트 프로그램

    CategoryAutoHotKey Views18950
    Read More
  12. 31
    Dec 2011
    08:00

    autohotkey) Mutex에 대해서

    CategoryAutoHotKey Views24119
    Read More
  13. 30
    Dec 2011
    19:09

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

    CategoryAutoHotKey Views19133
    Read More
  14. 26
    Dec 2011
    08:58

    Ahk) ip할당 진단프로그램

    CategoryAutoHotKey Views12119
    Read More
  15. 21
    Dec 2011
    19:17

    autohotkey) 맥어드레스 추출

    CategoryAutoHotKey Views15057
    Read More
  16. 17
    Dec 2011
    17:41

    IE 훅킹 혹은 가로채기. 강좌

    Category컴퓨터잡담 Views14604
    Read More
  17. 17
    Dec 2011
    17:24

    부팅완료 메시지 프로그램

    CategoryAutoHotKey Views12719
    Read More
  18. 29
    Nov 2011
    08:55

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

    CategoryAutoHotKey Views15147
    Read More
  19. 11
    Oct 2011
    17:43

    AHK & my Address of Pointer and my Offset

    Category컴퓨터잡담 Views13183
    Read More
  20. 11
    Oct 2011
    15:45

    Ahk Standard Library Collection, 2010 Sep (+Gui) ~ Libs: 100

    Category컴퓨터잡담 Views14189
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소