Jump to content
shape5

Automator workflow/service or Applescript for looped edits in Preview

1 post in this topic

Recommended Posts

Hi all, I was originally trying this with Automator, but if someone can guide me to accomplishing this easier with Applescript then feel free, though i haven't worked with it before.  I am trying to get specific actions within a workflow looped. I just need the workflow to process a single image file continuously so the selected edits repeat within the 1 file until i stop the loop. Here are some basic actions i'm trying to get started with:

1 - get specified finder items
2 - copy finder items
3 - scale images
4 - crop images
5 - loop

The problem is that i want to loop only actions 3 & 4, but the loop starts over at 1 and creates a new file each time it loops. Can i create 2 workflows where the 2nd one (containing actions 3/4/5) starts when the first (containing 1/2) ends so only the 2nd workflow is looped? I'm not sure how to tell the 2nd one to start when the first ends though. Do i just set the input of the 2nd to use the 1st workflow file?

 

or if it's possible to run this as a service from within Preview that's fine too.  Originally i had this setup as WMD (watch me do) actions but Automator won't record the selection tool. if i can get the selection tool recorded then i can keep it as a WMD based workflow.  Acorn (for crop/scale i believe) & Extra Suites (Applescript app for recording the mouse click & draw) were apps i saw mentioned on other posts that came up on google searches which might be able to help accomplish this workflow or script.

Any help would be greatly appreciated.

thanks

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

