DO WHILE CheckWin('Password') *--This will display until I close the password window as it should WAIT WINDOW "Found the password window" NOWAIT ENDDO RETURN FUNCTION CheckWin PARAMETER tcTitle lnwindow = FindWindow(0,tcTitle) IF lnwindow > 0 #DEFINE WM_KEYDOWN 0x0100 DECLARE SHORT SendMessage IN user32; INTEGER hWnd,; INTEGER Msg,; STRING @ wParam,; INTEGER lParam hwnd = lnwindow cmessage = 'password'+CHR(13) ReturnValue = SendMessage(hwnd, WM_KEYDOWN, @cmessage, 0) RETURN .T. ELSE RETURN .F. ENDIFYet if I run that loop the wait window displays nonstop (as it should) until I close the password window. Once I do that, it exits the loop because lnwindow returns false. So everything is working EXCEPT sending the keystrokes to taht password window... Sheesh, you'd think it was Friday! :o()