toolFunction


  OpenFileName,OpenFileName2,OpenFileName3



  
REM ******************************************************
REM ファイル選択
REM baseFunction が必要です
REM ******************************************************
Function OpenFileName( )

	Call GetObj( "IEDocument", "InternetExplorer.Application" )
	IEDocument.Navigate( "about:blank" )
	IEDocument.document.getElementsByTagName("BODY")(0).innerHTML = "<INPUT id=FilePath type=file>"
REM	IEDocument.Visible = True
REM	IEDocument.document.parentWindow.focus
REM	IEDocument.Visible = False
	IEDocument.document.getElementById("FilePath").click
	if IEDocument.document.getElementById("FilePath").value = "" then
		OpenFileName = ""
		Exit Function
	end if

	OpenFileName = IEDocument.document.getElementById("FilePath").value

	IEDocument.Quit
	Set IEDocument = Nothing

End Function
Function OpenFileName2( )

	if GetOSVersion > 5 then
		Call GetObj("CommonDialog", "UserAccounts.CommonDialog" )

		CommonDialog.Filter = "全て|*.*"
		if CommonDialog.ShowOpen <> 0 then
			OpenFileName2 = CommonDialog.FileName
		else
			OpenFileName2 = ""
		end if
	else
		OpenFileName2 = OpenFileName
	end if

End Function

Function OpenFileName3( )

	Dim strDownloadPlace,str

	strDownloadPlace = "http://homepage2.nifty.com/lightbox/OpenFileName.exe"
	ret = HTTPDownload( strDownloadPlace, TempDir & "\OpenFileName.exe" )
	if not ret then
		GetWshShell
		Call WshShell.Popup("OpenFileName.exe のダウンロードに失敗しました", 5 )
		Exit Function
	end if

	RunSync( Dd(TempDir & "\OpenFileName.exe") )

	str = GetTextFile( TempDir & "\OpenFileName.result" )

	OpenFileName3 = Split(str,vbCrLf)


End Function
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