SQLの窓用ツールメニュー

  99【BHelp】 php.ini の表示.mnu



  
@WSFEXEC
$NORESULT
<JOB>
<COMMENT>
************************************************************
 オブジェクト定義
************************************************************
</COMMENT>
<OBJECT id="Lbox" progid="Lbox.BatchHelper" />
<OBJECT id="Fs" progid="Lbox.Fsystem" />
<OBJECT id="Database" progid="Lbox.Database" />
<OBJECT id="Ftp" progid="Lbox.Ftp" />
<OBJECT id="Outer" progid="Lbox.OuterDll" />
<OBJECT id="Prt" progid="Lbox.Prt" />
<OBJECT id="Window" progid="Lbox.Window" />
<OBJECT id="Wnet" progid="Lbox.Wnet" />

<OBJECT id="WshShell" progid="WScript.Shell" />
<OBJECT id="Fso" progid="Scripting.FileSystemObject" />

<SCRIPT language=VBScript>
' **********************************************
' php.ini のパスを取得
' **********************************************
strDir = Lbox.WindowsDirectory
strDir = Lbox.AddBackslash( strDir )
strDir = strDir & "php.ini"

' **********************************************
' 存在チェック
' **********************************************
if not Fs.IsFileExist( strDir ) then
	Lbox.MsgOk( strDir & " は存在しません" )
	WScript.Quit
end if

