Using applescript to open a folder with a keyboard shortcut

hello -
i have a rather simple question (probably). is there a way using applescript to create a keyboard command to open a folder? i.e. command shift a opens the applications folder and command shift u opens utilities. can i use applescript to designate a keyboard command to open a folder i have created? also, the script editor does not have to be open for me to utilize scripts, correct?
thanks for your patience with a newbie.

You can't make a keyboard shortcut to run a specific application from OSX, although there are third party applications such as Quicksilver that can do things like that. You can use an AppleScript to activate an existing menu item, for example:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into the Script Editor">
tell application "Finder" to activate
tell application "System Events" to tell application process "Finder"
keystroke "A" using {shift down, command down}
end tell</pre>
Other alternatives to keyboard shortcuts are to use the Scripts Menu or add an application to the Finder's toolbar. The Script Editor does not need to be active to use scripts.

Similar Messages

  • Open a website with a keyboard shortcut.

    Hello,
    Is there a way to open a website (in a new tab) with a keyboard shortcut.
    For example, use Alt+X to open google.com and Alt+V to open gmail.com
    Thanks in advance

    I can't think of a built-in way to do this.
    The closest feature that comes to mind is the keyword feature. When you view the properties of a bookmark, you will find a keyword field. You can enter one or more characters. Hypothetically, let's say you assign 1 to [http://www.dilbert.com www.dilbert.com]. This would lead to the following possibility:
    * Same tab: Ctrl+L, 1, Enter
    * New tab: Ctrl+T, 1, Enter
    We're definitely not down to one keypress... You might find an existing add-on that has can do that, or you could conceivably create a userscript for it (userscripts can globally on all regular websites, but may not work on internal page such as the built-in home page or new tab page for security reasons).

  • Opening an App with a keyboard shortcut

    Hello all,
    I am new to this OS, though I have dabbled in linux distros and thus have become infatuated with the terminal.
    How do I set a keyboard shortcut to OPEN a terminal window. I do not want to set a keyboard shortcut to execut once a terminal window is already open.
    I guess I could start terminal at boot and let it run in the background but it seems an solution lacking any elegance and would take up ram and processor resources.
    Any ideas for a noob?
    thanks
    -E

    Hi. Welcome to Apple Discussions.
    You can set Terminal as a Login Item in System Preferences >> Login Items, the resources it uses are miniscule. Or drag Terminal.app to the Dock so you can launch it with a mouse click.
    There also <a href="http://docs.info.apple.com/article.html?artnum=75459"">keyboard shortcuts you try</a> and <a href="http://docs.info.apple.com/article.html?artnum=304759">Automator to write scripts.
    Hope you find something that works well for you.
    -mj
    [email protected]

  • When i use view as list in finder and open a folder with many files i cant right click with mouse without selecting or highlighting a file....i just want to right click to paste an item or create a new folder...what can i do?

    When i use view as list in finder and open a folder with many files i cant right click with mouse without selecting or highlighting a file....i just want to right click to paste an item or create a new folder...what can i do?

    Thx for that im gonna try it....but is there a way to do it without using toolbar or cmd-c...? i mean using only the mouse?why does it have to highlight the file even though i click a bit next to it....?using icon view i can right click next to the folder and i wont have a problem but with list view that i prefer using it will highlight the whole row.....and i dont find free space to right click cause i got many files

  • Opening a folder with an application in one click, and automating Terminal

    A forum member kindly recommended I move a question from 'Mac OS X Leopard' to this sub-forum as it was more appropriate to Unix:
    Firstly, is it possible to create a desktop/dock icon (or perhaps a Safari or FireFox bookmark) that opens a folder with a certain application? I'm doing a lot of web development and hoping to create handy buttons for opening up entire folders (Ruby on Rails projects) with only one click. At the moment, I have to find the folder and drag it to the textmate icon; if I had a 'open in textmate' button, that would make my work so much quicker, as I'm often changing between projects. It would be even better if I could have the button as a bookmark in my browser (where I spend most of my time).
    Secondly (probably related to the first question), is it possible to automate a process I follow every time I open up a Ruby on Rails project in Terminal (?);
    1. Load Terminal by clicking on the icon in the dock
    2. 'cd sites/rubyonrailsapp' (where 'rubyonrailsapp' is the rails application I want to load)
    3. 'mate .' (opens the entire /rubyonrails/ folder in TextMate)
    4. 'CMD + T' (to open up a new Terminal tab)
    5. 'gitk --all &' (to open up the Wish version control interface for the rails application)
    6. 'autotest' (to runs the tests in the rails application)
    7. 'CMD + T' (to open up another new Terminal tab, ready for me to use)
    If I could follow those steps with only one click, that would be amazing, so any suggestions are much appreciated (I just realised how many times-per-day I'm typing these commands).
    Cheers

    you can try this applescript. just copy it into the Script Editor and save it (1) as a script application that you can double-click, or (2) as a script that you can run from the script menu or quickkeys or etc. may need some tweaking...
    <pre class="jive-pre">tell application "Terminal"
    set cmd to "cd sites/rubyonrailsapp; mate ."
    do script cmd
    activate
    end tell
    tell application "System Events"
    keystroke "t" using command down
    end tell
    tell application "Terminal"
    set cmd to "gitk --all & autotest;"
    do script cmd
    activate
    end tell
    tell application "System Events"
    keystroke "t" using command down
    end tell</pre>
    to solve your other question, you'll probably need to script textmate. something like:
    <pre class="jive-pre">tell application "TextMate"
    open alias "path:to:folder"
    end tell</pre>
    I don't have textmate to test it on, however.
    sorry it's not a unix solution, but the task you're trying to accomplish fits better with applescript.
    Message was edited by: twtwtw - sorry, wrong quote style...

  • Opening a folder with an application in one click, and automating a process

    Firstly, is it possible to create a desktop/dock icon (or perhaps a Safari or FireFox bookmark) that opens a folder with a certain application? I'm doing a lot of web development and hoping to create handy buttons for opening up entire folders (Ruby on Rails projects) with only one click. At the moment, I have to find the folder and drag it to the textmate icon; if I had a 'open in textmate' button, that would make my work so much quicker, as I'm often changing between projects. It would be even better if I could have the button as a bookmark in my browser (where I spend most of my time).
    Secondly (probably related to the first question), is it possible to automate a process I follow every time I open up a Ruby on Rails project in Terminal (?);
    1. Load Terminal by clicking on the icon in the dock
    2. 'cd sites/rubyonrailsapp' (where 'rubyonrailsapp' is the rails application I want to load)
    3. 'mate .' (opens the entire /rubyonrails/ folder in TextMate)
    4. 'CMD + T' (to open up a new Terminal tab)
    5. 'gitk --all &' (to open up the Wish version control interface for the rails application)
    6. 'autotest' (to runs the tests in the rails application)
    7. 'CMD + T' (to open up another new Terminal tab, ready for me to use)
    If I could follow those steps with only one click, that would be amazing, so any suggestions are much appreciated (I just realised how many times-per-day I'm typing these commands).
    Cheers

    Thanks
    Here's the new post;
    http://discussions.apple.com/thread.jspa?threadID=2070033&tstart=0

  • Firefox 'opens containing folder' with...

    ...Leafpad here, which of course does not always helps /-}
    Arch Linux x86_64, Firefox, i3 window manager. Up to date.
    For an user and two profiles, the Mozilla browser opens "containing folder" with Leafpad (on both profiles). While for the other users Thunar is used.
    Opening directories with a file-manager is desired (slightly more than with leafpad /^o). I most surely overlooked something and would appreciate if someone would see where : }
    Hunting the forum allowed me to try e.g.: FrozenFox's solution, but I couldn't make it work:
    Editing /usr/share/applications/mimeinfo.cache AND ~/.local/share/applications/mimeapps.list
    user1 and user2 mimeapps.list's diff
    - Using perl-file-mimeinfo
    Assigning directories to Thunar as per the Wiki
    $ mimeopen -d [FOLDER]
    I made no change this way.
    - Using xdg-open
    I replaced busking-git with xdg-utils
    $ xdg-mime query inode/directory
    xdg-mime: unknown query type 'inode/directory
    $ xdg-mime default Thunar.desktop inode/directory
    $ xdg-mime query inode/directory
    xdg-mime: unknown query type 'inode/directory' !?
    Even if 'inode/directory=Thunar.desktop' is added to ~/.local/share/applications/mimeapps.list
    Note I get "unknown query type 'inode/directory" on both users' profiles.
    Moved USER1's Firefox's 'mimeTypes.rdf' away, relaunched the browser but the 'opens containing folder with...' issue stands still.

    Awesome
    Thanks for that hint. This solves my problem:
    http://antix.freeforums.org/iceweasel-o … t4016.html
    I add the following line to .local/share/applications/mimeapps.list :
    [Default Applications]
    inode/directory=spacefm.desktop

  • How do I use Automator to duplicate a folder with graphics on my desktop and erase their Resource forks?

    How do I use Automator to duplicate a folder with graphics on my desktop and erase their Resource forks?
    I do not use command line and tried to use ZapResourceForksAMAub_1.2 which I downloadedand instaled the Zap Resource Forks.action. Next I tried to use their sample copy-zap-rsrc.workflow in Snow Leopardon my Mac Pro. The 3 different steps are displayed in Automator but there is no place to put in which folder (on my deskto) to copy, and remove the resource forks from the graphic files.
    Can sombody please step me through this please please.
                                                                                          W.W.

    Unfortunately, Back to My Mac only works across computers using the same iCloud account.

  • Can I-Photo Events be closed with a keyboard shortcut ?

    If I open an event or events containing, for example, 100 photos, can I close that event without scrolling to the top and clicking the delta arrow?
    Can I close all open events with a keyboard shortcut?

    When I open an event, the "All Events" arrow is always visible at the top of the window. No need to scroll. So, I'm kind of confused. However, you can hit Tab which will move the focus to the library list, selecting Events. Arrow down to photos and then back to Events. Tab again to move focus the the events pane.

  • ..manage the volume of each Airtunes speakers with an Keyboard Shortcut??

    Hi,
    I´m using Airtunes together with two Airport Express.
    How can I change the volume from only one Airtunes speaker separately with a Keyboard-Shortcut?
    Is there a shortcut?
    greetings

    I don't know of any keyboard shortcuts for this. It is a new feature of iTunes 10. Remote (iTouch/iPhone) doesn't allow this kind of control so I don't know what you can do other than to VNC into your Mac and change the settings manually via iTunes. Hopefully someone else will know

  • Why can´t I take a step back with the keyboard shortcut, cmd + ö, it was possible before, now you have to go to the bar at the top and "go back one step." I ha

    Why can´t I take a step back with the keyboard shortcut, cmd + ö, it was possible before, now you have to go to the bar at the top and "go back one step." I have Mac-systems, I also have mouse elbow, and do not want to use the mouse too often.

    This article lists some other options for "Back" navigation. Do any of them work for you?
    [[Keyboard shortcuts - Perform common Firefox tasks quickly]]
    Note: if you are not shown Mac keyboard combinations in knowledge base articles, scroll down a bit and look for something like this in the right column:
    ''Article is for:''<br>
    + Windows<br>
    + Firefox 14
    Click Windows to change to your OS.

  • Lasso tool control point with delete keyboard shortcut in PS CC

    Hello,
    I can not remove lasso tool control point with delete keyboard shortcut in PS cc. please help

    it's a bug, view this thread
    http://forums.adobe.com/message/6027062#6027062

  • How am i able to focus the "To Do Items" in ical with a keyboard shortcut?

    How am i able to focus the "To Do Items" in ical with a keyboard shortcut?
    I tried Tab and of course it doesnt work. Is there another way, besides from creating a new "Todo" and deleting it?

    iOS: Troubleshooting Messages
    iOS: Troubleshooting FaceTime        
    iOS: Troubleshooting FaceTime and iMessage activation
    FaceTime, Game Center, Messages: Troubleshooting sign in issues

  • Using applescript to open "any" images in an specified application?

    I want to use applescript as part of a workflow in Automoator.
    Automator already takes care of the renaming and resizing of my pics.
    Then I want applescript to take each pic that I throw at it and apply it to an image optimizer application I have.
    I've looked all over gooel and I can' find anything.
    Everyscript I see has a specific file name or folder.
    I want applescipt to take a file with any name and launch "ImageOptim" and open the file with ImageOptim.
    This app is a drag and drop app, just drop your pictures on the window or on the icon and it'll optimize your pics on the spot. It doesn't create a new file, the file itself is changed.
    And that's it.
    I had this but it doens't work
    set this_file to choose file without invisibles
    try
              tell application "Finder"
      activate
                        open application file "ImageOptim.app" of folder "Applications" of startup disk
                        set this_image to open this_file
              end tell
    end try
    Thanks for the help.

    Red's already shown you one solution, but your script has multiple errors and it's worth clarifying them
    set this_file to choose file without invisibles
    OK, nothing wrong with this line
              tell application "Finder"
      activate
    There's no need to activate the Finder to perform this task. The Finder's quite happy to run in the background.
                        open application file "ImageOptim.app" of folder "Applications" of startup disk
    This opens the application.
                        set this_image to open this_file
    This would open this_file - except that this command is completely independent and disconnected from the previous command - in other words you're just telling the Finder to open the file, it doesn't care about what other commands you might have asked it to run previously.
    The solution is to tell the Finder to open the file using the specific application you want.
    Another option may be to eschew the Finder altogether, and just tell the app to open the file:
    set this_file to choose file without invisibles
    tell application "ImageOptim" to open this_file

  • How to use applescript to open speech calibration window

    I am having a problem with applescript.  I am trying to open the speech calibration window in System Prefrences using applescript.  I am really bad at GUI Scripting.  I don't know if there is some other way to open the window, but I would like to have it appear when the user clicks a button.  I am using Xcode ApplescriptObjC, but I don't think that matters.  Could someone show me a script that opens the accessibility (or universal access) pane, click speakable items, then the "calibrate" button.

    Another way to do this in Captivate 3, to open new window
    using javascript with multiple files:
    Create button and choose Execute Javascript:
    Click the "..." button and type command using the following
    format:
    JavaScript:mynameLaunch();
    ["myname" is the name of the javascript function in relation
    to the file you want to open]
    Publish the Cp file.
    Copy the file to be opened over to the root of the htm file
    folder (for this example "myname.pdf").
    Place the below javascript in the head of the main htm file
    after publishing.
    <head>
    <script src="standard.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    function mynameLaunch(){window.open("myname.pdf",
    "","toolbar=no,location=1,top=50,left=50,status=no,menubar=no,scrollbars=yes,resizable=ye s,width=400,height=575");
    </script>
    </head>
    Test on a web server.

Maybe you are looking for