コメント |
http://winofsql.jp/wsf/jgrep2.wsf
JGREP は、要するに http://e-words.jp/w/E585A8E69687E6A49CE7B4A2.html(全文検索) を行うソフトですが、
[[正規表現]]を使用する事によって、プログラマを助けます。
そのサンプルは、オプション画像の下にあるので参照して下さい
↓インストール直後のスクリーンショット
http://lightbox.on.coocan.jp/image/jgrep.jpg
@LINE
[[オプション 1]]
http://lightbox.on.coocan.jp/image/jgrep2_option_01.png
[[オプション 2]]
http://lightbox.on.coocan.jp/image/jgrep2_option_02.png
@LINE
以下は、単純に "Dd" という文字列を探しています
http://lightbox.on.coocan.jp/image/jgrep_2.jpg
正規表現の @C:red(function\s+Dd) で、関数の定義場所を探しています
http://lightbox.on.coocan.jp/image/jgrep_3.jpg
[[WEB WSH(インストール) コード↓]]
@DIV
<JOB>
<COMMENT>
************************************************************
WEB WSH 実行スケルトン
************************************************************
</COMMENT>
<COMMENT>
************************************************************
外部スクリプト定義
************************************************************
</COMMENT>
<SCRIPT
language="VBScript"
src="http://lightbox.in.coocan.jp/laylaClass.vbs">
</SCRIPT>
<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
Call laylaFunctionTarget( "http://lightbox.in.coocan.jp/" )
Call laylaLoadFunction( "baseFunction.vbs" )
Call laylaLoadFunction( "toolFunction.vbs" )
Crun2 110
sId = "jgrep2"
sPg = "JGREP2.exe"
' ***********************************************************
' ダウンロードする URL
' ***********************************************************
strDownloadPlace = "http://ftp.vector.co.jp/pack/win95/util/text/find/jgrep205.lzh"
' ***********************************************************
' ダウンロード
' ***********************************************************
ret = HTTPDownload( strDownloadPlace, TempDir & "\" & sId & ".lzh" )
if not ret then
Wscript.Echo ErrorMessage
Wscript.Quit
end if
Wscript.Echo strDownloadPlace & " をダウンロードしました"
' ***********************************************************
' 解凍ソフトの一時ダウンロード
' ***********************************************************
strDownloadPlace = "http://lightbox.in.coocan.jp/Lhasa.exe"
' ***********************************************************
' ダウンロード
' ***********************************************************
ret = HTTPDownload( strDownloadPlace, TempDir & "\Lhasa.exe" )
if not ret then
Wscript.Echo ErrorMessage
Wscript.Quit
end if
Wscript.Echo strDownloadPlace & " をダウンロードしました"
strCommand = Dd( TempDir & "\Lhasa.exe" ) & " -d- -a -q -f -e- " & Dd(TempDir & "\" & sId & ".lzh")
RunSync(strCommand)
GetFso
' ***********************************************************
' 解凍ディレクトリの移動
' ***********************************************************
' Call Fso.CreateFolder(ProgDir & "\" & sId)
Call Fso.CopyFolder( TempDir & "\" & sId & "\jgrep205", ProgDir & "\" & sId, True )
Call Fso.DeleteFolder( TempDir & "\" & sId )
' ***********************************************************
' ダウンロードファイルの削除
' ***********************************************************
Call Fso.DeleteFile( TempDir & "\" & sId & ".lzh", True )
Call Fso.DeleteFile( TempDir & "\Lhasa.exe", True )
' ***********************************************************
' ショートカット作成
' ***********************************************************
if OkCancel("デスクトップにショートカットを作成しますか?") then
Set obj = WshShell.CreateShortcut( DesktopDir & "\" & sId & ".lnk")
obj.TargetPath = Dd( ProgDir & "\" & sId & "\" & sPg )
obj.WindowStyle = 1
obj.IconLocation = ProgDir & "\" & sId & "\" & sPg
obj.Description = "正規表現による文字列検索ソフト"
obj.WorkingDirectory = ProgDir & "\" & sId
obj.Save
Wscript.Echo "デスクトップにショートカットを作成しました"
end if
MsgOk( "処理が終了しました " )
</SCRIPT>
</JOB>
@END
|