ItManRus 0 Posted September 14, 2011 (edited) Problem:I have ListBox with 2 items. When mouse click at item - creatin new Modal Form, Until I close my Modal Form, code not contining. Simulate code:ControlCommand ("[CLASS:TFmMain]", "", "[CLASS:TListBox;INSTANCE:1]", "SelectString" , "Отчетность по форме 0409251" ) Code works great, but pausing work. I tryed another way:_GUICtrlListBox_SelectString($handle, "Отчетность по форме 0409251",-1)Selecting changed, but no Modalwindow. This code not work $handle = ControlGetHandle("[CLASS:TFmMain]", "", "[CLASS:TListBox;INSTANCE:1]") _GUICtrlListBox_SetSel($handle, 1) Solution: ControlCommand ("[CLASS:TFmMain]", "", "[CLASS:TListBox;INSTANCE:1]", "SelectString" , "Отчетность по форме 0409251" ) How write same code with SendMessageTimeout? Edited September 14, 2011 by ItManRus Share this post Link to post Share on other sites
Beege 98 Posted September 15, 2011 Are you saying that a new gui is created when you click on a listview item? Im not understanding you. What do mean when you say "code not contining"? if you are creating a new gui, make sure your using guiswitch() Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Share this post Link to post Share on other sites
ItManRus 0 Posted September 15, 2011 Are you saying that a new gui is created when you click on a listview item? Im not understanding you. What do mean when you say "code not contining"?if you are creating a new gui, make sure your using guiswitch() Can you check this video? Share this post Link to post Share on other sites
Beege 98 Posted September 15, 2011 Ok I see what you mean. Your going to halve to avoid using controlcommand().. If the enter key is pressed when the string is selected, will the box open? _GUICtrlListBox_SelectString($handle, "Отчетность по форме 0409251",-1) Send('{enter}') Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Share this post Link to post Share on other sites