' **********************************************
' 開く
' **********************************************
strEditor = Lbox.Enclose( "notepad.exe", """" )
strRun = strEditor & " " & Lbox.Enclose( strDir, """" )
WshShell.Run( strRun )

</SCRIPT>
</JOB>
  

notepad.exe を普段使用しているエディタへのパスに変更します



  99【BHelp】 php.ini の重要なエントリ編集.mnu



  
@WSFEXEC
$NORESULT
<JOB>
<COMMENT>
************************************************************
 オブジェクト定義
************************************************************
</COMMENT>
<OBJECT id="Lbox" progid="Lbox.BatchHelper" />
<OBJECT id="Fs" progid="Lbox.Fsystem" />
<OBJECT id="Database" progid="Lbox.Database" />
<OBJECT id="Ftp" progid="Lbox.Ftp" />
<OBJECT id="Outer" progid="Lbox.OuterDll" />
<OBJECT id="Prt" progid="Lbox.Prt" />
<OBJECT id="Window" progid="Lbox.Window" />
<OBJECT id="Wnet" progid="Lbox.Wnet" />

<OBJECT id="WshShell" progid="WScript.Shell" />
<OBJECT id="Fso" progid="Scripting.FileSystemObject" />

<SCRIPT language=VBScript>
' **********************************************
' php.ini のパスを取得
' **********************************************
strDir = Lbox.WindowsDirectory
strDir = Lbox.AddBackslash( strDir )
strDir = strDir & "php.ini"

' **********************************************
' 存在チェック
' **********************************************
if not Fs.IsFileExist( strDir ) then
	Lbox.MsgOk( strDir & " は存在しません" )
	WScript.Quit
end if

' **********************************************
' エントリ取得
' **********************************************
extension_dir = Fs.GetInifileString( "PHP", "extension_dir", strDir )
register_globals = Fs.GetInifileString( "PHP", "register_globals", strDir )
force_redirect = Fs.GetInifileString( "PHP", "cgi.force_redirect", strDir )
include_path = Fs.GetInifileString( "PHP", "include_path", strDir )

' **********************************************
' GUI 設定
' **********************************************
Entry = ""
Entry = Entry & "1|extension_dir|" & extension_dir
Entry = Entry & ",2|register_globals|" & register_globals
Entry = Entry & ",3|cgi.force_redirect|" & force_redirect
Entry = Entry & ",4|include_path|" & include_path

' **********************************************
' GUI 呼び出し
' **********************************************
Ret = Lbox.GetTextList( "php.ini の重要なエントリ編集", Entry )
if Ret = "" then
	WScript.Quit
end if

' **********************************************
' 結果取得
' **********************************************
aRet = Split( Ret, vbTab )
aRet(0) = Lbox.Enclose( aRet(0), """" )
aRet(3) = Lbox.Enclose( aRet(3), """" )

' **********************************************
' 更新
' **********************************************
Call Fs.SetInifileString( "PHP", "extension_dir", aRet(0), strDir ) 
Call Fs.SetInifileString( "PHP", "register_globals", aRet(1), strDir ) 
Call Fs.SetInifileString( "PHP", "cgi.force_redirect", aRet(2), strDir ) 
Call Fs.SetInifileString( "PHP", "include_path", aRet(3), strDir ) 

</SCRIPT>
</JOB>
  



  99【BHelp】 テキストファイル内の文字列検索.mnu

  
@WSFEXEC
$NORESULT
<JOB>
<OBJECT id="Lbox" progid="Lbox.BatchHelper" />
<OBJECT id="Fs" progid="Lbox.Fsystem" />
<OBJECT id="Database" progid="Lbox.Database" />
<OBJECT id="Ftp" progid="Lbox.Ftp" />
<OBJECT id="Outer" progid="Lbox.OuterDll" />
<OBJECT id="Prt" progid="Lbox.Prt" />
<OBJECT id="Window" progid="Lbox.Window" />
<OBJECT id="Wnet" progid="Lbox.Wnet" />

<OBJECT id="Fso" progid="Scripting.FileSystemObject" />

<SCRIPT language="VBScript" src="Tool\script\vbslib\common.vbs">
</SCRIPT>
<SCRIPT language=VBScript>

Dim Buff()
Dim strFolder
Dim obj,objSub,i,nCnt,j,nRow
Dim Flist
Dim aList
Dim TextFile
Dim strLine,strList
Dim strEntry,aEntry

InitBuff

' **********************************************
' 検索条件設定
' **********************************************
strEntry = ""
strEntry = strEntry &  "1|検索するディレクトリ|" & Fs.GetInifileString( "SearchString", "SearchPath" )
strEntry = strEntry & ",2|ワイルドカード|" & Fs.GetInifileString( "SearchString", "WildCard" )
strEntry = strEntry & ",3|検索する文字列|" & Fs.GetInifileString( "SearchString", "TargetString" )

strEntry = Lbox.GetTextList( "検索条件を指定して下さい", strEntry )
if strEntry = "" then
	Wscript.Quit
end if
aEntry = Split( strEntry, vbTab )
if Trim(aEntry(0)) = "" then
	Lbox.MsgOk( "検索対象ディレクトリが指定されていません" )
	Wscript.Quit
end if
strFolder = aEntry(0)

if Trim(aEntry(1)) = "" then
	aEntry(1) = "*.*"
end if

if Trim(aEntry(2)) = "" then
	Lbox.MsgOk( "検索対象文字列が指定されていません" )
	Wscript.Quit
end if

Call Fs.SetInifileString( "SearchString", "SearchPath", strFolder )
Call Fs.SetInifileString( "SearchString", "WildCard", aEntry(1) )
Call Fs.SetInifileString( "SearchString", "TargetString", aEntry(2) )

Buff(Ubound(Buff)) = strFolder

' **********************************************
' SQLの窓の操作
' **********************************************
hWnd = $HWND
Window.hWnd = $HWND
' ウインドウを最小化や最大化から標準状態に戻します
Window.Restore
' ウインドウをデスクトップにあわせます
Window.ScreenFit
' ウインドウをアクティブにします
Lbox.ActiveWindow = hWnd

' **********************************************
' タイトルセット
' **********************************************
Call Lbox.EnumList( hWnd, _
	"【ファイル名】" & vbTab & "行" & vbTab & "テキスト" & vbTab & "ディレクトリ" _
)

' **********************************************
' 検索
' **********************************************
Call SearchFunc(Buff(0))

nCnt = 0
i = 0
Do While i <= nCnt
	Set obj = Fso.GetFolder(Buff(i))
	For Each objSub in obj.SubFolders
		if Err.Number = 0 then
			Err.Clear
			Call SearchFunc(objSub.Path)
			SetBuff objSub.Path
			nCnt = nCnt + 1
		end if
	Next
	Set obj = Nothing
	i = i + 1
Loop
Call Lbox.EnumListAdd( hWnd, "" & vbTab & "--" & vbTab & "★★ 処理が終了しました" )

' **********************************************
' 初期化関数
' **********************************************
Function InitBuff()
	Redim Buff(0)
End Function
' **********************************************
' セット関数
' **********************************************
Function SetBuff(strValue)
	if IsEmpty( Buff(0) ) then
		Buff(0) = strValue
	else
		ReDim Preserve Buff(Ubound(Buff)+1)
		Buff(Ubound(Buff)) = strValue
	end if
End Function
' **********************************************
' 検索
' **********************************************
Function SearchFunc(strDir)
	Flist = Lbox.FileList( strDir, aEntry(1), 2 )
	aList = Split( Flist, vbTab )
	if IsArray( aList )then
		For j = 0 to Ubound( aList )
			if Fs.IsTextFile( Lbox.RemoveEnclose( aList( j ), """" ) ) = 1 then
				Set TextFile = Fso.OpenTextFile( _
					Lbox.RemoveEnclose( aList( j ), """" ), 1 _
				)
				nRow = 1
				strList = ""
				Do While not TextFile.AtEndOfStream
					strLine = TextFile.ReadLine()
					if InStr( 1, strLine, aEntry(2), 1 ) > 0 then
						strLine = Replace( strLine, vbTab, " " )
						if strList <> "" then
							strList = strList & vbCrLf
						end if
						strList = strList & _
							Lbox.RemovePath( aList( j ) )
						strList = strList & vbTab _
							& nRow & vbTab _
							& strLine & vbTab & strDir
					end if
					nRow = nRow + 1
				Loop
				TextFile.Close
				if strList <> "" then
					Call Lbox.EnumListAdd( hWnd, strList )
				end if
			end if
		Next
	end if
End Function

</SCRIPT>
</JOB>
  










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





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

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