>Hello,
>hope somebody can help me to solve me problem.
>Try to send keystrokes to an external application (window , CITRIX)). I am using WINAPI functions.
>I can find the window !
> With “SwitchToThisWindow “ I can bring it on the top.
>After that I try to send keystokes with the keyb_event function like:
>= keybd_event(VkKeyScan(Asc("A")), 0, 0, 0)
>= keybd_event(VkKeyScan(Asc("A")), 0, KEYEVENTF_KEYUP, 0)
>But this window ignores all keystroke inputs like that. If I type the characters manually I see that I’m in the window and that I have the focus on it. The only thing the window accepts is if I put some characters in the clipboard and send a:
>
>Store "92976972" To _Cliptext
>
> = keybd_event(VK_CONTROL, 0, 0, 0)
> = keybd_event(VkKeyScan(Asc("V")), 0, 0, 0)
> = keybd_event(VkKeyScan(Asc("V")), 0, KEYEVENTF_KEYUP, 0)
> = keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0)
>
>What I need is the content of an input field in this mask. The following code does not succeed:
>
> = keybd_event(VK_CONTROL, 0, 0, 0)
> = keybd_event(VkKeyScan(Asc("C")), 0, 0, 0)
> = keybd_event(VkKeyScan(Asc("C")), 0, KEYEVENTF_KEYUP, 0)
> = keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0)
>
>
>
>Also the api function movewindow has no effect
>e.g.(MoveWindow(hwindow,-4,-4,400,400,.t.) has no effect on the window
>
>Any help is appreciated.
>Thanks in advance
>
>Marcus
Since I can't see all your codes, so here is my guest:
You forgot to send Ctrl+A keystroke before Ctrl+C, so clipboard buffer will empty because there is no character was selected.
CMIIW.
Regards,
Ony