How to set a keyboard shortcut for open with VLC player

Hey everyone!
I have reffered the earlier discussion upon creating a shortcut for the open with function and the below is the correct answer for it by using applescript editor submitted by Barney. However, I couldn't get past the 1st paragraph. It all just went over my head. Especially the "open (thefilelist) " part. Which filelist is being referred to here? All I want is a shortcut for opening files with .avi, .mpeg, and .3gp exts. with VLC player. Please help me out by providing the exact stuff I need to paste in the applescript.
Thanks
Ok, this one works both on the finder selection and as a droplet:
property htmlList : {"htm", "html"}
property htmleditor : "TextWrangler"
property textList : {"txt", "text"}
property texteditor : "TextEdit"
--property myappextlist: {"ext1","ext2","ext3"}
-- property myappsname: "myAppName" on run
tell application "Finder"
set the fileList to the selection
repeat with aFile in fileList
set theFile to aFile as string
my myOpen(theFile)
end repeat
end tell
end run on open (thefileList)
repeat with i from 1 to number of items in thefileList
set this_item to item i of thefileList
my myOpen(this_item)
end repeat
end open on myOpen(aFileAlias)
set theItemInfo to info for (alias aFileAlias)
if not folder of theItemInfo then
set theExtension to name extension of theItemInfo
if theExtension is in htmlList then
tell application htmleditor
open aFileAlias
activate
end tell
end if
if theExtension is in textList then
tell application texteditor
open aFileAlias
activate
end tell
end if
-- if theExtension is in myappextlist then
-- tell application myAppName
-- open this_item
-- activate
-- end tell
-- end if
end if end myOpen

Luds.R wrote:
I have reffered the earlier discussion
I have the feeling of dropping in in the middle of the conversation.
Anyway, try this
--script begins
property myVLC : "/Applications/VLC/VLC.app"
property myTypes : {"avi", "mpeg", "mpg", "3gp"}
on run
          my vlcTest(myVLC)
          tell application "Finder" to set fileList to selection
          my vlcOpen(fileList)
end run
on open fileList
          my vlcTest(myVLC)
          my vlcOpen(fileList)
end open
on vlcTest(myVLC)
          try
  POSIX file myVLC as alias
          on error
                    display dialog "Sorry, could not locate VLC. Please add the correct POSIX path to the script." buttons {"Cancel"} default button 1
          end try
end vlcTest
on vlcOpen(fileList)
          tell application "Finder"
                    repeat with i in fileList
                              if name extension of i is in myTypes then open i using (POSIX file myVLC)
                    end repeat
          end tell
end vlcOpen
--script ends