Announcements

  • Similar Content

    • By writyper
      I had an (almost) perfectly working hack, but then at some point I found mp4 files preview in Finder no longer works. It just rolls a circle but won't start. Other file types are not affected.
      Last changes I made before it broke were installing FCPX + Compressor + Pro Video Formats and then Xcode.
       
      I tried different troubleshooting tips but nothing worked. My backup 10.13 system still work just fine with the same EFI.
       
      This is an output I get in terminal:
       
       qlmanage -p /Volumes/RAID/Video/_Export/video.mp4 
       
      Testing Quick Look preview with files:
          /Volumes/RAID/Video/_Export/video.mp4
      objc[821]: Class QLMediaTranscoding is implemented in both /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/PlugIns/Music.qldisplay/Contents/MacOS/Music (0x10e0c80c0) and /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/PlugIns/Movie.qldisplay/Contents/MacOS/Movie (0x10e0fa110). One of the two will be used. Which one is undefined.
       
      objc[821]: Class QLMediaExportWindowController is implemented in both /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/PlugIns/Music.qldisplay/Contents/MacOS/Music (0x10e0c8110) and /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/PlugIns/Movie.qldisplay/Contents/MacOS/Movie (0x10e0fa250). One of the two will be used. Which one is undefined.
       
      Anyone knows how to fix that ?
    • By WhenMusicAttacks
      Hi everyone! I wanted to start this topic about debloating macOs because i love getting the best out every machine and older hardware. When doing my restoration of a very old first gen i7 i started looking for services that are not needed to run the "unix core" of macos, all the icloud/icrap stuff that most power users do not use anyway.
      It all started with this - https://www.macobserver.com/tips/how-to/disable-tailspind-spindump-macos-cpu-speed/

      I stumbled upon the following github and started from the script provided by PWNSDX  - https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
       
      While the improvement on the i7 machine was not night and day, i have run the script on a friend's Macbook Air with 2gb or ram after updating it to High Sierra with dosdude patches and it really made a huge difference in usability. It literally came back to life from 1.8gb to 1.2 occupied on startup, he is now able to browse the internet again.
       
      With some spare time now in the summer i am looking to expand and understand a little bit better the list of disabled services by testing on my own machine.

      I would define 3 main "levels" of "applezation" on the system:

      full - being able to use iCloud - most services are needed - just disable Siri and as much tracking / helpers as possible
      partial - no more icloud, but still able to login and install apps from the App Store - i already broken this and i will try to start from scratch to get the bare minimum needed to achieve this
      barebone - no more App Store - i am now in this state as i don't need App Store at all, and i am now in the realm of "might aswell disable something crucial and not being able to boot anymore"
       
      additionally, Spotlight is probably a huge resource hog exp when using external hard drives
      i also disabled Time Machine as i manage all my backups with superduper images anyway

      I'd like to learn as much as possible on the subject - these are some other references on the internet but any other link is very appreciated
       
      - http://tech.masterofsql.com/os-x/unload-disable-unwanted-agents-daemons-os-x.html
       
      - https://vilimpoc.org/blog/2014/01/15/provisioning-os-x-and-disabling-unnecessary-services/
       
      - https://apple.stackexchange.com/questions/296482/macos-10-10-on-4-gb-memory-bloat-which-launch-daemons-agents-services-can-i-dis
       
      - http://www.mutface.com/speed-up-mojave-mac-os-technical-guide/
       
      i personally focus my research on High Sierra (being the latest perfectly functioning OS on pre-metal macbooks up to 2011) and Mojave (being the latest running 32bit apps it's the most common among power users)

      I have been using the macos Console to keep track of changes and services. I noticed that many services are connected in a way that taking one service down (like apsd ) can literally make a lot other go crazy with failed calls, that now need to be disabled aswell to prevent hangups.

      I will report some of my findings in the next sections, with articles linked
       
      CONTENT CACHING
      -- https://www.idownloadblog.com/2018/07/17/howto-mac-content-caching/
       
      # ContentCaching
      TODISABLE+=(
          'com.apple.AssetCache.builtin' \
          'com.apple.AssetCacheLocatorService' \
          'com.apple.AssetCacheManagerService' \
          'com.apple.AssetCacheTetheratorService'
          )
       
      TOUCHID
       
      # Biokit, touchid
      TODISABLE+=(
          'com.apple.biokitaggdd' \
          'com.apple.biometrickitd' \
          'com.apple.touchbarserver'
          )
       
    • By arsradu
      Hi guys,
       
      So, this little tutorial is meant to help people fix a new issue with Mojave: opening jpg files (looks like it happens with larger files, not so much with smaller ones) using Quick Look (on spacebar key pressed) or Preview app, using the dedicated GPUs.
      The issue is that, when trying to open jpg files (for some reason, it doesn't occur with pngs), the pop-up window would remain in an endless loop. And from that point forward, any other app trying to open the same file will either become unresponsive (in the case of the Preview app) or just stay in endless loop (in case of Quick Look)
       
      As a workaround, in case the tutorial below doesn't work for you, you can use Grab (built-in app in MacOS) to open said files.
       
      This issue DOES NOT occur using the iGPU. So...if you're comfortable using the iGPU, just switch to that and you should be good to go. You don't need this tutorial.
       
      This tutorial is based on @Cyberdevs' research and testing on this topic (especially useful if you're using an RX series AMD video card), and my own very limited time testing this on my rig. I just thought it would be useful to create a new thread for it so that people can discuss this particular issue here.

       
      With that being said, I'll just move on to the actual tutorial.
       
      New (probably better) method.
       
      Switch your SMBIOS in Clover config in regards to the dedicated GPU you're using, instead of the CPU. Take a look here and choose the corresponding SMBIOS closest to your hardware.
      Yeah, that's it.
       
      In case you lose CPU PM with this method, there are multiple ways to fix that, and they do not make the object of this thread.  It worked perfectly fine for me though and I didn't need to change anything else.
       
      Alternatively, you can also try one of the MacPro SMBIOSes, such as MacPro5,1 or MacPro6,1. It was tested multiple times and it showed good results. 
      Keep in mind that choosing these will most likely not show you an iGPU in System Report, since those machines generally (probably all of them) use Xeon CPUs with no iGPUs either.
       
      /!\NOTE: There have been reports saying that using this method (switching SMBIOS to a MacPro one) with newer versions of MacOS may cause iTunes to crash.
      So...keep that in mind and better try some of the other methods mentioned here.
       
      A simple Lilu plugin
       
      Thanks to vulgo for the plugin and @Matgen84 for sharing and testing it, we now have yet another possible solution to this issue. It's a Lilu plugin (which means that it requires Lilu.kext in order to work) it's called NoVPAJpeg, and it can be downloaded from here.
      You use it as a regular kext, alongside Lilu. I prefer (and recommend) using it within the EFI folder, in Clover/kexts/Other. But if you want to use it in S/L/E, that should work just fine.
       
      More info can be found in this post here.
       
      UPDATE:
       
      According to Vulgo, NoVPAJpeg.kext is now deprecated.
      In case its functionality is needed, use WhateverGreen.kext (alongside Lilu.kext) and add the following boot arguments:
      shikigva=32 shiki-id=Mac-7BA5B2D9E42DDD94 In case you wanna try alternative medicine  ...
       
      The main thing we need to do is actually very simple: we need to enable the iGPU (integrated GPU) by default, in BIOS, while actually being connected to the dedicated GPU.
       
      For ATI GPUs (curtesy of @Cyberdevs' post here).
       
      The discreet GPU should be set as primary in BIOS and your displays should be connected to your discreet GPU
      The iGD/iGPU/iGFX must be enabled in BIOS/UEFI as the secondary GPU.
       
      I removed the DSDT Reconfigured the config.plist to and removed some flags which weren't needed because of the DSDT added the InjectATI + Ornioco Framebuffer (I removed the Orinoco framebuffer because of some weird glitches but it might be useful for other AMD GPUs if you inject the correct framebuffer according to your GPU. No need to inject anything for nVidia GPUs unless your GPU needs it) Added the InjectIntel + ig-platform-id for my intel HD530 (for intel HD 530 I use the 0x19120001 ig-platform-id)  
      Steps 5 to 7 might not be necessary I just did them anyway, if anyone succeeded to get quicklook working without those steps let me know so I can exclude those steps.

           Also confirmed to work with AMD R9 270X on a SandyBridge rig (without an iGPU) using WhateverGreen + Lilu kexts, which also helped to solve the transparency issue along with the Quick Look problem, it also resolved the buggy Screen Capture (Command+Shift+5) issue as well. 
       
          Also, do:
      nvram cleanup kextcache & prelinked kernel rebuild reboot  More info on that here.
       
       
      For NVIDIA GPUs (tested on my old MSi GTX 650)
       
      This is what I needed for my NVIDIA GPU and the MSI motherboard in the signature (*since then, I upgraded my GPU to my current RX 580). Your milage may vary, depending on your hardware. But, the idea should be the same regardless.
       
         For MSi motherboads (check out my motherboard details in the signature)
       
      Set your BIOS to use PEG (dedicated GPU) so you can boot.
      Since you're reading this, chances are that you're already connected to the dedicated GPU and the BIOS is set to PEG. So just go into BIOS and see if you're using the iGPU or the dedicated (PEG) graphics device by default.
      If you're already using this, skip to Step 3 (the part AFTER Reboot). Reboot (I think you don't necessarily need to boot into the OS...but you do need to reboot at least until Clover UI) Reboot back into BIOS and set it from PEG to IGD (integrated graphics) WITHOUT removing the cable. Save Reboot again.  
         The result should be that the OS is tricked into thinking you're booting with the IGPU when in fact you're using the dedicated GPU.
       
         For Gigabyte motherboards
       
         Set:
      Peripherals -> Initial Display Output -> iGFX Chipset -> Internal Graphics -> Enabled
           DVMT Pre-Allocation -> default 64M.
           DVMT Total Gfx Mem -> default 256M Save Reboot  
         You should do this with the cable connected to the dedicated GPU.
       
      You will also need to patch the iGPU from Clover config.
      1. Graphics -> Inject Intel (UNCHECK Inject Nvidia or ATI if it's checked).
      2. ig-platform-id (in my case for Intel HD 4600 Desktop) it was: 0x0d220003
       
      And use IntelGraphicsFixup.kext (now included into WhateverGreen.kext) in Clover/kexts/Other. In my particular case, without the kext, I would get freezes in Safari.
       
      Another way to activate the iGPU while having the dGPU set as primary is by going into BIOS/SAG/Graphics Configuration/iGPU and setting Multi-Monitor to [Enabled], all the rest remains on [Auto], and set Inject/Intel to [True] in Clover config.*.
       
      Thanks to @gjw for the tip.
       
      *Motherboard dependent. But the multi-monitor option might be the same regardless of manufacturer.
       
       
      This might be a bug with Mojave and it could be fixed by Apple in the future. but in the meantime, feel free to use this if it helps you fix the issue.
       
      For HP motherboards (including laptops), so far no solution, unless the BIOS somehow allows to switch from dGPU to iGPU and vice-versa.
       
      Cheers!
    • By bojarek8
      Hi! 
       
      I'm Kris!  I hope my topic is in a good section.
      I am asking you guys for help in this difficult hackintosh problem. 
      For a very long time I tried to solve it myself but I have no idea how I can solve this problem.
       
       
      Description of the problem
       
       
      My problem is that I do not have access to any apple service. I am unable to log into the App Store using my Apple ID. I am unable to log into iCloud account in system preferences. iMessage and Facetime also do not work.  Messages that I get when I try to log in: "An error occurred during activation. Try again" 
       
      in iMessage: "An error occurred during activation. Try again" 
      in App Store: "This device or computer can not be verified. Contact the support department for help"
      in Face Time: "There was an error during activation. Try again"
       
      In summary, I am unable to log in to any apple network service. 
       
      My Specification 
       
      Motherboard:  Acer MG43M
       
      Processor: Intel(R) Core(TM)2 Duo CPU  E7600  3.06GHz
       
      Graphic card: Gigabyte GeForce 9600GT 515MB 
       
      Wi-fi: TP-LINK  TL-WN881ND
       
      Ethernet: (not supported) 
       
      Audio: (rather, it is not needed here)
       
      Files: 
       
      My config.plist: https://drive.google.com/drive/folders/1vlYJC329sz6yuTwFr-k0fOs3rfhKeI6l
       
       
       
       
       



×