mirror of
https://github.com/sbrow/ps.git
synced 2025-12-29 18:47:38 -05:00
Minor Improvements
* Made Refresh() more robust - when an error is encountered, the layer(set) is reloaded automatically. * JS errors are now output to console instead of alerts.
This commit is contained in:
12
scripts/PsIsOpen.vbs
Normal file
12
scripts/PsIsOpen.vbs
Normal file
@@ -0,0 +1,12 @@
|
||||
Function IsProcessRunning( strComputer, strProcess )
|
||||
Dim Process, strObject
|
||||
IsProcessRunning = False
|
||||
strObject = "winmgmts://" & strComputer
|
||||
For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )
|
||||
If UCase( Process.name ) = UCase( strProcess ) Then
|
||||
IsProcessRunning = True
|
||||
Exit Function
|
||||
End If
|
||||
Next
|
||||
End Function
|
||||
wScript.Echo IsProcessRunning(".", "Photoshop.exe")
|
||||
@@ -6,5 +6,8 @@ if wScript.Arguments.Count = 0 then
|
||||
else
|
||||
path = wScript.Arguments(0)
|
||||
args = wScript.Arguments(1)
|
||||
appRef.DoJavaScriptFile path, Split(args, ",")
|
||||
error = appRef.DoJavaScriptFile(path, Split(args, ","))
|
||||
if Not error = "true" Then
|
||||
Err.raise 1, "dojs.vbs", error
|
||||
end if
|
||||
end if
|
||||
@@ -1,5 +1,5 @@
|
||||
#include lib.js
|
||||
|
||||
app.displayDialogs=DialogModes.NO
|
||||
var stdout = newFile(arguments[0]);
|
||||
var lyr = eval(arguments[1]);
|
||||
stdout.write(('{"Name":"' + lyr.name + '","Bounds":[[' + lyr.bounds[0] + ',' +
|
||||
|
||||
Reference in New Issue
Block a user