Similar Messages

  • How to set mac KEYBOARD shortcuts (for mac OS and windows OS)

    i am having a bit of an issue.
    i run windows 7 and mac os on the same computer on different hard drives in this computer. i also have a "mac" keyboard. i am not sure how this may be different from a "windows keyboard" but the point is i need to use this keyboard because it matches the one on my laptop which is a mac.
    when i switch to windows on this machine i always end up deleting information because the CMD + X and CMD + V cut and paste shortcuts on Mac OS are not the same in windows. windows requires (currently) CTRL + X and CTRL + V. so when i got to cut and paste in windows CTRL + X (this is my habitual way of working) and then i run a CTRL + V i end up writing /over/ the text i selected with a "x" and i end up pasting /over/ the text i selected to paste over with a "v". this is because instead of running a cut and paste, this set of shortcuts in windows simply enters "x" and "y" respectively since the shortcut is not active.
    does anyone know where i set these in windows OS and in mac OS?
    also, does anyone know if it is possible to set how many UNDOS i can do in either of these OS's or to know how many i can in fact undo?
    THANKS
    long story background:
    1. while i may move to a windows keyboard on the computer i am using (because the mac keyboards these days end up losing keys and they end up very wobbly) i cannot do this for the laptop machine so this may not make a lot of sense if i end up also running windows on the laptop which is my intention at some point.
    2. CTRL + X is a very long stretch on the mac keyboard so rather than switching mac shortcuts to accommodate windows shortcuts i am thinking to switch windows shortcuts to mac ATM.
    3. this is no small issue! i just went to copy and paste this text so i could save it for myself in order to explain to someone else and i ended up overwriting with a "c". if i had not thought fast and remembered to UNDO by hitting CTRL - X and not CMD - X i might have lost all my work.

    You don't necessarily need netcfg to get networking. But I used it before for my wireless on my laptop, so I just used the same on my desktop too. Also if you want to do things like this its easier rather than have to go digging around with macspoof and what not. your netcfg eth0 file could be something like
    PRE_UP='ip link set eth0 address XX:XX:XX:XX:XX:XX'
    CONNECTION='ethernet'
    DESCRIPTION='A basic dhcp ethernet connection using iproute'
    INTERFACE='eth0'
    IP='dhcp'
    If you use a different interface then obviously, you need to change it accordingly

  • Web links open with VLC player

    For some strange reason my machine has decided that links in emails must be opened with VLC player and not my web browser. I deleted VLC and it worked fine. Re-installed VLC and it worked fine for a few days. Now it seems to think VLC is the program to use again. I am sure there is an easy fix but don't know what it is. Please help.

    Hey Niel. I tried that, no luck. I deleted VLC and reinstalled it and all seems to be going well at the moment but that is what I tried a few days ago and it works for a couple of days and then switches back to using VLC. Very weird.

  • How do I set the keyboard shortcut for zoom tool to be r-clicking the mouse?

    I want to have the r-click of my mouse be the zoom tool like in Quark Xpress. Can I make the Z shortcut to choosing the Zoom tool instead a r-click? I know how to get into keyboard shortcuts - just dont know what to type in for the new shortcut to make it a r-click. right now its 2 steps to zoom rather than in quark 1. not that I want to go back. lol.
    also, while were talking about migration differences and extra steps, is there a way I can hide guides and set overprint preview in one step? (this is something I do often and was just a simple F7 in quark)
    so these are just 2 things that take 2 steps in ID but one in quark. not that I want to go back. lol

    OK, I've been doing this since CS2 with no need for a script. To hide guides and show preview...
    1) Go to 'Keyboard Shortcuts'
    2) Go to 'Product Area - Tools'. Yes, you'd think it would be in Views! But the buttons for this is at the bottom of the Tool Bar.
    3) Go to 'Commands: Toggle view setting between default and preview'
    4) Click your cursor inside 'New Shortcut' and hit the key you want or type it in. I choose the unused F2 key
    5) Click the 'Assign' button and you are set. Hit the key to switch back and forth.
    As for your mouse Zoom, use Power Zoom as described above or just hold down the Alt/Option button in 'Hand' mode and use the scroll wheel to zoom in and out. Not one step but it works!
    Now you won't miss Quark at all!

  • How do I set a keyboard shortcut to open a new terminal window?

    Service -> Keyboard Shortcuts allows me to open the first one, but I would like a keyboard shortcut to open new windows as well.

    Hi Raymond,
    Terminal already has a keyboard shortcut to open a new window (Command + N).
    gl,
    kel

  • Disable Keyboard Shortcut for Open Adobe Bridge

    Is there a way to disable the keyboard shortcut which opens Adobe Bridge from Illustrator? Often when I'm working quickly I accidentally hit this (option command o) instead of (shift command o) to outline type. It halts everything to open Bridge, which I never use, and drives me crazy. Is there any way to disable this command?
    Any help would be greatly approciated!!

    Go to Edit > Keyboard Shortcuts > Menu Commands > File and remove or modify the default shortcut for Bridge.

  • Keyboard shortcut for opening mail messages

    i'd like to be able to open email messages using a keyboard shortcut. i suspect i'm being thick, but I can't seem to find a way to do that. (i tried the keyboard shortcut function in system preferences, but because there is no "open" menu command, I couldn't create a shortcut.) Much obliged for any help.
      Mac OS X (10.4.8)  

    I too would be interested in a keyboard shortcut to open new email messages. Do any of you Mail pros have an idea to help us out with this?
    Thanks!

  • Hello Sir. This Is Nilesh B.Desai From India. Our Clients Need is Picture Should Not Be Download So How Can We Disable Keyboard Shortcut For That Website Only.

    Hello...
    We are In the Business Of developing Website and Software.. We Are facing A problem Regarding Download. Our Clients need is not to download or print a single picture from website. so need help how can i disable download or print by using keyboard or with use of mouse.. so need to block all keyboard shortcut for such website only.. so if it is possible then please help us. we will great thankful to you..
    thanking You.
    Nilesh Desai
    Marketing Executive
    WiseCom Technologies Pvt.Ltd.
    Amadpore , Navsari, India

    No, Firefox is user choice rules over the "wants" of individual websites as far as disabling contextual menus and the keyboard commands.
    Placing a transparent image over the image will keep the less technical user from saving the main image. If they do try to save it all they'll get is the transparent image overlay.

  • How to make a keyboard shortcut for this character: ⌘

    I am growing very fond of the Character Palette, but there are some characters I like to use allot, and it's becoming a nuisance opening the whole window just to insert a ⌘. I was thinking maybe there is a way to make a keyboard shortcut for this character, just like option-shift-K creates . I opened the keyboard viewer and was thinking maybe I could drag the character into an empty space to create a combo...but it's not letting me. Is there any way to do this?

    This is a feature Apple should definitely add customization to on OS X.
    You can make custom keyboard layouts that include any characters you want using Ukelele.
    http://scripts.sil.org/cms/scripts/page.php?siteid=nrsi&itemid=ukelele
    I doubt Apple is going to incorporate this into OS X, but you can suggest it here:
    http://www.apple.com/feedback/macosx.html

  • Is there a keyboard shortcut for Opening the Channels Panel?

    I've googled, searched discussions, and tried recording actions but haven't found the solution.
    What I'd like is a simple keyboard shortcut to open the Channels panel.
    That's it.
    I can create and run actions that create, delete, or move channels; use the menu or channels tab to open it -- but I can't seem to find a way to use a keystroke combination to open the channels panel like you can do for the layers (F7) or actions (F9) panels.
    Anyone have an idea?
    Thanks!
    -Bonnie

    Thank you!
    Sometimes things are just simply right in front of you without being seen.
    The solution was spot on. I'd somehow not 'seen' the "Application Menu" drop-down in the keyboard shortcuts dialog box.
    Now back to post-processing!
    Thanks again.
    - Bonnie

  • How to set default file type for Open dialog

    Dear my friends,
    I am using "At selection-screen ON VALUE-REQUEST FOR filepath" to display open dialog and i want to set default file type for open dialog = *.txt.
    Thank your times !

    Hello,
    U can make use of this code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SP_FILE.
      PERFORM SAVE_DIALOG CHANGING SP_FILE G_F_RC.
    FORM SAVE_DIALOG CHANGING PO_FILE PO_RC.
      DATA: L_VA_BOXTITLE     TYPE STRING,
            L_VA_DEFAULTFILE  TYPE STRING,
            L_VA_DEFAULTNAME  TYPE STRING,
            L_VA_DEFAULTPATH  TYPE STRING,
            L_VA_DEFAULTFULL  TYPE STRING,
            L_VA_FILTERTEXT   TYPE STRING,
            L_VA_CODE         TYPE I.
      CLEAR: PO_RC, G_F_CONF.
      L_VA_BOXTITLE   = TEXT-B01.
      L_VA_FILTERTEXT = TEXT-B02.
      IF PO_FILE IS INITIAL.
        CLEAR L_VA_DEFAULTFILE.
      ELSE.
        L_VA_DEFAULTFILE = PO_FILE.
      ENDIF.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
        EXPORTING
          WINDOW_TITLE            = L_VA_BOXTITLE
          DEFAULT_EXTENSION       = 'TXT'
          DEFAULT_FILE_NAME       = L_VA_DEFAULTFILE
          FILE_FILTER             = L_VA_FILTERTEXT
          INITIAL_DIRECTORY       = 'C:SAPWorkdir'
        CHANGING
          FILENAME                = L_VA_DEFAULTNAME
          PATH                    = L_VA_DEFAULTPATH
          FULLPATH                = L_VA_DEFAULTFULL
          USER_ACTION             = L_VA_CODE
        EXCEPTIONS
          CNTL_ERROR              = 1
          ERROR_NO_GUI            = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        PERFORM CHECK_ERRORTYPE(Z48M_MATDATA_UP) CHANGING SY-MSGTY.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        CLEAR PO_FILE.
        EXIT.
      ENDIF.
      IF L_VA_CODE NE 0.
        MESSAGE S818(3F) WITH TEXT-011.
        CLEAR: PO_FILE, PO_RC.
        EXIT.
      ELSE.
        WRITE L_VA_DEFAULTFULL TO PO_FILE.
        G_F_CONF = G_C_XFELD.
      ENDIF.
    ENDFORM.                    " save_dialog
    If useful reward.
    Vasanth

  • Is there a PC-Style Keyboard Shortcut for Opening the CD ROM Draw?

    Hello
    I was trying to use a USB PC-Syle keyboard with my G3 Blue & White, and was wondering if there was a Keyboard Shortcut on the keys to open the CD ROM draw?
    It apparently won't open manually .... and of course if it were an Apple Keyboard, then it would naturally have a key for that function.
    Thank you
    Mike

    Hi, Mike -
    OS 9 does not have such a key, per se (I think F12 works only in OSX). The button on the front of the drive should work whenever the tray is empty; if there is a disk in the drive, either drag the disk to the Trash or select it and use Command-Y (Put Away in the File menu).
    You can add a hot-key fairly easily.
    • One way is to locate the Eject Extras folder which may be on the hard drive somewhere; if not, you can download it from here -
    Eject Extras
    You can use the Eject applet contained in that folder by assigning it to one of the FKeys via the FKey page inn the Keyboard control panel.
    The downside of this is that it will control only the built-in optical drive.
    • You can also use a utility such as EjectDisk, which allows for the setting of individual keyboard key-combos for each removable-media drive.

  • Can I create a keyboard shortcut for opening a document in a specific program?

    Hi there,
    I'm getting into html scripting and javascript programming. The files I'm working with are .html and .js. When you first click on these files they open in safari which I like, but I don't like having to right click and select "open in textmate" can I create a shortcut so I can just select the .html and .js files and hit a shortcut to pull up in an alternate program?

    Not only is this very possible, it's also very easy. You can do this not just for Quark but for any application in OS X. To accomplish what you want, do the following:
    * Firstly, quit QuarkXPress completely. The rest of the steps won't work if it is still running.
    * Go to the Apple menu and select System Preferences.
    * Click the Keyboard & Mouse System Preference Pane
    * Click Keyboard Shortcuts
    * Click the + button to add a new shortcut.
    * Select QuarkXPress as the application.
    * In the Menu Title field type "Place Name" exactly like that but without the quotes.
    * Click inside the Shortcut field and type the key combination you want to use for this shortcut. I suggest using Command + one of the F keys, like Command+F1.
    * Click Add.
    * Close System Preferences
    * Run Quark, open a document, and try it out!
    Robert

  • Keyboard shortcut for opening the spelling suggestions menu?

    On windows one can use the keyboard button for a right-click in order to open the spelling pop up menu in programs such as Word.
    Is there any similar way to open the spelling suggestions for the global OS X spell checking via the keyboard?
    Thanks!

    Hi,
    You posted this a few months ago so may already have found the answer. If you press command shift ; all spelling suggestions will come up for you.

  • How do i create keyboard shortcuts for the different markup colours?

    I want to be able to quickly highlight with different colours in the preview app.

    You didn't read my post. You merely read your preconceived notion of what I posted.
    If you want to pop up menus and type letters, turn on the functions to activate the menus in the Keyboard & Text Input of Keyboard Shortcuts.
    You can then activate the menus, type letters of the menu to select the one you want, then type letters for the menu items to select those. Once selected, arrow down or space to drop the menu or activate a hierarchical submenu.
    These items allow you to activate the various menus, Dock, toolbars, etc.
    They are default to Function keys (in order), but I changed mine to things that make sense.

Maybe you are looking for

  • Advance payment request

    Hi How can We check the advance amount with purchase order while creating the advance  paymnet request thry T. code F-47. Regards Avinash

  • Stuck with this query

    i have stuck in this query. it is giving compile error that v_customerloop invalid identifier. this does not make sense because if i comment the sql, it runs fine and i can actually see the count in the dbms output. i tried commenting out some of the

  • Error using TABLES

    I am using Logical database PNPCE in HR for my report. To get the selection screen of the LDB in my report program i need to give the statement TABLES : PERNR. But using this is giving me EPC error that TABLES should not be used. If i take out TABLES

  • Sender agreement at what stage ?

    Hi The two objects of collaboraton agreement are Sender agreement and Reciever agreement. Receiver agreement takes place at the call adaper stage of the XI pipeline. I want to know when the Sender agreement takes place ? Does it happen before receive

  • Where does Flex log Trace statements?

    I have no problem logging the trace statements when i run the application as standalone from flex builder. I deployed the same application in the Weblogic server. Where does Flex compiler log Trace statements when deployed to application server? Is t