Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    open selected file

    Help wanted · · · – – – · · ·
    2
    4
    1925
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kfonda
      kfonda last edited by

      Hi all.
      I have set a function key on my windows 7 machine to start Notepad++. Works as expected.
      I would like to find a way to use that key to open Notepad++ with the currently selected file from explorer.
      What I’m looking to do is select a file in explorer, hit the function key, and have the file open in Notepad++. I just can’t figure out what to pass on the command line for the selected file.
      Any ideas?

      Thanks in advance for any ideas,
      Kevin Fonda

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @kfonda last edited by

        @kfonda

        without knowing how you did it exactly, a common practice for explorer or registry tweaks is to
        use the %1 as a variable which gets replaced by the complete filename.

        Cheers
        Claudia

        kfonda 1 Reply Last reply Reply Quote 0
        • kfonda
          kfonda @Claudia Frank last edited by

          @Claudia-Frank

          What I did was to use the Logitech SetPoint software to set the function key to ‘Launch a Program’. I set the program to launch to
          “C:\Program Files (x86)\Notepad++\notepad++.exe” “%1”
          It looks like the command line doesn’t see a selected file as ‘%1’.
          I guess what I need is a way to access the name of the currently selected file from the command line.

          Claudia Frank 1 Reply Last reply Reply Quote 0
          • Claudia Frank
            Claudia Frank @kfonda last edited by

            @kfonda

            What I did was to use the Logitech SetPoint software to set the function key to ‘Launch a Program’

            OK, I guess this doesn’t work as long as the SetPoint program hasn’t a functionality to communicate with explorer/shell objects.

            I guess what I need is a way to access the name of the currently selected file from the command line.

            I didn’t use it myself but maybe AutoIt (or similar sw) might be helpful in such a case.
            Afaik AutoIt has the possibility to work with COM objects, if so it should be possible
            to get the running explorer and shell instance and get the selected file.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors