Tag Info

New answers tagged

0

This is rather easy combining some standard tools: file for looking up the mime type tr to remove the slashes (otherwise, you'd have nested folders for different file groups) well, some obvious mkdir and mv commands for file in * do mime=$(file --brief --mime-type "$file" | tr '/' '_') mkdir -p "$mime" mv "$file" "$mime/$file" done ...


1

I think the best way to achieve this is to install a keyboard mapper program. I use Karabiner. Once installed (might need a reboot?) you'll then see a menu bar icon that looks like a rounded square probably with the word 'Default' next to it; it is suggesting you're using the default mapping profile. Click on it and select 'Preferences' to access Karabiner's ...


1

Unfortunately, the Fn key is interpreted before it even leaves the keyboard, so there is no way to 'fake it' later. I haven't seen that version of Office yet, but… if there is a menu item for the function, you should be able to replace it using System Prefs > Keyboard > Shortcuts / App Shortcuts. Hit the + button under the right-hand box, dial in the ...


0

I found myself : print " * {0} : [{1}]({2})".format(post["n"].encode( "utf-8" ), post["d"].encode( "utf-8" ), post["u"].encode( "utf-8" )) It was an unicode/utf-8 problem :)


0

You add a shell script as the first automator task to run sudo mdutil -E /. This will rebuild the index.


1

With thanks to input from markhunte and tetsujin, I came up with the following solution. With all things considered, the exact requirements evolved to the following: Ensure a SecurityAgent dialog is actually present so that script doesn't run otherwise. Reposition the SecurityAgent dialog because it can readily get in the way in its default position. ...


0

To stop the error you are getting you need to take out the 'of group' part of the click command. (Tested by creating a encrypted dmg) You do not need it and that is why you get the error. The Buttons are 1 and 2. 1 will be cancel. 2 will be ok So you will need to change the button you are calling also. set theData to (the clipboard) set appName ...


0

I don't have anything to test it on, so this is a pure guess. Maybe the app isn't frontmost at that point, so this might help tell process "SecurityAgent" to activate (*this will bring it to the front if it's already running*) --tell application "System Events" (*try with & without this - you'll need to balance up the end tells at the end*) set ...


0

I think you could easily fix that whit a bit of applescript and "sed". I don't know how your original applescript looks like, but I assume you have a variable that contains the path /Volumes/someFolder/someFile.docx as you said, let's call that variable thePath. All you have to do is take thePath, remove /Volumes/ and add smb://Server/someParentFolder/ ...


0

You will always see the gear in the menu bar if you are using Automator. If you want it to exit quickly, create a wrapper that forks off your android script into another process, and exits.


3

The question itself isn't exact too, because the OP talks about: files names like ABC 123456 (without extension), but in the example code using *.txt extension add a dash between two blocks (e.g. where is the space) like ABC - 123456, but in the next taking about counting to 4 and count 3, e.g. not exacltly clear what the script should do for example if ...



Top 50 recent answers are included