mirror of
https://github.com/sbrow/ps.git
synced 2026-02-27 02:51:44 -05:00
improved robustness
more tests added.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
Dim app
|
||||
Set app = CreateObject("Photoshop.Application")
|
||||
if WScript.Arguments.Count = 0 then
|
||||
WScript.Echo "Missing parameters"
|
||||
Dim appRef
|
||||
Set appRef = CreateObject("Photoshop.Application")
|
||||
if wScript.Arguments.Count = 0 then
|
||||
wScript.Echo "Missing parameters"
|
||||
else
|
||||
path = wScript.Arguments(0)
|
||||
folder = wScript.Arguments(1)
|
||||
app.DoJavaScriptFile path, Array(Folder)
|
||||
args = wScript.Arguments(1)
|
||||
appRef.DoJavaScriptFile path, Split(args, ",")
|
||||
end if
|
||||
@@ -1,11 +1,10 @@
|
||||
var Path = arguments[0];
|
||||
alert(Path)
|
||||
var saveFile = File(Path + "/test.txt");
|
||||
|
||||
var saveFile = File(arguments[0]);
|
||||
if(saveFile.exists)
|
||||
saveFile.remove();
|
||||
|
||||
saveFile.encoding = "UTF8";
|
||||
saveFile.open("e", "TEXT", "????");
|
||||
saveFile.writeln("Testing...");
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
saveFile.writeln(arguments[i])
|
||||
}
|
||||
saveFile.close();
|
||||
@@ -1 +1,3 @@
|
||||
wScript.echo "Testing..."
|
||||
for i=0 to wScript.Arguments.length-1
|
||||
wScript.echo wScript.Arguments(i)
|
||||
next
|
||||
Reference in New Issue
Block a user