Jump to content

Refresh problem...


CyberSlug
 Share

Recommended Posts

@JPM/CyberSlug: we have now a "conflict-situation" in this flickering-solution:

http://www.autoitscript.com/forum/index.php?showtopic=5693

So, @CyberSlug: did you change your script?

Otherwise @JPM, I would say before changing the GUICtrlSetPos-function the functionality was right and CyberSlugs scripts definitly bug'ed!

Yeah, it's logical: a holding mouse button produces messages over messages and if I call a 'repainting'-function on every such mouse event/message then there has to be a flickering.

So you should only save one hold mouse button message and do a GUICtrlSetPos only if there is a change to the position i.e.

That is my opinion to this whole story...

So long...

Holger

Link to comment
Share on other sites

Otherwise @JPM, I would say before changing the GUICtrlSetPos-function the functionality was right and CyberSlugs scripts definitly bug'ed!

<{POST_SNAPBACK}>

Hmm... The way my day has been going, I'm not surprized ;):):)
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

@CyberSlug: sorry, don't want to make your day more worse then it is...

I just wanted to show you that there is a bug in your sample script.

Here is what I mean:

GUICreate("flickering")
$label = GUICtrlCreateLabel("Extrem",10,50,200,80)
GUICtrlSetFont(-1,40,1000)
$countinfo = GUICtrlCreateLabel("0",0,0,40,16)

$count = 0
GUISetState()
Do
    $i = GUIGetCursorInfo()
    If $i[2] = 1 Then
        $count = $count + 1
        GUICtrlSetData($label,"Extrem")
        GUICtrlSetData($countinfo,$count)
    EndIf
Until GUIGetMsg() = -3

GUIDelete()
Exit

Like in your script a function will be called ever and ever.

Here it is "GUICtrlSetData".

But we cannot change the function to something...

The function is doing right but the script is wrong.

Link to comment
Share on other sites

I could check the previous state of the mouse and only update the control if the mouse was/is not down:

GUICreate("flickering")
$label = GUICtrlCreateLabel("Extrem",10,50,200,80)
GUICtrlSetFont(-1,40,1000)
$countinfo = GUICtrlCreateLabel("0",0,0,40,16)

$count = 0
$previous = 0
GUISetState()
Do
   $i = GUIGetCursorInfo()
   If $previous = 0 And $i[2] = 1 Then
      $count = $count + 1
      GUICtrlSetData($label,"Extrem")
      GUICtrlSetData($countinfo,$count)
      $previous = 1
   ElseIf $previous = 1 And $i[2] = 0 Then
      $previous = 0
   EndIf
Until GUIGetMsg() = -3

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

@JPM/CyberSlug: we have now a "conflict-situation" in this flickering-solution:

http://www.autoitscript.com/forum/index.php?showtopic=5693

So, @CyberSlug: did you change your script?

Otherwise @JPM, I would say before changing the GUICtrlSetPos-function the functionality was right and CyberSlugs scripts definitly bug'ed!

Yeah, it's logical: a holding mouse button produces messages over messages and if I call a 'repainting'-function on every such mouse event/message then there has to be a flickering.

So you should only save one hold mouse button message and do a GUICtrlSetPos only if there is a change to the position i.e.

That is my opinion to this whole story...

So long...

Holger

<{POST_SNAPBACK}>

I am for sure the mention script was not working with the Oct 12 version.

The problem come from the fact that an icon control cannot be resized. the refresh is a wrong refresh from the fact that the first CtrlsetPos set a size which is used with the CtrlSetImage . The second CtrlsetPos is not needed.

I will search more if there is a way to resize a icon control without reloading the image. :)

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