05-04-2017, 03:45 PM
Thank you very much. Had to opportunity to try it tonight.
Excellent, it works! I am able to use PostMessage on a lock computer.
Do you know what is the issue with Java that caused DoDefaultAction and JavaAction("click") to not work?
With regards to the PostMessage, how did you get the "0x390001" and "0xC0390001" parameters? I believe that is the lParam parameters but I do not understand how to obtain its value.
And in my Java JNLP file, there are a few button that does not support the Select key (one of which is the "Print" button). In particular, the Tab key does not cycle through it. Any advice how then can I use the workaround for such buttons?
In any case, for the "Print" button specifically, I am able to use Ctrl+P to trigger it. I tried the following script but it seems to not be inputting the Ctrl key and only managed to sent the P key alone. There is no difference if I change VK_CONTROL to VK_LCONTROL or VK_RCONTROL and 0x50 to 'P'. Is there something wrong with the below script?
Excellent, it works! I am able to use PostMessage on a lock computer.
Do you know what is the issue with Java that caused DoDefaultAction and JavaAction("click") to not work?
With regards to the PostMessage, how did you get the "0x390001" and "0xC0390001" parameters? I believe that is the lParam parameters but I do not understand how to obtain its value.
And in my Java JNLP file, there are a few button that does not support the Select key (one of which is the "Print" button). In particular, the Tab key does not cycle through it. Any advice how then can I use the workaround for such buttons?
In any case, for the "Print" button specifically, I am able to use Ctrl+P to trigger it. I tried the following script but it seems to not be inputting the Ctrl key and only managed to sent the P key alone. There is no difference if I change VK_CONTROL to VK_LCONTROL or VK_RCONTROL and 0x50 to 'P'. Is there something wrong with the below script?
int w=wait(1 WC win("Active - Java Terminal" "SunAwtFrame"))
Acc a.Find(w "push button" "Print" "" 0x1001 1)
PostMessage w WM_ACTIVATE WA_ACTIVE 0
PostMessage w WM_KEYDOWN VK_CONTROL 0x390001; 0.02
PostMessage w WM_KEYDOWN 0x50 0x390001; 0.02
PostMessage w WM_KEYUP 0x50 0xC0390001; 0.02
PostMessage w WM_KEYUP VK_CONTROL 0xC0390001; 0.02