Developing Scripts on the 命令(する) Line
For 使用者s who do not wish to develop their Office Scripts using an IDE there is a simple 命令(する) line interface built into the Office Scripting module which can be used for the 世代 and (軍隊などの)展開,配備 of Office Scripts.Contents
必要条件s
- The Scripting module office.jar とじ込み/提出する should be 含むd in the
classpath. You can unpack this とじ込み/提出する from the Scripting 枠組み installer
SFrameworkInstall.jar
by running the に引き続いて 命令(する):
jar xf SFrameworkInstall.jar ide/office.jar
- The CommandLineTools class will only work if an XML parser (such as Apache Xerces) is 利用できる in the classpath.
The CommandLineTools class
The CommandLineTools class takes the に引き続いて 選択s (公式文書,認める: 選択s in angle brackets "<>" are 要求するd, 選択s in square brackets "[]" are optional):-g [Path to 小包 directory] [選択s]生成するs a Script 小包 for the given the 小包 directory. The 小包 指名する will be the 指名する of the 小包 directory 加える the .sxp 拡張.
- If a 小包 directory is not 明示するd the 現在の directory is used. If the 小包 directory does not 含む/封じ込める a directory 指名するd Contents an error message is printed. さもなければ a Script 小包 (.sxp) とじ込み/提出する is 生成するd in the 小包 directory 含む/封じ込めるing all of the とじ込み/提出するs under the Contents directory. The 選択s that may be used with the -g 選択 許す the 使用者 to 明示する how the 小包-descriptor.xml とじ込み/提出する for the Script 小包 is 生成するd (see the Scripting 枠組み developer guide for more (警察などへの)密告,告訴(状) on the 小包-descriptor.xml とじ込み/提出する). The に引き続いて 選択s are 利用できる:
[-l language[=supported 拡張 名簿(に載せる)/表(にあげる)]]
明示するs which language せいにする to use for the 小包 element in the 小包-descriptor.xml とじ込み/提出する. The supported 拡張 名簿(に載せる)/表(にあげる) is ignored if the language is Java. さもなければ all とじ込み/提出するs that have one of the supported 拡張s (the 名簿(に載せる)/表(にあげる) should be separated by the 壇・綱領・公約 明確な/細部 path separator, ":" on Unix, ";" on Windows) will be 追加するd as script 入ること/参加(者)s to the 小包-descriptor.xml とじ込み/提出する.
Alternatively the 使用者 can 明示する a 名簿(に載せる)/表(にあげる) of 指名するs at the 命令(する) line which will be 追加するd as scripts and no search for script 指名するs will be 成し遂げるd. The に引き続いて (米)棚上げする/(英)提議する shows the behaviour of CommandLineTools when the -l 旗 is used:
-l 旗 used? 小包-descriptor.xml 存在するs? result no no error message printed yes no 小包-descriptor.xml 生成するd
小包.sxp 生成するdno yes 小包-descriptor.xml not 生成するd
小包.sxp 生成するdyes yes if
language is different from 小包-descriptor.xml language, error
else
小包-descriptor.xml regenerated
小包.sxp 生成するd[-p 指名する=value]
明示するs a 指名する value pair to be 追加するd as a language 扶養家族 所有物/資産/財産 in the 小包-descriptor.xml とじ込み/提出する
[-v]
明示するs that verbose 生産(高) should be 陳列する,発揮するd.
-d <Path to Script 小包> <的 Directory|文書>
(軍隊を)展開する,配備するs the given Script 小包 to a directory or an OpenOffice.org 文書. A directory will be created with the 指名する of the 小包 and the contents of the 小包 will be put into that directory.
- If (軍隊を)展開する,配備するing to an OpenOffice.org 取り付け・設備 the 的 directory should be the <Office 取り付け・設備>/使用者/Scripts or <Office 取り付け・設備>/株/Scripts directory. If the either the Script 小包 or the 的 do not 存在する an error message is printed. さもなければ the Script 小包 is (軍隊を)展開する,配備するd to the 的.
最高の,を越す
java CommandLineTools -g myparceldir -l Java
生成するs a myparceldir.sxp とじ込み/提出する in myparceldir automatically 輸出(する)ing
all public Java methods which take XScriptContext as their first parameter as
Office scripts.
生成するs a script 小包 とじ込み/提出する in the 現在の directory
automatically 輸出(する)ing all とじ込み/提出するs that end with the .bsh 拡張 as
BeanShell scripts
生成するs a myparceldir.sxp とじ込み/提出する in myparceldir and 輸出(する)s MyScript.bsh
as an Office script.
生成するs a myparceldir.sxp とじ込み/提出する in myparceldir, automatically
searching for valid Office scripts, and 追加するing the classpath 所有物/資産/財産 to
each Office script.
生成するs a myparceldir.sxp とじ込み/提出する in myparceldir, automatically
searching for valid Office scripts, and 追加するing the classpath and the
secondprop 所有物/資産/財産s to each Office script.
(軍隊を)展開する,配備するs the myparceldir.sxp Script 小包 to the 明示するd office directory.
Examples
Last 修正するd: Tue 損なう 12 11:40:28 GMT 2003