예지력
W
예지력

블로그 메뉴

  • 문의 & 피드백
  • GitHub
  • 분류 전체보기
    • 주식
    • 파생상품
    • crypto
      • 차트에 현대미술
      • 복기
      • 시스템 트레이딩
      • 기술적 분석
      • 블록체인
      • 생각
      • 리서치
      • Token Engineering
    • 이더리움 | ETH
      • 리서치
    • 테라 | LUNA
      • Tefi
      • 루나 LUNA
      • 아스트로포트 Astro
      • 앵커 프로토콜 ANC
      • 미러 프로토콜 MIR
      • 아폴로 다오 APOLLO
      • 프리즘 프로토콜 PRISM
      • 넥서스 프로토콜 NEXUS
      • 레바나 프로토콜 LEV
      • 마스 프로토콜 MARS
      • 더비 스타즈 Derby Stars
    • 프로그래밍
      • AHK 메뉴얼
      • AHK 레퍼런스
      • Delphi XE7
      • C
      • Python
      • Reversing
      • Archive
    • 일상
    • 영화
    • 낙서장
    • Deprecated
      • 로다 플레이어
      • 어의

인기 글

최근 댓글

전체 방문자
오늘
어제

티스토리

hELLO · Designed By 정상우.
예지력

W

PleasantNotify 미려한 팝업메시지
프로그래밍/Archive

PleasantNotify 미려한 팝업메시지

2015. 1. 22. 15:05

Language : AutoHotkey_L 32bit v1.1.19.1

Author : 예지력(knowledgeisfree.tistory.com), AHK.org 포럼아이디 Soft

Source : http://ahkscript.org/boards/viewtopic.php?f=6&t=6056

Reference : based on CornerNotify

 

/*
CleanNotify by 예지력 (http://knowledgeisfree.tistory.com)
 
// Syntax
 
new CleanNotify("타이틀", "텍스트 " , 넓이, 길이, "포지션", 시간)
 
시간을 "P" 로 설정할 경우, 오브젝트를 파기하기 전까지 계속 존재합니다
 
인스턴스.Delete()
→ 오브젝트 제거
*/

 
#SingleInstance force
#NoEnv
SetBatchLines, -1
 
new CleanNotify("CleanNotify", "포지션 vc hc, 3초" , 600, 210, "vc hc", 6)
new CleanNotify("CleanNotify", "포지션 t hc" , 600, 210, "t hc", 3)
new CleanNotify("CleanNotify", "포지션 b hc" , 600, 210, "b hc", 3)
new CleanNotify("CleanNotify", "포지션 기본, b r" , 600, 210, "b r", 3)
new CleanNotify("CleanNotify", "포지션 b l" , 600, 210, "b l", 3)
new CleanNotify("CleanNotify", "포지션 t l" , 600, 210, "t l", 3)
return
 
class CleanNotify {
 
__New(Title, Msg, pnW := "700", pnH := "300", Pos := "b r", Time := "10")
{
 
Critical
 
LastFound := WinExist()
Gui, new, +hwndhNotify -DPIScale
this.hNotify := hNotify
 
Gui, % this.hNotify ": Default"
Gui, % this.hNotify ": +AlwaysOnTop +ToolWindow -SysMenu -Caption +LastFound"
WinSet, ExStyle, +0x20
WinSet, Transparent, 0
 
Gui, % this.hNotify ": Color", 0xF2F2F0
Gui, % this.hNotify ": Font", c0x07D82F s18 wBold, Segoe UI
Gui, % this.hNotify ": Add", Text, % " x" 20 " y" 12 " w" pnW-20 " hwndhTitle", % Title
this.hTitle := hTitle
 
Gui, % this.hNotify ": Font", cBlack s15 wRegular
Gui, % this.hNotify ": Add", Text, % " x" 20 " y" 56 " w" pnW-20 " h" pnH-56 " hwndhMsg", % Msg
this.hMsg := hMsg
Gui, % this.hNotify ": Show", % "W " pnW + 50 " H" pnH + 20 " NoActivate"
 
this.WinMove(this.hNotify, Pos)
WinSet, Region,0-0 w%pnW% h%pnH% R40-40, % "ahk_id " this.hNotify
Critical Off
this.winfade("ahk_id " this.hNotify, 210, 5)
 
if (Time != "P")
this.Timer(ObjBindMethod(this, "TimerExpired"), Time * 1000)
 
if (WinExist(LastFound))
Gui, % LastFound ": Default"
}
 
__Delete()
{
this.Destroy()
}
 
Destroy()
{
this.winfade("ahk_id " this.hNotify, 0, 5)
Gui, Destroy
}
 
Timer(Fir, Sec)
{
SetTimer, % Fir, % "-" Sec
}
 
TimerExpired()
{
this.Destroy()
}
 
WinMove(hwnd,position)
{
SysGet, Mon, MonitorWorkArea
WinGetPos,ix,iy,w,h, ahk_id %hwnd%
x := InStr(position,"l") ? MonLeft : InStr(position,"hc") ? (MonRight-w)/2 : InStr(position,"r") ? MonRight - w : ix
y := InStr(position,"t") ? MonTop : InStr(position,"vc") ? (MonBottom-h)/2 : InStr(position,"b") ? MonBottom - h : iy
WinMove, ahk_id %hwnd%,, x, y
}
 
winfade(w:="",t:=128,i:=1,d:=10) ; Thanks, Joedf
{
w:=(w="")?("ahk_id " WinActive("A")):w
t:=(t>255)?255:(t<0)?0:t
WinGet,s,Transparent,%w%
s:=(s="")?255:s ;prevent trans unset bug
WinSet,Transparent,%s%,%w%
i:=(s<t)?abs(i):-1*abs(i)
while(k:=(i<0)?(s>t):(s<t)&&WinExist(w)) {
WinGet,s,Transparent,%w%
s+=i
WinSet,Transparent,%s%,%w%
sleep %d%
}
}
}

728x90
저작자표시 비영리 동일조건

'프로그래밍 > Archive' 카테고리의 다른 글

Scrollable image list  (0) 2015.01.23
SetHoverText - Change control's text on mouseover  (0) 2015.01.23
오토핫키 (.ahk) 유니코드 인코딩 변환기!  (0) 2015.01.09
USkin.dll and .msstyles  (0) 2015.01.08
Official release  (0) 2014.12.28
    '프로그래밍/Archive' 카테고리의 다른 글
    • Scrollable image list
    • SetHoverText - Change control's text on mouseover
    • 오토핫키 (.ahk) 유니코드 인코딩 변환기!
    • USkin.dll and .msstyles
    예지력
    예지력

    티스토리툴바