おはようございます。
時計(背景画像の右下に時計表示)を作って、その左側にボタンを作っています。
ボタンを押すと、時計が止まってしまいます・・・。
お聞きしたいと思って、ソースを見易くしていたら、現在日付も消えてしまったみたいです・・・。
なやんでいたら朝になってしまいました・・・。(TT)
何度ももうしわけありません。よろしくお願いいたします。(TT)
#include "hsp3util.as" ; getdatestr(日付),gettimestr(時間)を使えるようになる
screen 0,320,80 ; 画面サイズ指定
picload "tokei.jpg" ; 背景
font msgothic,18,1 ; 文字サイズを指定(フォント名・文字サイズ・太文字など)
t1="":t2=""
;----------------------------------------------------------------------------
;(選択ボタン)
objsize 100,26
pos 40,40
button " ボタン1",*popo1
button " ボタン2",*popo2
button " ボタン3",*popo3
button " ボタン4",*popo4
newcom objVBsc, "ScriptControl"
objVBsc("Language")="VBScript"
goto *tmprt
;----------------------------------------------------------------------------
;(ボタン1)
*popo1
onexit *owari
dispx=ginfo_dispx
dispy=ginfo_dispy
screen 1,dispx,dispy,0,(dispx-400)/2,(dispy-300)/2,400,300 ;真ん中に表示
color 0,0,255 :boxf
width 400,300
gsel 1,2
stop
;----------------------------------------------------------------------------
;(ボタン2)
*popo2
onexit *owari
dispx=ginfo_dispx
dispy=ginfo_dispy
screen 1,dispx,dispy,0,(dispx-400)/2,(dispy-300)/2,400,300 ;真ん中に表示
color 0,0,255 :boxf
width 400,300
gsel 1,2
stop
;----------------------------------------------------------------------------
;(ボタン3)
*popo3
onexit *owari
dispx=ginfo_dispx
dispy=ginfo_dispy
screen 1,dispx,dispy,0,(dispx-400)/2,(dispy-300)/2,400,300 ;真ん中に表示
color 0,0,255 :boxf
width 400,300
gsel 1,2
stop
;----------------------------------------------------------------------------
;(ボタン4)
*popo4
onexit *owari
dispx=ginfo_dispx
dispy=ginfo_dispy
screen 1,dispx,dispy,0,(dispx-400)/2,(dispy-300)/2,400,300 ;真ん中に表示
color 0,0,255 :boxf
width 400,300
gsel 1,2
stop
;----------------------------------------------------------------------------
*owari ;screen 1以降の右上のX処理
actwin=ginfo_act
if actwin{gsel actwin,-1: stop}
end
;----------------------------------------------------------------------------
; 時計表示のメイン
*tmprt
getdatestr t1 ; 日付を取得
gettimestr t2 ; 時刻を取得
redraw 0
color 255 ; 時計を表示するボックスの色(255で赤色)
boxf 130,150,300,225 ;(左上Ⅹ座標・左上Y座標・右下Ⅹ座標・右下Y座標)
color 0,0,0 ; 時刻の文字色
pos 175,170:mes t1 ; 時刻を表示
pos 175,195:mes t2 ; 日付を表示
redraw 1
wait 100 ; 1秒ウエイトする
goto *tmprt ; 無限ループ