[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]
Using Windows messages
// This example was developed to demonstrate how to send
// Windows messages from a script.
Dim process_id, number
Dim window_handle, number
Dim edit_handle, number
// Use Notepad for demonstration
// Run Notepad
Run( "notepad", "", process_id )
// Wait 2 seconds for the Notepad to open
Wait( 2 )
// Get handle of the Notepad window
ProcessGetWindow( process_id, window_handle )
// Get handle of the edit box
WindowGetChild( window_handle, edit_handle )
// Send EM_SETREADONLY message to the edit box
// to make it read only
WindowSendMessage( edit_handle, 207, 1, 0 )
// Open schedule log file in the Notepad
WindowActivate( window_handle )
SendKeys( "{ALT}FOschedule.log{ENTER}" )