Because I've never seen that program I can guess only that "AtomTime98" title is a property of the main program window. This window may have a bunch of child windows with one of them having the buttons. To give you some idea, check out the simple Windows Notepad which consists of 2 windows: one is the frame having the menu and title and other one is the edit control inside the frame. You can write a loop using WindowGetChild, WindowGetNext, WindowGetTitle to search for a window with a title "Check" (ah, yes, every button as well as any other control in MS Windows is a window itself). Also, take a look at the examples provided in he "WindowGetFirst", "WindowGetChild" and other "WindowGet..." topics in the on-line help file. : hi. : here is another one: Dim window_handle, number : Dim process_handle,number : dim process_id,number : Dim (found_files,string) : Dim( is_empty, boolean, FALSE ) : Dim( file_name, string ) : Dim( full_file_name, string ) : Dim(path,string,"C:\\My Downloads\\atomicTime\\AtomTime\\") : Dir("C:\\My Downloads\\atomicTime\\AtomTime\\*.exe",found_files) : isequal(found_files," ",is_empty) : gettoken(",",found_files,file_name) : Concat(path, file_name,full_file_name ) : run (full_file_name,"C:\\My : Downloads\\atomicTime\\",process_handle) : wait(3) : windowfind("AtomTime98",window_handle) : windowgetprocess(window_handle,process_id) : //ProcessGetWindow (process_id,window_handle) : WindowClickButton (window_handle, "Check") : wait (5) : WindowClickButton (window_handle, "Adjust") : wait (3) : windowclickbutton(window_handle,"Exit") : WindowClose (window_handle) : this script gets my window up and running, and also closes the window, but : non of the buttons are getting that click. what is wrong? : thank you.
|