Presses a specified key. To release the key, call the CitrixKeyUp function. The window that has keyboard focus receives the key event.
CitrixAPI.bdh
CitrixKeyDown( in nKey : number ) : boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
nKey |
The key to type. Use a key number (ASCII code) or one of these predefined values:
See the CitrixApi.bdh for additional predefined values. |
transaction TMain var begin CitrixInit(640, 480); CitrixConnect("myserver", "myusername", "mypass", "mydomain", COLOR_16bit); CitrixWaitForLogon(); hWnd6 := CitrixWaitForWindowCreation("ICA Seamless Host Agent", MATCH_Exact, 0x94C800C4, 0, 0, 390, 223); CitrixWaitForWindow(hWnd6, EVENT_Activate); CitrixWaitForWindowCreation("Program Manager"); ThinkTime(8.25); CitrixMouseClick(219, 195, hWnd6, MOUSE_ButtonLeft); CitrixWaitForWindow(hWnd6, EVENT_Destroy); CitrixMouseDblClick(113, 20, DESKTOP, MOUSE_ButtonLeft); hWnd10 := CitrixWaitForWindowCreation("Microsoft Excel", MATCH_Exact, 0x15CF0000, -4, -4, 648, 460); CitrixWaitForWindow(hWnd10, EVENT_Activate); CitrixKeyDown(KEY_Enter); CitrixMouseClick(208, 268, hWnd10, MOUSE_ButtonLeft); CitrixKeyUp(KEY_Enter); CitrixMouseClick(630, 13, hWnd10, MOUSE_ButtonLeft); hWnd11 := CitrixWaitForWindowCreation("Microsoft Excel", MATCH_Exact, 0x94C801C5, 149, 206, 350, 108); CitrixWaitForWindow(hWnd11, EVENT_Activate); CitrixMouseClick(186, 85, hWnd11, MOUSE_ButtonLeft); CitrixWaitForWindow(hWnd11, EVENT_Destroy); CitrixWaitForWindow(hWnd10, EVENT_Destroy); CitrixDisconnect(); end TMain;