Search Results

Search found 265 results on 11 pages for 'applescript'.

Page 6/11 | < Previous Page | 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • How to automatically print the contents of a folder in OS X?

    - by MDRoz
    I would like to be able to set up a folder on my Mac, where I could dump files and have them be automatically sent to the default printer. This way I would be able to print files at home when I'm not physically at home, using something like Dropbox. It wouldn't have to be real-time; i.e., a scheduled job that checks the folder every so often would be acceptable. What's the easiest approach? Automator? Applescript? Cron job?

    Read the article

  • Programmatically change height of the window more than the height of the screen in Mac OS X

    - by nezlooy
    Respected low-level users of Mac OS, please, help. I'm trying programmatically to change height of window of safari (or other window). I'm was trying used AppleScript and AXUIElementSetAttributeValue of Carbon, but none of these methods can't increase the window bigger than the height of the screen. But, the width changes without any problems. I guess I'd be starting with something like SetWindowPos with SWP_NOSENDCHANGING flag under Win32. Maybe, you can disable this functionality, which monitors the size of the window or completely shutdown the one who is responsible for it? Note that I want to do this programmatically from an external process - I'm not asking how to control just my own app's window size and position. Thanks.

    Read the article

  • Sorting Files into Subfolders based on EXIF Date

    - by honestor
    I have a huge directory from a HDD recovery that contains 70000+ JPEG files. I tried playing around with some AppleScripts, that I found, but had no luck. I already installed EXIFtool, which might be useful for this task. The current directory structure is as follows: dir001 - file0001.jpg ... - file9999.jpg dir002 - file0001.jpg ... - file9999.jpg ... dir070 - file0001.jpg - ... - file9999.jpg The files mostly have EXIF Data, but sometimes there are Files without metadata. Now I hope to be able to sort and rename these files into folders based on the date: 1999 - 1999 01 31 - 1999_01_31_-_22_59_59.jpg 2000 - 2000 05 20 - 2000_05_20_-_21_59_59.jpg - 2000_05_20_-_22_59_59.jpg I figured Applescript/Automator might come in handy for this, however every other solution would be welcome, too!

    Read the article

  • Can you resize all mac windows at once? (e.g. when docking)

    - by Ian Varley
    I've recently bought a Henge Dock, and like the ability to plug my MacBook in and instantly reconnect to all my peripherals (external monitor, keyboard, mouse, etc.). The only problem is that when I dock or undock, all of my windows are left at the wrong size (either too big or too small) and I have to manually resize them, one by one. Not the end of the world, but ... isn't there an easier way? I've seen Cinch and Sizeup, but they seem to only work on one window (the current app). I looked at the Automator as a possible way to do this, but it didn't seem to have any window operations. I also tried the AppleScript listed here, but it put the windows in wacky places.

    Read the article

  • Bind a key to a commandline command in Mac OS X?

    - by Stefan Lasiewski
    I have a Mac Powerbook running Leopard (10.5.8). Does Leopard provide an easy way to bind keys to commands which are typically run on the commandline? For example, I can open up Terminal.app and run the command /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine which will activate the screensaver and lock my screen. What if I want to bind 'Apple-key L' to this command and execute this globally, regardless of which application is in use at the moment? Can I do this, or can I only run ScreenSaverEngine from a Terminal window? I tried to set up global keyboard shortcuts, but it seems that this won't allow me to bind a key to an arbitrary shell command: Note: You can create keyboard shortcuts only for existing menu commands. You cannot define keyboard shortcuts for general purpose tasks such as opening an application or switching between applications. I tried to set up a application keyboard shortcut, but commands like ScreenSaverEngine don't seem to be an application. Note that this Screensaver/Lock screen is just one example. I have come across other nifty commands which I might want to bind to a key-combination as well. I can do this in Gnome and Windows (with varying success). How about with Leopard? Should I be looking at doing this with AppleScript? (I haven't used that since the Hypercard days ...)

    Read the article

  • Find missing birth days in Apple Addressbook

    - by Felix Ogg
    I am trying to clean the holes out of my Mac address book. As a first step I want to ask all my friends for their birth day, to be able to congratulate them with cheesy Hallmark cards. I need a "group" in my address book, to mailmerge personalized messages from. This is the Applescript I came up with: tell application "Address Book" make new group with properties {name:"No Birthday"} set birthdayPeople to (get every person whose birth date is greater than date "Monday, January 1, 1900 12:00:00 AM") repeat with i from 1 to number of items in people set thePerson to item i of people if not (birthdayPeople contains thePerson) then add thePerson to group "No Birthday" end if end repeat save end tell It breaks, but from the error messages I cannot deduce what is wrong: Result: error "Can’t make «class azf4» id \"05F770BA-7492-436B-9B58-E24F494702F8:ABPerson\" of application \"Address Book\" into type vector." number -1700 from «class azf4» id "05F770BA-7492-436B-9B58-E24F494702F8:ABPerson" to vector (BTW: Did I mention this is my first AppleScript code, EVER? So, if this code can be simplified, or made more elegant, that is welcome too.)

    Read the article

  • Creating a variable-speed slideshow based on USB input on OSX.

    - by Dave A
    I have a friend who is trying to put together a geeky little contraption for a wedding, where people can view a slideshow. Neither of us use Macs, nor have programmed for one, but for various reasons it has to run on a Mac. There will be a USB ammeter hooked up to a bike dynamo. What we want is for a slideshow to be run, and advance at a speed relative to how fast someone is pedaling on a stationary bike. After much googling, it seems like we could load an iPhoto slideshow up via applescript. Is it possible to pause the slideshow and advance it with keypress commands? The applescript commands would be run via a bash script or similar that would monitor the value returned by the USB ammeter's command-line app and issue the keypress events accordingly. Is there some other app that could be likewise scripted to display photos?Hoping someone has some hints to get us started in the right direction! Thanks!

    Read the article

  • Track kids browsing history even when they know how to clear it manually

    - by Darren Newton
    I have a colleague with two teenage boys (yes, cue cliche's about 'I have this friend see...') He's currently having issues with them browsing pr0n and wants to do a little spying on their browsing (I'm staying clear of the philosophies/ethics on this.) The kids are savvy enough to clear their browsing history when they're done. As I'm his goto for IT he has asked me if there is a way to keep a hold of the browsing history. The family uses Macs, and the kids surf with Safari. I know that browsing history is kept here ~/Library/Safari/History.plist. I figure there should be a way to write either an AppleScript or other script (Python/Ruby/Bash) that can backup this file to a different location (/opt/local/history, etc.) Since the kids know to clear their history when they're done should the file be periodically backed up with something similar to a cron job or something like Hazel? While that could work it seems like it would create a ton of little incremental backups. Or is it possible to 'watch' ~/Library/Safari/History.plist and incrementally add changes to a backup file (saving a diff so to speak) but not lose any data? Any ideas/solutions appreciated. UPDATE/EDIT: Got the word from concerned dad that the oldest uses Firefox on a different PC, so the OpenDNS solution (preferably at the router level) is the best answer so far as it would capture usage for the whole house.

    Read the article

  • Changing window focus on OS X

    - by MatsT
    As part of an InstallationCheck script on OS X I need to use finder dialogs to let the user browse for files. When I'm done I want to move the installer application up front again so that the user can easily continue with the installation. I have already tried the simple: tell application "Installer" to activate This does not work because as long as I am inside the script the Installer application is unresponsive and when i try to activate it the applescript will try to wait until Installer responds, effectively locking the program until the InstallationCheck script times out. So basically I need a way to focus an application that works even if it is currently unresponsive. Is there any way to do this either from an applescript or directly from the perl script?

    Read the article

  • Multiple Apps Possible via Launch Services, want to Specify Particular One

    - by Andrew
    Here's the issue: I have a list of App names that I want to launch. They do not include a path (e.g. {"VLC","Microsoft Word"}. I have two different copies of VLC in different directories. I would like Launch Services to ONLY open the one from /Applications/ and not EVER launch from /Applications/AnotherDirectory I want to get the path of these, and test to see what Launch Services wants to launch (via bash with "open" or applescript via "tell _ to launch" or [NSWorkspace launch...]) The only way that I have come up with to test the path of a file about to be launched by launch services is: Applescript: tell application "Finder" to return the (posix path of (path to application "VLC" as alias)) That works fine, but launches the app (which I don't want at all). Suggestions?

    Read the article

  • Add an item to the Finder/Save dialog sidebar

    - by Clinton Blackmore
    I'm working on a script where a user logs into a guest account on OS and is prompted for their network credentials in order to mount their network home folder (while they benefit from working on a local user folder). As the guest folder is deleted when users log out, I want to discourage them from saving anything there. I would like to replace the items on the Finder and Open/Save sidebar lists (such as "Desktop", username, "Documents", etc) with ones that would save into their network home folder. It is possible to do this using AppleScript or Cocoa APIs, or do I need to modify a plist and restart the Finder? [Ack. Looking into ~/Library/Preferences/com.apple.sidebars.plist, it isn't at all clear how I'd populate it.] Similar Questions: AppleScript: adding mounted folder to Finder Sidebar? suggests using fstab; this code will most likely run as a user and really, automounting at that point would be too late. How do you programmatically put folder icons on the Finder sidebar, given that you have to use a custom icon for the folder? Says there is no Cocoa API, but that you can use a carbon-style LSSharedFileList API that is only documented in a single header file. Does anyone know of some example code to add an item to the Finder sidebar?

    Read the article

  • How to start / stop internet sharing using apple script

    - by jon
    i dont have a wifi router, so when at home i need to turn my laptop into a wifi source so that both myself and my partner can access the internet. however during the days i work at a coffee shop and require the use of their wifi. i'm running snow leopard and i find it stupidly cumbersome to constantly be turning off and on, first internet sharing and then my wifi. any ideas for a quick n dirty applescript solution? thanks a bajillion! Jon

    Read the article

  • pyobj access to iTunes application

    - by jldupont
    Let's say I managed to get the dictionary opened for iTunes in the Applescript editor: How would I access the "search" commands using Python with pyobjc? I know I get can hold of the iTunes application using: iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes") but after I do a dir on it, I don't see the search command in the returned dictionary. Help please!

    Read the article

  • Tell system events to keystroke in Xcode?

    - by user354779
    Hello, I'm making an application, in which I need to run a code that will tell system events to keystroke a certain phrase. Like in an AppleScript, I would do: Tell Application "System Events" to keystroke "This is a test" I don't know how to do this from Xcode, and I would really appreciate any help. Thank you!

    Read the article

  • programmatically updating iTunes track location

    - by Ben Clifford
    I would like to modify the filesystem path for tracks on itunes programmatically, so that I can apply a string transformation to some of the tracks locations (which are now stored in a different places on the filesystem). I've tried using AppleScript to update the location property of the relevant tracks but I get an end-of-file error when calling "set mytrack's location to ..." I've seen various other hacks online that involve exporting the entire track db, modifying it in XML, and then reimporting it - but that seems to lose too much metadata (such as playlists).

    Read the article

  • Getting line by line in Apple Script from Address Books Note Field

    - by Axwack
    I have two lines in my address book's note field Test 1 Test 2 I would like to get each line as a separate value or get the last line from the notes field. I tried doing it this way: tell application "Address Book" set AppleScript's text item delimiters to "space" get the note of person in group "Test Group" end tell but the result is {"Test 1 Test 2"} I'm looking for : {"Test1","Test2"} What am I doing incorrect?

    Read the article

  • Applescipt to find events in iCal

    - by guglio
    Hi, I'm new to the world of Applescript! I'm trying to figure out how to find into a specific calendar events that contains certain words. In particular, I don't know how to make a repeat that find certain word in the calendar's events... Thanks in advance

    Read the article

  • What's wrong with this "if"?

    - by Gurzo
    Hello, I'm currently trying to make an AppleScript which should recognize the selected file in Finder and do the relative command in Terminal. Everything was going fine since I reached the part where it should define the language of the selected file: it just doesn't check the ifs. I checked if it writes fileExtension correctly (via return) and it does. Here is the Gist with the code, any help would be appreciated. Thanks

    Read the article

  • Logout user script

    - by Baconlove
    I am trying to create a script in ARD that will let me logout a user. Now I have a script which does start the logout, but I want it to execute instead of waiting 60 seconds. The script currently is: osascript -e 'tell application "System Events" to log out' As I said, this works but then I want it to press return on the logout dialog. The script I tried to make it do that is: osascript -e 'tell application "System Events" to log out' -e 'keystroke return' which doesn't work. Is there a way, possibly by telling the system to press Cmd+Opt+q, then Enter, to log out without waiting for the timeout to expire?

    Read the article

  • Mail.app send mail hook

    - by Charles Stewart
    Is there any way to run a script whenever the user tries to send mail? I'm particularly interested in ensuring that outbound mail doesn't have a blank subject line. Solutions that involve plug-ins are welcome!

    Read the article

  • Mac OS X CD ripping speed

    - by SlimSCSI
    I am using vobcopy (installed via macports) to rip DVDs on a mac. I have been doing this for a while on linux with no problems. On the mac however, it is VERY slow. I am guessing that somehow the DVD drive is being limited to 1x in order to keep noise and power consumption down during playback. Is there a way to over ride this? Update: It is MUCH slower than 1x. It has taken me about an hour to copy 300MB Notes: While I appreciate all suggestions, I am not looking for "Have you tried HandBrake?". I am looking for a solution to copy the contents of a DVD, not transcode them. Also, I am launching vobcopy from an apple script that gets executed on DVD insertion, so a GUI solution is not desirable.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11  | Next Page >