1 Reply Latest reply on Nov 18, 2010 12:02 AM by areohbee

    Issuing Control Key sequences on Windows

    areohbee Level 6

      I have whipped the problem of issuing keystroke sequences programmatically via plugin on Mac (using on-the-fly applescript - see another post about it), but still have remaining problem on Windows:


      I have a vbs script which can output keystrokes on windows, EXCEPT


           "Ctrl-X"   i.e. control key sequences don't work.


      'Alt' works, and 'Shift' works, as do other "special" keys (like {TAB}), but I can not get any control-key modified keystrokes to work, e.g. 'Ctrl-s' to save metadata. I've seen this work before using auto-hot-key, but I was aiming for a solution that did not require any dependencies be satisfied...


      Any ideas?


      PS - I had the same problem when I re-wrote the script using Windows PowerShell, which I think is just acting like a wrapper for the same vbs send-keys functionality, in this instance.



        • 1. Re: Issuing Control Key sequences on Windows
          areohbee Level 6

          I think I know what may be happening here.


          @XP, merely sending the control key doesn't cut it, since its interpreted as down-then-up. You have to send a ctrl-down/key(s)/ctrl-up sequence. However, to the best of my ability to figure, vbs was never updated with the ability to do that.


          Thankfully, autohotkey works wonders and can be compiled to an exe file that does not depend on user having autohotkey installed, and can thus be invoked by a plugin to send whatever keys to lightroom...