LignasBlog
Auto Hot Key 자료 보관, 정리, 스크립트해부, 스터디하는곳입니다.
2015년 4월 11일 토요일
2015년 2월 11일 수요일
[오토핫키스크립트] 컴퓨터켜져있는지확인하는 스크립트
#Persistent
Version = 1.0
ProgramName = 감시카메라 체크 프로그램
ProgramTitle = %ProgramName% v%Version%
Menu, Tray, NoDefault
Menu, Tray, NoStandard
Menu, Tray, Add, IP변경, IP
Menu, Tray, Add, 만든사람, copy
Menu, Tray, Add, E&xit, Close
Menu, Tray, Click, 1
TrayTip, %ProgramTitle%, 하남창고의 카메라와 매장 내 카메라의`n동작여부를 체크 합니다., 5, 1
sleep, 5000
IP_File = %A_WinDir%IP.txt
CoordMode, ToolTip, Screen
IfNotExist, %IP_File%
{
TrayTip, %ProgramTitle%, 최초 실행 시 하남창고 카메라 서버의 IP를 입력해야만 합니다., 5, 1
sleep, 3000
Gosub IP
}
FileRead, IP_num, %IP_File%
loop {
IfNotExist, \Camera-server카메라 정보 ec
Msgbox, 0, 경고!!, 매장 감시카메라 서버 확인요망
UrlDownloadToFile, http://%IP_num%:1000/web.gif, %Temp%camera.tmp
If ErrorLevel 0
Gosub msg
else
hanger = 0
sleep, 300000
}
Return
msg:
If hanger = 1
{
Gosub, msg3
Return
}
Msgbox, 12336, 경고!!, 창고 감시카메라 서버에 문제가 발생 되었을 수 있습니다.
Msgbox, 12324, 경고!!, 도움말을 보시겠습니까?
IfMsgBox, Yes
Msgbox, 4160, 도움말, 감시카메라 서버의 IP가 변경 되었거나`n서버가 다운 되었을 수 있습니다.`n서버가 다운 되었을 때는 직접 가서 재부팅을 해주어 합니다.`n`n단순히 IP가 변경된 경우라면 다음에서 변경된 IP를 입력 해주시면`n본 프로그램이 정상적으로 작동하게 됩니다.
Msgbox, 12324, 창고 카메라 서버 문제해결, IP가 변경 되었습니까?
IfMsgBox, Yes
Gosub IP
IfMsgBox, No
Gosub, msg2
Return
IP:
IPstart:
InputBox, UserInput, IP입력, IP를 입력 해주세요., , 200, 120
If ErrorLevel 0
Return
If Not UserInput
{
Msgbox, 0, 알림, IP를 입력 해주세요.
Goto IPstart
}
Msgbox, 36, 확인, 변경할 IP가 %UserInput% 이(가) 맞습니까?
IfMsgBox, Yes
{
FileDelete, %IP_File%
FileAppend, %UserInput%, %IP_File%
Msgbox, 64, 안내, 앞으로 변경된 IP %UserInput% 을(를) 체크하게 됩니다.
}
IfMsgBox, No
Goto IPstart
Return
msg2:
hanger=1
Msgbox, 4160, 문제해결 방법, 창고 카메라 서버 시스템을 재부팅 하십시오.`n재부팅이 완료되기 전까지 이 안내창은 계속 나오게 됩니다.
Return
msg3:
hanger=1
TrayTip, 경고!!, 창고 카메라 서버 시스템을 재부팅 하십시오.`n재부팅이 완료되기 전까지 이 안내창은 계속 나오게 됩니다., 5, 3
Return
Close:
TrayTip, 경고!!, 본 프로그램이 종료되면`n감시카메라의 상태를`n자동으로 체크할 수 없습니다., 5, 3
sleep, 500
MsgBox, 20, 프로그램 종료, 종료 하시겠습니까?
IfMsgBox, Yes
ExitApp
Return
copy:
TrayTip, 만든사람, 바로 나!, 5, 1
Return
Version = 1.0
ProgramName = 감시카메라 체크 프로그램
ProgramTitle = %ProgramName% v%Version%
Menu, Tray, NoDefault
Menu, Tray, NoStandard
Menu, Tray, Add, IP변경, IP
Menu, Tray, Add, 만든사람, copy
Menu, Tray, Add, E&xit, Close
Menu, Tray, Click, 1
TrayTip, %ProgramTitle%, 하남창고의 카메라와 매장 내 카메라의`n동작여부를 체크 합니다., 5, 1
sleep, 5000
IP_File = %A_WinDir%IP.txt
CoordMode, ToolTip, Screen
IfNotExist, %IP_File%
{
TrayTip, %ProgramTitle%, 최초 실행 시 하남창고 카메라 서버의 IP를 입력해야만 합니다., 5, 1
sleep, 3000
Gosub IP
}
FileRead, IP_num, %IP_File%
loop {
IfNotExist, \Camera-server카메라 정보 ec
Msgbox, 0, 경고!!, 매장 감시카메라 서버 확인요망
UrlDownloadToFile, http://%IP_num%:1000/web.gif, %Temp%camera.tmp
If ErrorLevel 0
Gosub msg
else
hanger = 0
sleep, 300000
}
Return
msg:
If hanger = 1
{
Gosub, msg3
Return
}
Msgbox, 12336, 경고!!, 창고 감시카메라 서버에 문제가 발생 되었을 수 있습니다.
Msgbox, 12324, 경고!!, 도움말을 보시겠습니까?
IfMsgBox, Yes
Msgbox, 4160, 도움말, 감시카메라 서버의 IP가 변경 되었거나`n서버가 다운 되었을 수 있습니다.`n서버가 다운 되었을 때는 직접 가서 재부팅을 해주어 합니다.`n`n단순히 IP가 변경된 경우라면 다음에서 변경된 IP를 입력 해주시면`n본 프로그램이 정상적으로 작동하게 됩니다.
Msgbox, 12324, 창고 카메라 서버 문제해결, IP가 변경 되었습니까?
IfMsgBox, Yes
Gosub IP
IfMsgBox, No
Gosub, msg2
Return
IP:
IPstart:
InputBox, UserInput, IP입력, IP를 입력 해주세요., , 200, 120
If ErrorLevel 0
Return
If Not UserInput
{
Msgbox, 0, 알림, IP를 입력 해주세요.
Goto IPstart
}
Msgbox, 36, 확인, 변경할 IP가 %UserInput% 이(가) 맞습니까?
IfMsgBox, Yes
{
FileDelete, %IP_File%
FileAppend, %UserInput%, %IP_File%
Msgbox, 64, 안내, 앞으로 변경된 IP %UserInput% 을(를) 체크하게 됩니다.
}
IfMsgBox, No
Goto IPstart
Return
msg2:
hanger=1
Msgbox, 4160, 문제해결 방법, 창고 카메라 서버 시스템을 재부팅 하십시오.`n재부팅이 완료되기 전까지 이 안내창은 계속 나오게 됩니다.
Return
msg3:
hanger=1
TrayTip, 경고!!, 창고 카메라 서버 시스템을 재부팅 하십시오.`n재부팅이 완료되기 전까지 이 안내창은 계속 나오게 됩니다., 5, 3
Return
Close:
TrayTip, 경고!!, 본 프로그램이 종료되면`n감시카메라의 상태를`n자동으로 체크할 수 없습니다., 5, 3
sleep, 500
MsgBox, 20, 프로그램 종료, 종료 하시겠습니까?
IfMsgBox, Yes
ExitApp
Return
copy:
TrayTip, 만든사람, 바로 나!, 5, 1
Return
[오토핫키스크립트] 파일관리기 , 공부용, 해부용
#SingleInstance force ; 같은 스크립트의 다중 프로세스로 실행의 금지/허가설정
#NoTrayIcon ; 프로그램이 트레이로 들어가지 않도록
#NoEnv ; 변수명을 해석할 때, 환경 변수를 무시한다
Gui, +Resize +MinSize ; 창크기변화 하게
Gui, Font, s10, Arial ; 폰트 지정
Gui, Add, Edit, x6 y10 w250 h22 vDirSelect, c:/
Gui, Add, Button, x+6 y10 w50 h22 gDirSelectBt, ...
Gui, Add, Button, x+13 w50 h22 gDirSelectView, View
Gui, Add, Edit, x+6 w40 h22 vFileListnum, 40
Gui, Add, Edit, x+6 w70 h22 vFileListType, *.*
Gui, Add, CheckBox, x+6 w120 h20 vSubFileall, 서브모두
Gui, Add, ListView, x0 y40 r20 w700 vDirFilelist glistClick, N|Name|Size|Modified|FullPath
Gui, Show, w700 h403,님투 파일관리기
Return
;--------------------------------------------
; 폴더 선택
;--------------------------------------------
DirSelectBt:
FileSelectFolder, dndir, , 3
if dndir =
{
return
}
GuiControl,, DirSelect, %dndir%
Return
;--------------------------------------------
; 해당 파일이 실행될 경우
;--------------------------------------------
listClick:
CoordMode,MOUSE,RELATIVE
MouseGetPos,mx,my,oID,oCNN
If(A_GuiEvent = "DoubleClick")
{ Gosub Doubleclick
}
Return
Doubleclick:
Return
;--------------------------------------------
; 선택된 폴더의 파일목록
;--------------------------------------------
DirSelectView:
Gui,Submit, NoHide
;--------------------------------------------
; 목록 다시 시작
;--------------------------------------------
LV_Delete()
;--------------------------------------------
; 전달 받은 폴더/파일마스크,,서브목록옵션
; Loop, 폴더 : 현재 폴더의 파일만
; Loop, 폴더,, 1 : 서브폴더의 파일전체
;--------------------------------------------
Loop, %DirSelect%\%FileListType%,, %SubFileall%
{
;------------------------------------------
; 지정한 갯수를 출력하고 빠져나온다
; 기본 40 개
;------------------------------------------
If A_Index>%FileListnum%
Break
;------------------------------------------
; 번호|파일명|크기|생성일|패치
; N|Name|Size|Modified|FullPath
;------------------------------------------
LV_Add("", A_Index, A_LoopFileName, A_LoopFileSize, A_LoopFileTimeModified, A_LoopFileLongPath)
}
;--------------------------------------------
; 셀크기 자동화
LV_ModifyCol()
Return
GuiSize:
;--------------------------------------------
; 창크기에 변화가 있을 경우 같이 크기가 변할
; 오브젝트 지정
;--------------------------------------------
Anchor("DirFilelist", "wh")
Return
GuiClose:
;--------------------------------------------
; 이 항목이 없으면 X 로 종료해도 프로세스에서
; 종료되지 않는다.
;--------------------------------------------
ExitApp
;--------------------------------------------
; 크기 자동함수
;--------------------------------------------
Anchor(i, a = "", r = false) {
static c, cs = 12, cx = 255, cl = 0, g, gs = 8, z = 0, k = 0xffff, gx = 1
If z = 0
VarSetCapacity(g, gs * 99, 0), VarSetCapacity(c, cs * cx, 0), z := true
If a =
{
StringLeft, gn, i, 2
If gn contains :
{
StringTrimRight, gn, gn, 1
t = 2
}
StringTrimLeft, i, i, t ? t : 3
If gn is not digit
gn := gx
}
Else gn := A_Gui
If i is not xdigit
{
GuiControlGet, t, Hwnd, %i%
If ErrorLevel = 0
i := t
Else ControlGet, i, Hwnd, , %i%
}
gb := (gn - 1) * gs
Loop, %cx%
If (NumGet(c, cb := cs * (A_Index - 1)) == i) {
If a =
{
cf = 1
Break
}
Else gx := A_Gui
d := NumGet(g, gb), gw := A_GuiWidth - (d >> 16 & k), gh := A_GuiHeight - (d & k), as := 1
, dx := NumGet(c, cb + 4, "Short"), dy := NumGet(c, cb + 6, "Short")
, dw := NumGet(c, cb + 8, "Short"), dh := NumGet(c, cb + 10, "Short")
Loop, Parse, a, xywh
If A_Index > 1
av := SubStr(a, as, 1), as += 1 + StrLen(A_LoopField)
, d%av% += (InStr("yh", av) ? gh : gw) * (A_LoopField + 0 ? A_LoopField : 1)
DllCall("SetWindowPos", "UInt", i, "Int", 0, "Int", dx, "Int", dy, "Int", dw, "Int", dh, "Int", 4)
If r != 0
DllCall("RedrawWindow", "UInt", i, "UInt", 0, "UInt", 0, "UInt", 0x0101) ; RDW_UPDATENOW | RDW_INVALIDATE
Return
}
If cf != 1
cb := cl, cl += cs
If (!NumGet(g, gb)) {
Gui, %gn%:+LastFound
WinGetPos, , , , gh
VarSetCapacity(pwi, 68, 0), DllCall("GetWindowInfo", "UInt", WinExist(), "UInt", &pwi)
, NumPut(((bx := NumGet(pwi, 48)) << 16 | by := gh - A_GuiHeight - NumGet(pwi, 52)), g, gb + 4)
, NumPut(A_GuiWidth << 16 | A_GuiHeight, g, gb)
}
Else d := NumGet(g, gb + 4), bx := d >> 16, by := d & k
ControlGetPos, dx, dy, dw, dh, , ahk_id %i%
If cf = 1
{
Gui, %gn%:+LastFound
WinGetPos, , , gw, gh
d := NumGet(g, gb), dw -= gw - bx * 2 - (d >> 16), dh -= gh - by - bx - (d & k)
}
NumPut(i, c, cb), NumPut(dx - bx, c, cb + 4, "Short"), NumPut(dy - by, c, cb + 6, "Short")
, NumPut(dw, c, cb + 8, "Short"), NumPut(dh, c, cb + 10, "Short")
Return, true
}
#NoTrayIcon ; 프로그램이 트레이로 들어가지 않도록
#NoEnv ; 변수명을 해석할 때, 환경 변수를 무시한다
Gui, +Resize +MinSize ; 창크기변화 하게
Gui, Font, s10, Arial ; 폰트 지정
Gui, Add, Edit, x6 y10 w250 h22 vDirSelect, c:/
Gui, Add, Button, x+6 y10 w50 h22 gDirSelectBt, ...
Gui, Add, Button, x+13 w50 h22 gDirSelectView, View
Gui, Add, Edit, x+6 w40 h22 vFileListnum, 40
Gui, Add, Edit, x+6 w70 h22 vFileListType, *.*
Gui, Add, CheckBox, x+6 w120 h20 vSubFileall, 서브모두
Gui, Add, ListView, x0 y40 r20 w700 vDirFilelist glistClick, N|Name|Size|Modified|FullPath
Gui, Show, w700 h403,님투 파일관리기
Return
;--------------------------------------------
; 폴더 선택
;--------------------------------------------
DirSelectBt:
FileSelectFolder, dndir, , 3
if dndir =
{
return
}
GuiControl,, DirSelect, %dndir%
Return
;--------------------------------------------
; 해당 파일이 실행될 경우
;--------------------------------------------
listClick:
CoordMode,MOUSE,RELATIVE
MouseGetPos,mx,my,oID,oCNN
If(A_GuiEvent = "DoubleClick")
{ Gosub Doubleclick
}
Return
Doubleclick:
Return
;--------------------------------------------
; 선택된 폴더의 파일목록
;--------------------------------------------
DirSelectView:
Gui,Submit, NoHide
;--------------------------------------------
; 목록 다시 시작
;--------------------------------------------
LV_Delete()
;--------------------------------------------
; 전달 받은 폴더/파일마스크,,서브목록옵션
; Loop, 폴더 : 현재 폴더의 파일만
; Loop, 폴더,, 1 : 서브폴더의 파일전체
;--------------------------------------------
Loop, %DirSelect%\%FileListType%,, %SubFileall%
{
;------------------------------------------
; 지정한 갯수를 출력하고 빠져나온다
; 기본 40 개
;------------------------------------------
If A_Index>%FileListnum%
Break
;------------------------------------------
; 번호|파일명|크기|생성일|패치
; N|Name|Size|Modified|FullPath
;------------------------------------------
LV_Add("", A_Index, A_LoopFileName, A_LoopFileSize, A_LoopFileTimeModified, A_LoopFileLongPath)
}
;--------------------------------------------
; 셀크기 자동화
LV_ModifyCol()
Return
GuiSize:
;--------------------------------------------
; 창크기에 변화가 있을 경우 같이 크기가 변할
; 오브젝트 지정
;--------------------------------------------
Anchor("DirFilelist", "wh")
Return
GuiClose:
;--------------------------------------------
; 이 항목이 없으면 X 로 종료해도 프로세스에서
; 종료되지 않는다.
;--------------------------------------------
ExitApp
;--------------------------------------------
; 크기 자동함수
;--------------------------------------------
Anchor(i, a = "", r = false) {
static c, cs = 12, cx = 255, cl = 0, g, gs = 8, z = 0, k = 0xffff, gx = 1
If z = 0
VarSetCapacity(g, gs * 99, 0), VarSetCapacity(c, cs * cx, 0), z := true
If a =
{
StringLeft, gn, i, 2
If gn contains :
{
StringTrimRight, gn, gn, 1
t = 2
}
StringTrimLeft, i, i, t ? t : 3
If gn is not digit
gn := gx
}
Else gn := A_Gui
If i is not xdigit
{
GuiControlGet, t, Hwnd, %i%
If ErrorLevel = 0
i := t
Else ControlGet, i, Hwnd, , %i%
}
gb := (gn - 1) * gs
Loop, %cx%
If (NumGet(c, cb := cs * (A_Index - 1)) == i) {
If a =
{
cf = 1
Break
}
Else gx := A_Gui
d := NumGet(g, gb), gw := A_GuiWidth - (d >> 16 & k), gh := A_GuiHeight - (d & k), as := 1
, dx := NumGet(c, cb + 4, "Short"), dy := NumGet(c, cb + 6, "Short")
, dw := NumGet(c, cb + 8, "Short"), dh := NumGet(c, cb + 10, "Short")
Loop, Parse, a, xywh
If A_Index > 1
av := SubStr(a, as, 1), as += 1 + StrLen(A_LoopField)
, d%av% += (InStr("yh", av) ? gh : gw) * (A_LoopField + 0 ? A_LoopField : 1)
DllCall("SetWindowPos", "UInt", i, "Int", 0, "Int", dx, "Int", dy, "Int", dw, "Int", dh, "Int", 4)
If r != 0
DllCall("RedrawWindow", "UInt", i, "UInt", 0, "UInt", 0, "UInt", 0x0101) ; RDW_UPDATENOW | RDW_INVALIDATE
Return
}
If cf != 1
cb := cl, cl += cs
If (!NumGet(g, gb)) {
Gui, %gn%:+LastFound
WinGetPos, , , , gh
VarSetCapacity(pwi, 68, 0), DllCall("GetWindowInfo", "UInt", WinExist(), "UInt", &pwi)
, NumPut(((bx := NumGet(pwi, 48)) << 16 | by := gh - A_GuiHeight - NumGet(pwi, 52)), g, gb + 4)
, NumPut(A_GuiWidth << 16 | A_GuiHeight, g, gb)
}
Else d := NumGet(g, gb + 4), bx := d >> 16, by := d & k
ControlGetPos, dx, dy, dw, dh, , ahk_id %i%
If cf = 1
{
Gui, %gn%:+LastFound
WinGetPos, , , gw, gh
d := NumGet(g, gb), dw -= gw - bx * 2 - (d >> 16), dh -= gh - by - bx - (d & k)
}
NumPut(i, c, cb), NumPut(dx - bx, c, cb + 4, "Short"), NumPut(dy - by, c, cb + 6, "Short")
, NumPut(dw, c, cb + 8, "Short"), NumPut(dh, c, cb + 10, "Short")
Return, true
}
[오토핫키스크립트] 장사 매크로 , 공부용, 해부용
f3:: ; f3 시작핫키
처음:
mouseclick,left,88,790,2
Gosub, 교환온거확인 ; 교환온거확인으로 서브루틴을 보냄
send, {up down}
sleep, 1000
send, {up up}
send, {enter down}
sleep, 1000
send, {enter up}
sleep, 2000
goto, 처음
return
※ 빨간색으로 칠해져있는부분은 채팅을 치는 부분입니다.
교환온거확인:
ImageSearch , mx,my, 1, 1, 1030, 800, *50 교환.bmp ; 교환이라는 이미지가보이면
if errorlevel = 0
{
mousemove,%mx%,%my% ; 교환 이미지를 클릭
sleep, 1000
send, {click down}
sleep, 600
send, {click up}
sleep, 1500
goto, 교환후할말 ; 교환후 할말로 서브루틴을 보냄
}
return
교환후할말:
Gosub, Speed ; Speed로 서브루틴을보냄
Mousemove,839,379
sleep, 500
send, {click down}
sleep, 500
send, {click up}
sleep, 1000
Gosub, 랜덤 ; 랜덤으로 서브루틴을보냄
return
Speed:
SetKeyDelay, 99 ; 키 딜레이를 최대한 느리게함
SetMouseDelay, 99 ; 마우스 딜레이를 최대한 느리게함
return
※ 이건 트릭스터전용이였어요 트릭스터는 최대한 느리게 설정했어야됐음 다른 게임은 다름..
랜덤:
Gosub, Speed ; Speed으로 서브루틴을보냄
Random,s,1,4 ; 랜덤명령어
if (s = 1)
sleep, 500
send, dkssudgktpdy ~ rottn 100ro dlgkaks dhffuwntpdy !
TrayTip, 기하프로그램 TrayTip, s1., ,1
sleep, 100
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
if (s = 2)
sleep, 500
send, gdgd qlttkfansmlxhrl 100ro dlgkaks dhffuwntpdy ~ ~
TrayTip, 기하프로그램 TrayTip, s2., ,1
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
if (s = 3)
sleep, 500
send, qkdrkqkdrk 100ro dlgkaks dhffuwntpdy ~
TrayTip, 기하프로그램 TrayTip, s3., ,1
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
if (s = 4)
sleep, 500
send, gkdlgkdl! 100ro dlgkaks dhffuwntpdua!
TrayTip, 기하프로그램 TrayTip, s4., ,1
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
return
토기무늬확인:
loop 200 {
TrayTip, 기하프로그램 TrayTip, 토기무늬확인을 시작합니다.%a_index%, ,1 ; %a_index%는 한번 지날때마다 숫자 +1씩 증가.
ImageSearch , GetX11, GetY21, 1, 1, A_ScreenWidth, A_ScreenHeight, *20 xhrl0.bmp ; 토기이미지를 찾음
if errorlevel=0
{
TrayTip, 기하프로그램 TrayTip, 토기무늬 발견 갯수를새러갑니다., ,1
goto, 토기갯수 ; 토기를 확인했고 이제 갯수를 새러감
}
}
goto, 교환취소
return
토기갯수:
loop,100 ; 이건 자기가 찎은 이미지 갯수를함 전 토기100개를 한개씩찍어서 100개의 이미지를 가지고있음
{
ImageSearch , 토기x, 토기y, 1, 1, 1100, 300, *50 xhrl%a_index%.bmp ;xhrl%a_index%는 이미지 이름이 xhrrl1~100임
TrayTip, 기하프로그램 TrayTip, xhrl%a_index%, ,1
if errorlevel=0
{
갯수토기=%a_index%
goto, 토기계산 ; 이제 토기계산하러감
}
}
goto, 교환취소
return
토기계산:
SplashImage,%구이%: , b1 x%토기x% y%토기y% w30 h30 CW000000 ; 토기이미지에 검은박스를 씌움
envadd,구이,1
토기겔더:=갯수토기*토기가격 ; :=는 뒤에 숫자들을 연산할때 쓰임
Gosub, Speed
sleep,2000
mousemove,878,135
send, {click down}
sleep, 800
send, {click up}
sleep, 1000
send, %토기겔더% down
sleep, 1500
mousemove,878,135
send, {click down}
sleep, 800
send, {click up}
goto, 준비완료
return
준비완료:
sleep, 1500
loop 200 {
ImageSearch , Get1, Ge21, 1, 1, 1030,800, *50 준비.bmp
if errorlevel = 0
{
mousemove,972,132
sleep, 500
send, {click down}
sleep, 400
send, {click up}
goto, 거래확인
}
}
goto, 교환취소
return
거래확인:
TrayTip, 기하프로그램 TrayTip, 거래확인으로 넘어옴., ,1
sleep, 1500
loop 400 {
TrayTip, 기하프로그램 TrayTip, 거래 확인 %a_index%., ,1
ImageSearch , kx, ky, 1, 1, 1030,800, *50 확인.bmp
if errorlevel = 0
{
Gosub, 스크린샷
TrayTip, 기하프로그램 TrayTip, 넘어옴., ,1
mousemove,%kx%,%ky%
sleep, 500
send, {click down}
sleep, 400
send, {click up}
Gosub, 지움
goto, 처음
}
}
goto, 교환취소
return
지움:
sleep, 1000
지움=1
loop,10
{
SplashImage,%지움%: Off
envadd,지움,1
}
구이=1
return
[오토핫키]acount , 카운트, 몇번실행했는지
카운트 숫자많을시
count1 / count2 / count3
이런식으로 구분 짓는게 팁
몇번햇는지 확인
<스크립트>
acount
return
f2::
msgbox,%acount%
return
[오토핫키스크립트] 자동종료스크립트 , 공부용, 해부용,
Gui Add, Button, x6 y3 w70 h50 -Wrap gBtnow, 즉시 실행
Gui Add, Edit, x86 y3 w30 h20 Right vEdMin
Gui Add, Button, x116 y3 w90 h20 +Right -Wrap gBtMin, 분 후에 실행
Gui Add, Edit, x86 y33 w30 h20 Right vEdHr
Gui Add, Button, x116 y33 w90 h20 +Right -Wrap gBtHr, 시간 후에 실행
Gui Show
Return
GuiClose:
MsgBox 작업이 취소되었습니다!!!
ExitApp
Btnow:
Gosub sDown
Return
BtMin:
Gui Submit
MsgBox %EdMin% 분 후에 시스템이 종료됩니다!!!
stPeriod := EdMin * 60 * 1000 ;분을 밀리초로 환산
SetTimer sDown, -%stPeriod%
Return
BtHr:
Gui Submit
MsgBox %EdHr% 시간 후에 시스템이 종료됩니다!!!
stPeriod := EdHr * 60 * 60 * 1000 ;분을 밀리초로 환산
SetTimer sDown, -%stPeriod%
Return
sDown:
FormatTime TimeString, , Time
FileAppend `n%TimeString% 에 종료되었습니다., 시스템 종료 시각.txt
Sleep 1000
Shutdown 1 ;시스템 종료
ExitApp
[오토핫키] 가위바위보스크립트, 공부용, 해부용
F1::
win = 0 ; 승리 횟수 저장변수
lose = 0 ; 패배 횟수 저장변수
draw = 0 ; 무승부 횟수 저장변수
Loop 3
{ ; 블록{ }을 이용해서 작업 내용을 지정합니다.
InputBox, User1, 가위바위보 게임, 어떤 손을 내실 건가요?`n(가위/바위/보) `n게임을 끝내실려면 "그만"을 입력하세요., , 300, 200, , , , ,가위
Random, User2, 1, 3
if User1 = 가위
{
if User2 = 1
{
draw := draw + 1
MsgBox 비겼습니다.
}
else if User2 = 2
{
MsgBox 졌습니다.
lose := lose + 1
}
else if User2 = 3
{
MsgBox 이겼습니다.
win := win + 1
}
}
else if User1 = 바위
{
if User2 = 2
{
MsgBox 비겼습니다.
draw := draw + 1
}
else if User2 = 3
{
MsgBox 졌습니다.
lose := lose + 1
}
else if User2 = 1
{
MsgBox 이겼습니다.
win := win + 1
}
}
else if User1 = 보
{
if User2 = 3
{
MsgBox 비겼습니다.
draw := draw + 1
}
else if User2 = 1
{
MsgBox 졌습니다.
lose := lose + 1
}
else if User2 = 2
{
MsgBox 이겼습니다.
win := win + 1
}
}
else if User1 = 그만 ;"그만" 을 입력하면 Break를 실행하여 루프를 중지 시킵니다.
Break
else
MsgBox 잘못 입력 하셨습니다.
}
MsgBox 당신의 전적은 `n%Win% 승, %lose% 패, %draw% 무 입니다.
f2::
exitapp
win = 0 ; 승리 횟수 저장변수
lose = 0 ; 패배 횟수 저장변수
draw = 0 ; 무승부 횟수 저장변수
Loop 3
{ ; 블록{ }을 이용해서 작업 내용을 지정합니다.
InputBox, User1, 가위바위보 게임, 어떤 손을 내실 건가요?`n(가위/바위/보) `n게임을 끝내실려면 "그만"을 입력하세요., , 300, 200, , , , ,가위
Random, User2, 1, 3
if User1 = 가위
{
if User2 = 1
{
draw := draw + 1
MsgBox 비겼습니다.
}
else if User2 = 2
{
MsgBox 졌습니다.
lose := lose + 1
}
else if User2 = 3
{
MsgBox 이겼습니다.
win := win + 1
}
}
else if User1 = 바위
{
if User2 = 2
{
MsgBox 비겼습니다.
draw := draw + 1
}
else if User2 = 3
{
MsgBox 졌습니다.
lose := lose + 1
}
else if User2 = 1
{
MsgBox 이겼습니다.
win := win + 1
}
}
else if User1 = 보
{
if User2 = 3
{
MsgBox 비겼습니다.
draw := draw + 1
}
else if User2 = 1
{
MsgBox 졌습니다.
lose := lose + 1
}
else if User2 = 2
{
MsgBox 이겼습니다.
win := win + 1
}
}
else if User1 = 그만 ;"그만" 을 입력하면 Break를 실행하여 루프를 중지 시킵니다.
Break
else
MsgBox 잘못 입력 하셨습니다.
}
MsgBox 당신의 전적은 `n%Win% 승, %lose% 패, %draw% 무 입니다.
f2::
exitapp
피드 구독하기:
글 (Atom)