Jump to content
Sign in to follow this  
JonBMN

Mouse click buffering

Recommended Posts

JonBMN

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

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
JonBMN

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

Share this post


Link to post
Share on other sites
JLogan3o13

Wow, an attitude like that and you expect help on this forum? Good luck...


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Bert

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

Share this post


Link to post
Share on other sites
JonBMN

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.

Share this post


Link to post
Share on other sites
Melba23

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

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Similar Content

    • JuanFelipe
      By JuanFelipe
      Hello friends, I have a simple question, can I have a variable that is not reset, even if my program is closed?
      That is, I want to make a program that can only be opened once, have a variable $ ini = 0, when it is opened for the first and only time it becomes $ ini = 1, so that it can not use the program a second time, as if it was a test software.
      I do not want the variable to depend on a reading of an external file that is easily manipulated. Thank you.
    • nooneclose
      By nooneclose
      My program has to first search for names in Column D that do not match up with column C. I got that search to work using arrays. It was slow and I could not figure out how to delete them so I just manually put coded the names that do not belong. I found their cell location but I do not know how to store that location and delete it.
      This is what I have so far.
      Local $NameToDelete1[6]  = _Excel_RangeFind($OpenWorkbook, "Smith, Bill") _ArrayDisplay($NameToDelete1, "Excel UDF: _Excel_RangeFind Example 1", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") _Excel_RangeDelete($OpenWorkbook.ActiveSheet, $NameToDelete1[2], $xlShiftUp)  
      Please help, I wanted to have this program done yesterday but I did not see this problem until yesterday. 
    • TrashBoat
      By TrashBoat
      So Im trying to make a simple 2d game and make some sort of collision detection so why not to make a 2 dimensional array but i have no clue how  to write it in multiple lines
      Global $map[5,5] = [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0] something like this but it doesn't work
    • Zein
      By Zein
      #include "..\Include\Array.au3" #include "..\Include\File.au3" #include "..\Include\AutoItConstants.au3" Local $aRetArray Local $sFilePath = "n.csv" _FileReadToArray($sFilePath, $aRetArray, ",") ; _FileReadToArray($sFilePath, $aRetArray, $FRTA_COUNT, ",") _ArrayDisplay($aRetArray, "Original", Default, 8) The above code shows two versions of _FileReadToArray and both don't work as expected.
      The first one doesn't use the comma as a delimiter. (so I get a single column array)  I tried adding "Default" between $aRetArray and "," then it told me it had an incorrect number of parameters. 

      I looked again at the documentation:
       
      #include <File.au3> _FileReadToArray ( $sFilePath, ByRef $vReturn [, $iFlags = $FRTA_COUNT [, $sDelimiter = ""]] )
      And I with or without the flags params I should be getting a 2D array due to my file being a csv. 
      I then tried a regular flag, $FRTA_COUNT, and it tells me that I'm using a variable $FRTA_COUNT while it's not declared. Tried putting in 1 instead and it told me again, incorrect number of params. 

       
    • nooneclose
      By nooneclose
      I need to perform a subtotal in excel and I would like to automate this process using Autoit if possible like always any and all help will be greatly appreciated. 
      I can not find a good example but the two from Microsoft. Here is one of the two from msdn.microsoft.com/en-us/vba/excel-vba/articles/range-subtotal-method-excel
      I do not really understand how to translate this into AutoIt, but I gave it a try and here is what I have.
      $OpenRange      = "A1:E200" $xlSum          = -4157 $Added_Array[2] = [2, 3] $OpenRange.Subtotal("B1", $xlSum, $Added_Array, True, False, True) I just need to perform a subtotal on a range based on a header called department, and then perform a sum on the results.
×