' カーソル位置のファイルを開くマクロ by itam proc main if @hwnd=0 then end dim fname$, pname$, f$ if @Select then pname$=@TextSelect$ fname$=right$(pname$, len(pname$)-inrstr(pname$, "\")) else pname$=@GetCursorWord2$(":\/.") fname$=@GetCursorWord2$(".") end if f$=dir$(pname$) if lcase$(f$)<>lcase$(fname$) then dim t$ t$=searchfile$(fname$) if t$="" then print "このファイルは存在しません。" if inrstr(pname$, "\")=0 then pname$=curdir$()+"\"+pname$ dim r, mes$ mes$=cformat$("%s%s%sこのファイルは存在しません。%s"+ \ "このファイルを開きますか?", \ pname$, chr$(13), chr$(13), chr$(13)) r=msgbox(mes$, MB_YESNO+MB_ICONQUESTION, \ "カーソル位置のファイルを開く by itam") if r=IDNO then end @FileNew call @SaveAs(pname$) else pname$=t$ end if end if call @@OpenFile(pname$) end proc