私のプログラムは、後で予定されているイベント (会議/特別なランチ イベント/レポートの提出/請求書の支払い/誕生日など) をユーザーに尋ね、時間になるとユーザーに通知します。
これが私のコードです:
Dim remind
re=MsgBox("Do you want me to remind you anything later on?", vbYesNo, "Reminder")
If re=6 then call main
Sub main
' Ask for the time that the user wanted to be reminded
remind=InputBox("At what time?" & vbNewLine &
"Please use this format {H:MM:SS AM/PM}" & vbNewLine &
"Note: H is in 12h format")
' Description eg. "Lunch with boss"
reminder=InputBox("Any discription you want to add in?")
Do Until check=remind
check=Time
If check=remind Then MsgBox reminder
Loop
End Sub
たとえば、 と を入れ12:30:00 PM
ますLunch with boss
。その時が来ても何も起こらず、ポップアップもありません。そして、タスクマネージャーを確認すると、まだ実行中です。
このスクリプトを実行するために wscript.exe を使用しています。do until check=remind
動かない部分です。私が入れればdo until check="12:30:00 PM"
、それはうまくいきます。
PS: Microsoft Outlook をリマインダーに使用したり、電話を使用したりできることはわかっています。しかし、これは 24 時間コンピュータの前にいて、電話を使用して見通しを更新するのが面倒な従業員に適しています。