jpm Posted April 26, 2004 Author Share Posted April 26, 2004 I already tried and can't do this with unstable release 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 Link to comment Share on other sites More sharing options...
jpm Posted April 26, 2004 Author Share Posted April 26, 2004 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. Link to comment Share on other sites More sharing options...
Lazycat Posted April 26, 2004 Share Posted April 26, 2004 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. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
jpm Posted April 26, 2004 Author Share Posted April 26, 2004 (edited) 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 itThanks EDIT your script need an extra GuiSetControlNotify(-&,0) on the second input Edited April 26, 2004 by jpm Link to comment Share on other sites More sharing options...
Lazycat Posted April 26, 2004 Share Posted April 26, 2004 Thanks, jpm, seems now it is as it should be your script need an extra GuiSetControlNotify(-&,0) on the second inputOf course, but now it shows how input notify Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
alawoona Posted April 26, 2004 Share Posted April 26, 2004 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 Link to comment Share on other sites More sharing options...
jpm Posted April 26, 2004 Author Share Posted April 26, 2004 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 againSorry 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 Link to comment Share on other sites More sharing options...
alawoona Posted April 26, 2004 Share Posted April 26, 2004 (edited) no problem about sunday....was raining outside all day 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 April 26, 2004 by alawoona Link to comment Share on other sites More sharing options...
Valik Posted April 26, 2004 Share Posted April 26, 2004 I can confirm that listboxes work as I've written something for AutoIt that uses a listbox. Link to comment Share on other sites More sharing options...
alawoona Posted April 27, 2004 Share Posted April 27, 2004 Can now verify that Valik. I wrote myself a simple script and it works....now I gotta go back to my real script and find out what I did wrong. Link to comment Share on other sites More sharing options...
Valik Posted April 27, 2004 Share Posted April 27, 2004 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 More sharing options...
alawoona Posted April 27, 2004 Share Posted April 27, 2004 (edited) 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 April 27, 2004 by alawoona Link to comment Share on other sites More sharing options...
CyberSlug Posted April 27, 2004 Share Posted April 27, 2004 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 More sharing options...
jpm Posted April 27, 2004 Author Share Posted April 27, 2004 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 problemFor 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 Link to comment Share on other sites More sharing options...
jpm Posted April 27, 2004 Author Share Posted April 27, 2004 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 = 1Do we need to make it as a default? Link to comment Share on other sites More sharing options...
alawoona Posted April 27, 2004 Share Posted April 27, 2004 jpm: thank youFor 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 GUIsetControlThe same thing happens for the radio control. Link to comment Share on other sites More sharing options...
jpm Posted April 27, 2004 Author Share Posted April 27, 2004 jpm: thank youThe same thing happens for the radio control.I know corrected at the same time Link to comment Share on other sites More sharing options...
Valik Posted April 27, 2004 Share Posted April 27, 2004 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 More sharing options...
jpm Posted April 27, 2004 Author Share Posted April 27, 2004 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 More sharing options...
Valik Posted April 27, 2004 Share Posted April 27, 2004 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now