#include "hspext.as" gsel 0,-1 str name : str startup : str location name="timecard.lnk" ;ショートカットファイルの名前 location=curdir ;カレンドディレクトリの位置を記憶 fxdir startup,7 ;スタートアップフォルダの位置を取得 chdir startup ;スタートアップフォルダに操作を移動 exist name ;スタートアップフォルダにショートカットがあるかどう調べる if strsize=-1 : goto *add ;なかったら、登録プログラムへジャンプ dialog "スタートアップにあるショートカットを削除します。\nよろしいですか?",2 if stat=7 : end ;いいえを選択されていたら終了 delete name ;消す wait 10 dialog "ショートカットを削除しました",0 end *add dialog "スタートアップに登録します。\nよろしいですか?",2 if stat=7 : end name="timecard" location+="\\timecard.exe" fxlink name,location wait 10 if stat=0 : dialog "スタートアップに登録しました",0 : else : dialog "登録に失敗しました",0 end