Ys TOOLs C
nokori day 0.1.0

・始めに
このTOOLは指定した日まであと何日か表示するTOOLです

・作成の動機
このTOOLはHSPプロコンの締切まで残り何日か手軽に調べられたらなあ
と思って作成しました
今年か来年までの日時までしか調べられないのは逃げです(笑)

・使い方
何月input boxと何日input boxに調べ始めの日を記入して
(デフォルトは現在の日時です)
今年の日時までを調べたいなら「今年」ボタンを押して
来年の日時までを調べたいなら「来年」ボタンを押して
今月の日時までを調べたいなら「今月」ボタンを押して
来月の日時までを調べたいなら「来月」ボタンを押して
指定の月までの日時を調べたいなら「指定」ボタンを押して
指定input boxに調べたい月を入力して
何日までinput boxに調べたい日を入力して
「実行」ボタンを押すと 残り日数がダイアログに表示されます

・今後
文字が小さいので大きくしたいですね(タブレットで使ってるので)

・謝辞
このTOOLではさくらさんのサイトのサンプルスクリプトを参考にして書きました。感謝です
その部分についての著作権はさくら様に所属します
僕がライセンスを指定するのは出来かねますので
再配布は控えてください
3行目~

	md_this=0,31,28,31,30,31,30,31,31,30,31,30,31,0,0,0~
	nyear=gettime(0)~
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {~
		md_this(1) = 29~
		logmes ""+gettime(0)+"は閏年"~
	}~
	md_next=0,31,28,31,30,31,30,31,31,30,31,30,31,0,0,0~
	nyear=gettime(0)+1~
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {~
		md_next(1) = 29~
		logmes ""+(gettime(0)+1)+"は閏年"~
	}~
	nyear=gettime(0)+2~
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {~
		logmes ""+(gettime(0)+2)+"は閏年"~
	}~
	nyear=gettime(0)+3~
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {~
		logmes ""+(gettime(0)+3)+"は閏年"~
	}~

~22行目まで

作成:高畑ラボ(Y_repeat)

・連絡先
バグなどありましたらご報告ください
また改造後再配布時配布URLを教えていただけると嬉しいです
y.tack2010@gmail.com

  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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
// このTOOLではさくらさんのサイトのサンプルスクリプトを参考にして書きました。感謝です
// ここから
md_this=0,31,28,31,30,31,30,31,31,30,31,30,31,0,0,0
	nyear=gettime(0)
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {
		md_this(1) = 29
		logmes ""+gettime(0)+"は閏年"
	}
	md_next=0,31,28,31,30,31,30,31,31,30,31,30,31,0,0,0
	nyear=gettime(0)+1
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {
		md_next(1) = 29
		logmes ""+(gettime(0)+1)+"は閏年"
	}
	nyear=gettime(0)+2
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {
		logmes ""+(gettime(0)+2)+"は閏年"
	}
	nyear=gettime(0)+3
	if (((nyear\4=0)&(nyear\100!0))|(nyear\400=0)) {
		logmes ""+(gettime(0)+3)+"は閏年"
	}
// ここまで
screen 0,170,400
cls 1
mes "現在 "+gettime(0)+"年 "+gettime(1)+"月 "+gettime(3)+"日"
mes "\n"+gettime(0)+"年"
cur_year=gettime(0)
;input cur_year,100,20
;ID4cur_year=stat
mes "何月"
cur_month=gettime(1)
input cur_month,100,20
ID4cur_month=stat
mes "何日から?"
cur_day=gettime(3)
input cur_day,100,20
ID4cur_day=stat
mes "\n"
sel_bt_0=1
button "→今年",*sel_this_year
ID4bt_0_A=stat
button "来年",*sel_next_year
ID4bt_0_B=stat
sel_bt=1
button "→今月",*sel_this
ID4bt_A=stat
button "来月",*sel_next
ID4bt_B=stat
button "指定",*sel_bt_C
ID4bt_C=stat
cur_that_month=gettime(1)
input cur_that_month,100,20
ID4cur_that_month=stat
mes "何日まで?"
target_day=md_this.cur_month
input target_day,100,20
ID4target_day=stat
button "実行",*_do
;button "main",*l_exec_A
stop
*sel_this_year
	sel_bt_0=1
	objprm ID4bt_0_A,"→今年"
	objprm ID4bt_0_B,"来年"
	stop
