01.
<JOB>
02.
<COMMENT>
03.
************************************************************
04.
■デスクトップにChrome で ドキュメント( HTML )の
05.
ショートカットを作成する
06.
07.
■著作権その他
08.
09.
このプログラムはフリーです。どうぞ自由に御使用ください。
10.
著作権は作者である私(lightbox)が保有しています。
11.
また、本ソフトを運用した結果については、作者は一切責任を
12.
負えせんのでご了承ください。
13.
************************************************************
14.
</COMMENT>
15.
16.
<OBJECT id=
"WshShell"
progid=
"WScript.Shell"
/>
17.
<OBJECT id=
"Fso"
progid=
"Scripting.FileSystemObject"
/>
18.
<OBJECT id=
"Shell"
progid=
"Shell.Application"
/>
19.
20.
<COMMENT>
21.
************************************************************
22.
* lightbox WEB WSH コアライブラリ
23.
************************************************************
24.
</COMMENT>
25.
<SCRIPT language=
"VBScript"
src=
"http://homepage2.nifty.com/lightbox/laylaClass.vbs"
></SCRIPT>
26.
27.
<COMMENT>
28.
************************************************************
29.
* スクリプト開始
30.
************************************************************
31.
</COMMENT>
32.
<SCRIPT language=VBScript>
33.
34.
Call
laylaFunctionTarget(
"http://homepage2.nifty.com/lightbox/"
)
35.
Call
laylaLoadFunction(
"baseFunction.vbs"
)
36.
Call
laylaLoadFunction(
"toolFunction.vbs"
)
37.
38.
Const
SHORTCUT_WindowStyle_Default = 1
39.
Const
SHORTCUT_WindowStyle_Maximized = 3
40.
Const
SHORTCUT_WindowStyle_Minimized = 7
41.
42.
43.
44.
45.
46.
if vbCancel = MsgBox(
"処理を開始しますか? "
, vbOKCancel , _
47.
"Desktop to Chrome Shortcut for Flex3 document"
) then
48.
Wscript.Echo
"キャンセルされました"
49.
Wscript.Quit
50.
end if
51.
52.
53.
strCurPath = WScript.ScriptFullName
54.
Set
obj = Fso.GetFile( strCurPath )
55.
Set
obj = obj.ParentFolder
56.
strCurPath = obj.Path
57.
58.
59.
strKey =
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome"
60.
strTarget = WshShell.RegRead(strKey &
"\DisplayIcon"
)
61.
62.
63.
strDesktop = WshShell.SpecialFolders(
"Desktop"
)
64.
65.
66.
TargetHTML = OpenFileName3()
67.
if TargetHTML(0) <>
""
then
68.
69.
70.
strWorkPath = TargetHTML(0)
71.
Set
obj = Fso.GetFile( strWorkPath )
72.
Set
obj = obj.ParentFolder
73.
74.
set obj = WshShell.CreateShortcut( strDesktop &
"\" & obj.Name & "
.lnk")
75.
76.
obj.TargetPath = strTarget
77.
obj.Arguments =
"--allow-file-access-from-files "
""
& TargetHTML(0) &
""
""
78.
obj.WindowStyle = SHORTCUT_WindowStyle_Default
79.
obj.Hotkey =
"CTRL+SHIFT+G"
80.
obj.IconLocation = strTarget &
", 2"
81.
obj.Description =
"Flex3のドキュメントのショートカット"
82.
obj.WorkingDirectory = strCurPath &
"\langref"
83.
obj.Save
84.
85.
Wscript.Echo
"処理が終了しました"
86.
else
87.
Wscript.Echo
"HTML を選択しませんでした"
88.
end if
89.
90.
</SCRIPT>
91.
</JOB>