General information
Category:
Windows API functions
Title:
WINAPI Access to window
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only