This repository was archived by the owner on Mar 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch.as
More file actions
executable file
·122 lines (106 loc) · 2.45 KB
/
launch.as
File metadata and controls
executable file
·122 lines (106 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
;ちょくと様の『HSPの裏技??』(http://yokohama.cool.ne.jp/chokuto/) より、サンプルコード等を頂いております。
#include "llmod.as"
#include "apierr.as"
#include "doubleexe.as"
#include "hsgetmsg.as"
#include "menu.as"
#include "trayicon.as"
screen 0,280,150
;screen 1,280,160,1
;width 280,150
cls 1
title "新月 ランチャー"
onexit *q_stop
GetDoubleExe ;二重起動防止
if stat {
dialog "すでに起動しています。"
end
}
chdir "launch"
exec "WScript start-shingetsu.vbs",1
;exec "mount-shingetsu.bat",1
;exec "start-shingetsu.bat",1
*mainloop
get_message
if msgval {
if msg == WM_COMMAND {
gosub *lb_on_command
} else if msg == MYWM_TRAYICON {
gosub *lb_tray
}
} else {
wait 10
}
goto *mainloop
*lb_on_command
; メニュー以外から送られた場合は何もしない
if lprm != 0 : return
; 選択されたメニューアイテムID
itemid = wprm & $FFFF
if itemid == CMD_OPENBBS1 {
exec "http://localhost:8000",16
}
;if itemid == CMD_OPENBBS2 {
; exec "http://localhost:8000",16
;}
if itemid == CMD_MINI {
gsel 0, -1
}
if itemid == CMD_QUIT {
;mes ""
;mes " 終了作業中です。"
;exec "Wscript stop-shingetsu.vbs",1
;exec "stop-shingetsu.bat",1
;gosub *lb_quit
;end
goto *q_stop
}
;if itemid == CMD_MESSAGE {
; dialog "メニュー作成のテストです", 0, "メッセージ表示"
;}
return
*lb_tray
; タスクトレイからメッセージが送られた場合の処理
; wParam パラメータはタスクトレイのアイコンID
; lParam パラメータはマウスメッセージ(WM_LBUTTONDOWNなど)
if lprm == 0x0202 { ; WM_LBUTTONUP
gsel 0, 1
}
if lprm == 0x0205 { ; WM_RBUTTONUP
gsel 0, -1
}
return
*lb_quit
; 終了時の処理(トレイアイコンの削除、アイコンの破棄)
; NOTIFYICONDATA 構造体(cbSize, uID のみセット)
dim nid, 22
nid.0 = 88 ; 構造体サイズ(=88)
nid.1 = hwnd ; ウィンドウハンドル
nid.2 = 1 ; アイコンID(1に固定)
; タスクトレイからアイコンを削除
pm.0 = 2 ; NIM_DELETE
getptr pm.1, nid ; NOTIFYICONDATA 構造体アドレス
dllproc "Shell_NotifyIconA", pm, 2, D_SHELL
; アイコンの破棄
dllproc "DestroyIcon", hicon, 1, D_USER
return
;end
*gotray
gsel 0, -1
wait 10
goto *mainloop
*q_stop
dialog "新月を終了しますか?", 2, "新月 ランチャー"
if stat == 6 {
exec "Wscript stop-shingetsu.vbs",1
gosub *lb_quit
;goto *lb_quit
end
} else {
goto *mainloop
}
;*stopshingetsu
; screen 2,140,75
; cls 1
; mes " 終了作業中です。"
end