Skip to content

Commit

Permalink
update_smart_objects script in Powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
Arecsu committed Oct 26, 2023
1 parent 3a780e4 commit e5d0b27
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions photoshop_scripts/update_smart_objects.bat
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"
16 changes: 16 additions & 0 deletions photoshop_scripts/update_smart_objects.ps1
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)
}

0 comments on commit e5d0b27

Please sign in to comment.