Sign in to follow this  
Followers 0
ItManRus

ControlCommand (need SendMessageTimeout) and _GUICtrlListBox_SelectString

4 posts in this topic

#1 ·  Posted (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.

post-67315-0-91010300-1316016063_thumb.p

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 :graduated:

$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 by ItManRus

Share this post


Link to post
Share on other sites



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()

Share this post


Link to post
Share on other sites

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

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}')

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0