*sel_next_year
	sel_bt_0=2
	objprm ID4bt_0_A,"今年"
	objprm ID4bt_0_B,"→来年"
	sel_bt=3
	objprm ID4bt_A,"今月"
	objprm ID4bt_B,"来月"
	objprm ID4bt_C,"→指定"
	stop
*sel_this
	sel_bt_0=1
	objprm ID4bt_0_A,"→今年"
	objprm ID4bt_0_B,"来年"
	sel_bt=1
	objprm ID4bt_A,"→今月"
	objprm ID4bt_B,"来月
	objprm ID4bt_C,"指定
	stop"
*sel_next
	sel_bt_0=1
	objprm ID4bt_0_A,"→今年"
	objprm ID4bt_0_B,"来年"
	sel_bt=2
	objprm ID4bt_A,"今月"
	objprm ID4bt_B,"→来月
	objprm ID4bt_C,"指定
	stop"
*sel_bt_C
	sel_bt=3
	objprm ID4bt_A,"今月"
	objprm ID4bt_B,"来月"
	objprm ID4bt_C,"→指定"
	stop
*_do
	bar_day=md_this.cur_month-cur_day
	logmes str(bar_day)
	bar_day_next=md_this(cur_month+1)-cur_day
	logmes str(bar_day_next)
	if sel_bt_0==2{	goto *l_tochuu }
	if sel_bt==1{
		if cur_day>target_day{
			dialog "その日は終わっちゃったね",0
			stop
		}else{
			if cur_day==target_day{
				dialog "今日が当日だ!",0
				stop
			}else{
				dialog "残り"+str(target_day-cur_day+1)+"日。頑張れ!",0
				stop
			}
		}
	}
	if sel_bt==2{
		tmp_day=md_this.cur_month
		tmp_day_b=tmp_day-cur_day+target_day+1
		dialog "残り"+str(tmp_day_b)+"日。頑張れ!",0
		stop
	}
	if sel_bt==3{
		if cur_month+1==cur_that_month{
			tmp_day=md_this.cur_month
			tmp_day_b=tmp_day-cur_day+target_day+1
			dialog "残り"+str(tmp_day_b)+"日。頑張れ!",0
			stop
		}
		if cur_month==cur_that_month{
			if cur_day>target_day{
				dialog "その日は終わっちゃったね",0
				stop
			}
			if cur_day==target_day{
				dialog "今日が当日だ!",0
				stop
			}else{
				dialog "残り"+str(target_day-cur_day+1)+"日。頑張れ!",0
				stop
			}
		}
		if cur_month>cur_that_month{
			dialog "その月は終わっちゃったね",0
			stop
		}
*l_tochuu
		bar_day=md_this.cur_month-cur_day
		baz_A=1:baz_B=2:is_baz_B=0:if sel_bt_0==2:is_baz_B=1
		baz=1
		logmes "通過A"
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=2
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=3
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=4
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}		
		}
		baz=5
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}		
		}
		baz=6
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}		
		}
		baz=7
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=8
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=9
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=10
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		baz=11
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}		
		}
		baz=12
		if (cur_month<=baz){	
			if (is_baz_B==1){		bar_day+=md_this(baz)		
			}else{		if (cur_that_month>=baz+2){	bar_day+=md_this(baz)	}	}	
		}
		if is_baz_B==0{
			tmp_day=md_this.cur_month
			tmp_day_b=tmp_day-cur_day+target_day
			dialog "残り"+str(bar_day+tmp_day)+"日。頑張れ!",0
			stop
		}
		if (is_baz_B==1){
			logmes "通過A"	
			baz=1
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=2
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=3
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=4
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=5
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=6
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=7
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=8
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=9
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=10
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=11
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			baz=12
			if (cur_that_month>=baz+2){		bar_day+=md_next(baz)		}
			tmp_day=md_next.cur_month
			tmp_day_b=tmp_day-cur_day+target_day
			dialog "残り"+str(bar_day+tmp_day)+"日。頑張れ!",0
			stop
		}
	}
 
	stop
*l_exec_A
	exec "Ys_many_Timmer.exe"
	stop

添付ファイル: fileYs_C07 nokori_day wiki.zip 14件 [詳細]