Jump to content

Autoit-gui 101.18 Available


jpm
 Share

Recommended Posts

I already tried and can't do this with unstable release  :huh2:  Please look example:

Opt("GUINotifyMode", 1)
$ES_CENTER = 1
$ES_READONLY = 2048
$CBS_DROPDOWNLIST = 3

GUICreate ("UpDown (?) bug test", 227, 144)
$add=GUISetControl("button", "Add", 135, 20, 30, 20)
$hedit=GUISetControl("input", "", 15, 50, 45, 22, $ES_CENTER)
GUISetControlNotify(-1, 0); Trying to disable notification
GUISetControl("updown", $hedit, 0, 0)
GuiSetControlEx(-1, 0, 0, "", 0, 23)
$medit=GUISetControl("input", "", 65, 50, 45, 22, $ES_CENTER)
GUISetControl("updown", $medit, 0, 0)
GuiSetControlEx(-1, 0, 0,"", 0, 59)
$combo=GUISetControl("combo", "", 135, 50, 76, 20, $CBS_DROPDOWNLIST)

GUIShow()

While GUIMsg() <> 0
    $k=GUIRead() 
    Select
        Case $k = $add
            $curtime = StringFormat ("%02d:%02d", GUIRead($hedit), GUIRead($medit))
            GUISetControlData($combo, "*" & $curtime)
    Endselect
    MsgBox (0, "ControlREF", $k)
Wend

Even if you try to change input that not notify, you anyway need two clicks to do button action. Maybe this just bug inthe last unstable?

Working perfect with the modification I will upload to Jon.

I add a little beep when I cannot send the second message

:D

Link to comment
Share on other sites

  • Replies 104
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Can't you queue the events in some way?

Whatever you do, though, don't make it default behavior.  You'll break scripts that way.  It should have to be explicitly turned on no matter which GuiNotifyMode is being used.

I will not change the behavior but as I said very difficult to have script handling to simultaneous gui event. Just have a look at the code and make some suggestion. :D
Link to comment
Share on other sites

Working perfect with the modification I will upload to Jon.

You will upload? So this is not current version (from 26.04)? (I not see any changes in it)

I will not change the behavior but as I said very difficult to have script handling to simultaneous gui event.

But with GUIMsg(0) you can at least very close simulate this? I not see problems to handle two consecutive messages by this way.

Link to comment
Share on other sites

You will upload? So this is not current version (from 26.04)? (I not see any changes in it)

But with GUIMsg(0) you can at least very close simulate this? I not see problems to handle two consecutive messages by this way.

I just upload can you test it

Thanks :D

EDIT your script need an extra GuiSetControlNotify(-&,0) on the second input

Edited by jpm
Link to comment
Share on other sites

Thanks for fixing it jpm. I had the same problem. I spent all day Sunday trying to figure out what I was doing wrong in my script. Now how do I get rid of that beep (without turning off the system sound).

Thanks again

Sorry for the bad sunday.

I will remove ithe beep in the final edition. I just want to be for sure that an event was not sent :D

Link to comment
Share on other sites

no problem about sunday....was raining outside all day :D

On a similar note I cannot get a listbox to notify when I click on an entry within the list. I could do that in AU3GUIXP. Have tried it with Opt("GUINotifyMode", 1)

and with GUISetControlNotify($list, 2).

Edited by alawoona
Link to comment
Share on other sites

How ironic. It is a bug and I just found it. LBS_NOTIFY apparently isn't being forced onto listboxes and it needs to be. alawoona, you're obviously changing the list-box style and this is causing a critical style to not be there. Add this style when you create the listbox control:

Global $LBS_NOTIFY = 1
Link to comment
Share on other sites

Valik - I was changing the style in my script. Removed the style and it did notify. I will check your solution. Thanks.

Have another observation. I am using the GUISetControl to "rewrite" an existing control, see this example -

GUICreate ("checkbox  test", 250, 150, 20, 20)
$checkCN = GUISetControl("checkbox", "CHECKBOX 1", 10, 10, 120, 20)
$buttonCN = GUISetControl("button", "BUTTON 1", 50, 50, 100, 30)

