Need help for automator/applescript


hello,

initial automator workflow made automated printing, use hazel watch folders , launch :
1 - indicated finder items => folder(s) specified
2 - folder content
3 - filter folder content => none of following conditions true : file extention not jpg
4 - dispense items incrementally
5 - add date , time => actual time hr min sec before name
6 - move finder items => folder specified
7 - open finder items => photoshop dropplet specified
8 - pause => time specified according photoshop dropplet execution
9 - loop => number of loops specified - results entry

@ step 7 need place condition if or if according name content :
if file name contains code1 open in photoshop dropplet code1
if file name contains code2 open in photoshop dropplet code2
, many needed if have more variables

@ point issue automator function "filter finder items" works if , if only

trying solve applescript newbie

here tried in place of step 7 (of course not working)
- execute applescript
code:
 tell application "finder"  "filename"  if "filename" contains "aaa"  tell application "finder"  open file using ":users:admin:desktop:folder:dropplet aaa.app"  end tell  else  if "filename" contains "bbb"  tell application "finder"  open file using ":users:admin:desktop:folder:dropplet bbb.app"  end tell  else   end if  end if  end tell 
if can tell me should try, in advance
 

perhaps may going :

run applescript action :

code:
on run {input, parameters}     (* script goes here *)     tell application "finder"         -- insert actions here         repeat 1 number of items in input             set this_item item of input             set filename name of this_item             if filename contains "test"                 open this_item             end if         end repeat     end tell     --return input end run
finder example :

code:
tell application "finder"     open document file "testfile.txt" of folder "documents" of folder "stagiair" of folder "users" of startup disk using application file "textedit.app" of folder "applications" of startup disk end tell 
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Other Unknown error

Trump supporter?

com.apple.DiskManagement.disenter error -119930878