Tag Info

New answers tagged

1

This is possible by selecting the second window to get the selection. Insert the "Run AppleScript" action at the first position in the workflow, clear all text in the action, and put this script in the action: on run {input, parameters} tell application "Finder" activate -- doesn't work without the activate open target of Finder window ...


1

The only thing a can think of is a little bit of GUI Applescript. Place this code into a 'Run Applescript' action above your 'Run Shell script' action. The Applescript is commented to explain what it is doing. But be aware this code is to start you of. It works in my tests. NOTE THIS SCRIPT WORKS WHEN THE WINDOWS ARE IN LIST VIEW But not if you ...


2

Buscar's comment made me check the process hierarchy and it turns out, a service is a sub-sub-sub process of the application that launched it. So, even though in many cases, a query for the frontmost application may be ok, I think looking at the process tree is better. Here is some sample code from a test Service Workflow that for me appears to work ...


0

AppleScript: tell application "System Events" -- Get App Name set frontApp to (path to frontmost application as Unicode text) -- Match App Name if frontApp ends with "ThisParticular.app:" then -- Do this and that end if end tell


1

You can place this Applescript in your workflow: tell application "System Events" to get name of first process whose frontmost is true It will output the name of the current foreground app (you can't really call a service from an inactive application). You can then pass it as a string into another action like this:


2

A Folder Action workflow will give you every file when a change is detected in the specified folder, including ones you are not interested in. Your problem is with Get Specified Finder Items. It just adds items to the list of files to process. It doesn't filter anything! Use the Filter Finder Items action instead to filter the list returned by Finder. You ...


0

In Finder, go to ThisAutomatorThing.app Right click. Show Package Contents. Go to folder /Contents/, and open Info.plist file with a text editor. Find something like: <key>CFBundleName</key> <string>6ARbL3D-C0D4</string> If the string is exactly the gibberish in notification, replace it with you app name. You MIGHT need to 1) ...


0

Blank spaces have to be escaped. To escape a special character, like a blank space, you use a forward slash, so " " will become "\ ". You can modify the script, https://gist.github.com/2211017, link to from the post you linked to by adding the following line set mytext to searchReplace(mytext, " ", "\ ") after line 16. ... 15. set mytext to ...


3

namedFolder only exists in the scope of your tell block. Define it first thing so that it will persist after you’re done with Finder. set namedFolder to "" tell application "Finder" ... end tell return namedFolder Alternatively, you could just put the return statement inside the tell block.


1

As you launch the service from Safari, the application will be the one in the foreground. You can use this Applescript in the "Run AppleScript" action. tell application "System Events" set x to first process whose its frontmost is true and name is "Safari" return unix id of x end tell


0

You can right click the file, and choose "Get Info" - the popup window will have a property for Server which lists the full URL path with protocol (e.g. smb://example.com/Data/file.png)


0

Not an answer, but... To attempt to debug, I would deconstruct the script to its components, so roughly split to only tell application "System Preferences" activate set current pane to pane "com.apple.preference.trackpad" end tell & test for any error Then add tell application "System Events" tell process "System Preferences" click ...


1

I tested copying 8.95GB worth of files and folders and you do get a timeout. The best thing you can try is to add a timeout clause to the code. When I did this it worked ok. I gave the script 30mins. I do not have SD cards so in my testing I had to change the code some to accommodate my setup. I do notice : you have a two tell blocks for finder where ...


1

As far as I can tell, there is no direct way. You would have to use applescript to select the text and set the formatting in the Mail application after the fact... (Example below taken from the web...) tell application "System Events" to tell (process 1 where frontmost is true) set {c1, c2} to value of attribute "AXSelectedTextRange" of text area 1 of ...


0

Short answer: Yes, it's possible. You just need to use the Record button in Automator to record your own mouse movements as you change the font in one PowerPoint file. Then save this recording as a Folder Action. Now every time you drop a some files into a folder with this action, it will automatically run at your mouse movements on those files. I'm ...


0

It is doing the right thing. There is no decision making being done so the dialog box will appear every time. To fix it, you will need to add an AppleScript action as discussed here https://discussions.apple.com/thread/509298?start=0&tstart=0 So, if the filter returns an empty list {} then it quits. Here is what it looks like...


0

Or, you can open up the service in AppleScript Editor and correct the name/spelling just by deleting and retyping.


0

Try rebuilding the Launch Services database. Open the Terminal and run the following command: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user


0

I think there is a security setting in Mavericks (and possibly Mountain Lion) that causes Automator not to allow system control. See this question Open your Console and watch the logs when you run the service. In my case, it crashes when I try to run a shell script. I tried adding Automator to the Security and Privacy preferences, but it did not solve ...


0

This AppleScript will launch a Terminal window with the command you specified: on run {input, parameters} tell application "Terminal" activate set filesString to "" repeat with file_ in input set filesString to filesString & " " & quoted form of (POSIX path of file_) end repeat do script "for f in" & ...


0

Nice and clean solution is to display message via Notification Center. Just execute the following terminal command in your script. osascript -e 'display notification "All files converted" with title "ffmpeg converter"' 'osascript' command runs any AppleScript from terminal, 'display notification' pops up nice notification. Also you can use 'display ...



Top 50 recent answers are included