Forum Discussion

jsayre's avatar
jsayre
Occasional Contributor
11 years ago

Windows Shortcuts and JScript

I am trying to create a script for all common windows based shortcuts. This is mainly going to be purposed at giving my windows specific positions like the Win + Left and Win + Right for the anchoring.



I also want to use this for testing how interaction with Explorer ( Win + E) and Run (Win + R) work with our applications while focus on our application.



What I am trying to do right now is do this with LLplayer so i don't have to worry about where the input is happening. I am constantly getting a JScript error because my key format is apparently incorrect. I have searched for a list of valid keys but only found examples of vk_shift and mouse clicks.



Is there somewhere that would have a complete list of valid keys?

Also, Is there anyone who has made a script similar to this?





my current code is pretty simple and looks like this:



Log.Message("Log origin");

LLPlayer.KeyDown(Win, 50);

LLPlayer.KeyDown(Right, 50);

LLPlayer.KeyUp(Right, 50);

LLPlayer.KeyUp(Win, 50);

Log.Message("Location of window moved aligned right")

2 Replies

  • jsayre's avatar
    jsayre
    Occasional Contributor
    Thanks for the relpy James. It appears that the those VK codes for the windows keys are working but the vk codes for the other mappable keystrokes are not working.



    Trying to use VK_KEY_E, VK_KEY_R just throw an error. I'm not sure if that is due to them not being mapped to the VK name for them or not.



    Once I took a look at the Microsoft KB article for them, I used the direct code (0x45, 0x52) then it worked as expected.





    Thanks for your help.