GUIShow()
MsgBox(4096, "", "Rewrite button")
GUISetControl($buttonCN, "New", 50, 50, 100, 30)
MsgBox(4096, "", "Rewrite checkbox")
GUISetControl($checkCN, "check me", 110, 10, 120, 20) 
MsgBox(4096, "", "why did this not rewrite the text on the checkbox")

Rewriting the text on the button works. Rewriting the text on the checkbox does not (but I can move it to a different position)?

EDIT -

Valik your solution

Global $LBS_NOTIFY = 1

Solved the other problem

Edited by alawoona
Link to comment
Share on other sites

Question about tab controls:

I am unable to CGUISetControlEx any tab property documented in the help file's appendix.

Also, Microsoft Spy shows that tab controls have both TCS_SINGLELINE and TCS_MULTILINE in the default style (but the appendix says that the default should be singleline).

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Valik - I was changing the style in my script. Removed the style and it did notify. I will check your solution. Thanks.

Have another observation. I am using the GUISetControl to "rewrite" an existing control, see this example -

GUICreate ("checkbox  test", 250, 150, 20, 20)
$checkCN = GUISetControl("checkbox", "CHECKBOX 1", 10, 10, 120, 20)
$buttonCN = GUISetControl("button", "BUTTON 1", 50, 50, 100, 30)

GUIShow()
MsgBox(4096, "", "Rewrite button")
GUISetControl($buttonCN, "New", 50, 50, 100, 30)
MsgBox(4096, "", "Rewrite checkbox")
GUISetControl($checkCN, "check me", 110, 10, 120, 20) 
MsgBox(4096, "", "why did this not rewrite the text on the checkbox")

 

Rewriting the text on the button works. Rewriting the text on the checkbox does not (but I can move it to a different position)?

EDIT -

Valik your solution

Global $LBS_NOTIFY = 1

Solved the other problem

For the rewrite checkbox. the false reason is GuiSetControl do as GuiWrite that is to say no update text. :huh2:

Thanks for finding this difference. I will update the code to allows it and the doc to be clearer in the potential difference when using dynamically GUIsetControl

:D

Link to comment
Share on other sites

How ironic.  It is a bug and I just found it.  LBS_NOTIFY apparently isn't being forced onto listboxes and it needs to be.  alawoona, you're obviously changing the list-box style and this is causing a critical style to not be there.  Add this style when you create the listbox control:

Global $LBS_NOTIFY = 1
Do we need to make it as a default?
Link to comment
Share on other sites

jpm: thank you

For the rewrite checkbox. the false reason is GuiSetControl do as GuiWrite that is to say no update text. 

Thanks for finding this difference. I will update the code to allows it and the doc to be clearer in the potential difference when using dynamically GUIsetControl

The same thing happens for the radio control.
Link to comment
Share on other sites

Do we need to make it as a default?

When the style has been set at creation, it won't notify unless the style is added, so yes, it needs added as a default. It needs to be forced on whenever GuiNotifyMode=1 or when the control has explicitly been set to notify through GUISetControlNotify(), regardless of whether the user changes the styles or not.

I would look at combo-boxes as well, they could have a similar message that needs set. Also, make sure static controls have SS_NOTIFY set when appropriate.

Link to comment
Share on other sites

When the style has been set at creation, it won't notify unless the style is added, so yes, it needs added as a default.  It needs to be forced on whenever GuiNotifyMode=1 or when the control has explicitly been set to notify through GUISetControlNotify(), regardless of whether the user changes the styles or not.

I would look at combo-boxes as well, they could have a similar message that needs set.  Also, make sure static controls have SS_NOTIFY set when appropriate.

Do I enforce it whatever the user define?
Link to comment
Share on other sites

Yes. That's the issue. It isn't being forced when the user changes styles, so even though the control may be set to notify, it doesn't generate the notification message.

LBS_NOTIFY

Notifies the parent window with an input message whenever the user clicks or double-clicks a string in the list box.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...