Jump to content

Mouse click buffering


Recommended Posts

I have a basic script that takes the mouse input on a button like so:

Local $msg, $Button, $GUIhandle, $response = ""
 
$GUIhandle = GUICreate("example", 680, 575)
$Button       = GUICtrlCreateButton("example", 260, 5, 30)
 
While 1
    $msg = GUIGetMsg()
    If $msg = $Button Then
        ExampleFunct()
        ExitLoop   
    EndIf
    If $response <> "" Then
        msgbox(0, "", $response)
    EndIf
Wend
 
Func ExampleFunct()
    $response = "respond"
EndFunc

 

Yet, If I kill this program and start it up after hitting the button with the left click 2-3 times, I will start it again and it will click the button on its own (like its buffered).

Link to comment
Share on other sites

  • Moderators

JonBMN,

That code needs a GUISetState to show the GUI, it exits as soon as you press the button because you have an ExitLoop in there, and as you never reset the $response variable the MsgBox will fire an infinite number of times regardless of the number of times you press the button. :(

So as it stands it is a pretty poor attempt at a reproducer script. How about posting something that actually does exhibit what you say happens. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you for the condescending statement melba, I will post a reproducer script that I have been testing to make sure it actually reproduces the error.

Stay tuned I should have it up soon.

EDIT: Sorry I posted code that wasn't exactly suppose to reproduce the error it was suppose to just give you a visual. I really shouldn't have posted the code, and just asked the question knowingly that you would assume the latter.

Edited by JonBMN
Link to comment
Share on other sites

  • Moderators

JonBMN,

I see you are living up to your previous reputation(s). I never really expected anything else, but it still is disappointing to see.... :(

Waiting for the code - but I will only look at it after the England game. Best they win... ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you for the condescending statement melba, I will post a reproducer script that I have been testing to make sure it actually reproduces the error.

Stay tuned I should have it up soon.

EDIT: Sorry I posted code that wasn't exactly suppose to reproduce the error it was suppose to just give you a visual. I really shouldn't have posted the code, and just asked the question knowingly that you would assume the latter.

When EVER you criticize someone, you look foolish. I'm the first to admit I'm being foolish and hypocritical right now in fact just telling you this for I'm doing exactly what I'm telling you not to do. Being the better man means holding your tongue and showing ill will toward none. Again, I fail at this.

Steve is trying to help you. True, his reply was a bit critical of your code, however your response was not good either. Be the better man here and not slap the hand that is helping you.

A dog will not like you if you abuse it. Humans are no different.

Again, I'm being hypocritical in saying all this.

Edited by MBALZESHARI
Link to comment
Share on other sites

After all this I'm just done with this forum. Yes Steve I have a reputation for calling you out. You think that looks good on both of us? I know it doesn't look good on me, but I don't take anyone's shit. You wanted the job of moderator? Act like you actually care about the people that come to this forum, instead of just dancing around throwing little insults here and there because it makes you feel better about yourself.

I will say, I do feel bad for people that think they are being foolish and hypocritical to speak their mind, even when they, it seems, are trying to help someone. I'd rather not be in a place like this, and subject myself to criticism, just to be told that my criticism shouldn't be heard. You'd think the one place that someone could speak their mind and combat someone that is demeaning them would be the internet, but that is not the case here.

It's amazing to me everyone does not see this. Teachers are told to go back to school because they do not know everything, why can't I tell Steve that his attitude is bad and that he needs to take a step back? Guess I will never know.

Goodbye.

Link to comment
Share on other sites

  • Moderators

JonBMN,

I rather do care for the people who come to this forum - as a glance through a selection of my posts will show. What I do not care for is the small minority who make no effort and still expect help - under which category I would file a post containing a reproducer script that does not even run. ;)

As to "calling me out" - a search of posts where both you and I have posted shows a lot of "Thanks" from you, so I am at a complete loss to understand what you are talking about. Yes, I have "called you out" on the politeness stakes a few times - hence my remark about "reputation". Not to mention the PM exchange we had about ZiggyStardust and you sharing an IP - now there was an object lesson in how to antagonise a Mod (and a Dev at the same time) - but strangely enough you remained a member able to post and no action was taken against you. :)

I suggest a little look in the mirror - but as you will never read this I am not really ready to waste anymore time on you. :bye:

M23

Edit: And if you change your mind about leaving - you may find it harder to come back than you think. :D

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...