-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update_smart_objects script in Powershell
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /c start /min "" powershell -WindowStyle Hidden -ExecutionPolicy Bypass -File "D:\martyr Backup\__apps\ZMOK\source\photoshop_scripts\update_smart_objects.ps1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Check if Photoshop is running | ||
$photoshopProcesses = Get-Process | Where-Object { $_.ProcessName -eq "Photoshop" } | ||
|
||
if ($photoshopProcesses.Count -gt 0) { | ||
# Create a COM object for Photoshop | ||
$objApp = New-Object -ComObject "Photoshop.Application" | ||
|
||
# Use dialog mode 3 for showing no dialogs | ||
$dialogMode = 3 | ||
|
||
# Define the string ID for "placedLayerUpdateAllModified" | ||
$idplacedLayerUpdateAllModified = $objApp.StringIDToTypeID("placedLayerUpdateAllModified") | ||
|
||
# Execute the action | ||
$objApp.ExecuteAction($idplacedLayerUpdateAllModified, $null, $dialogMode) | ||
} |