call main()
sub main()
Dim scmd
Set scmd = "c:\windows\system32\cscript.exe //nologo c:\s.vbs"
createobject("wscript.shell").run scmd,0,false
end sub
Run Code Online (Sandbox Code Playgroud)
它给了我错误:
Object required: '[string: "c:\windows\system32\"]' Code 800A01A8
我想回答这个问题有
要获得Perl的所有花哨格式和对哈希数据的键控访问,您需要一个(更好的版本)函数:
# sprintfx(FORMAT, HASHREF) - like sprintf(FORMAT, LIST) but accepts
# "%<key>$<tail>" instead of "%<index>$<tail>" in FORMAT to access the
# values of HASHREF according to <key>. Fancy formatting is done by
# passing '%<tail>', <corresponding value> to sprintf.
sub sprintfx {
my ($f, $rh) = @_;
$f =~ s/
(%%) # $1: '%%' for '%'
| # OR
% # start format
(\w+) # $2: a key to access the HASHREF
\$ # end …Run Code Online (Sandbox Code Playgroud) 我正在使用ruby 1.9.2p180 (2011-02-18) [i386-mingw32].安装ActiveScriptRuby是否安全(基于1.8.7)?
更新(在Luis Lavena的亲切鼓励之后):
我成功安装了ActiveScriptRuby和pik.证据:
--------------------- PATH
C:\Ruby192\bin
C:\WINDOWS\system32
...
--------------------- pik ls
187: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mswin32]
* 192: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
--------------------- ruby -v
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
RUBY C:\Documents and Settings\eh
cscript m:\lib\kurs0705\xpl\xplmssc.vbs /xf:showLanguages
xplmssc.vbs - xplore microsoft script control
...
-------------------------------------------------------------------------------
VBScript 5.7.16599 * cscript 5.7 * WIN XP * WINXPSP3 * eh * 5/12/2011 7:58:30 PM
===============================================================================
showLanguages - show languages
-------------------------------------------------------------------------------
-------- VBScript
Expr: 47+11 …Run Code Online (Sandbox Code Playgroud) 我有一个带有php文件的目录,这些文件每天都在自动更新.有时我会添加另一个(新的)PHP文件.
从目录中包含所有php文件的最佳方法是什么?
谢谢!