EnableExplicit If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) StringGadget(1,10,10,100,20,"",0) SetActiveGadget(1) keybd_event_(#VK_A, #Null, #Null, #Null) keybd_event_(#VK_A, #Null, #KEYEVENTF_KEYUP, #Null) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf ; IDE Options = PureBasic 4.60 Beta 2 (Windows - x86) ; CursorPosition = 6 ; EnableXP