Sign in to follow this  
Followers 0
Cangoo

GuiCtrlSetTip Problem

5 posts in this topic

Hi,

in my Script I use a lot of GuiCtrlSetTips (about 1000 and more) for a list of names. Every time the list will displayed new, the script gets slower and slower. After about 3 times running the function, the gui begins to flicker and AutoIt will crash totally. I searched in the help file for a command to delete the Tip, but found nothing. So is there any solution for this? The function is like this:

func xy()

for $i=1 to 1000

Temp[$i]=guicreatelabel("abc",x,y,a,:)

guictrlsettip(-1,"Text")

next

for $i=1 to 1000

guictrldelete($Temp[$i])

next

endfunc

Share this post


Link to post
Share on other sites



Hi,

in my Script I use a lot of GuiCtrlSetTips (about 1000 and more) for a list of names. Every time the list will displayed new, the script gets slower and slower. After about 3 times running the function, the gui begins to flicker and AutoIt will crash totally. I searched in the help file for a command to delete the Tip, but found nothing. So is there any solution for this? The function is like this:

func xy()

for $i=1 to 1000

Temp[$i]=guicreatelabel("abc",x,y,a,:)

guictrlsettip(-1,"Text")

next

for $i=1 to 1000

guictrldelete($Temp[$i])

next

endfunc

I don't know but maybe it's worth trying

for $i=1 to 1000
    guictrlsettip($Temp[$i],"")
    guictrldelete($Temp[$i])
  next

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Same effect, but script crashes faster :-(

Is there any possibility to delete the tips? I´ve got the feeling the tips are still alive although the labels, they belong to, are deleted?!

Share this post


Link to post
Share on other sites

Same effect, but script crashes faster :-(

I'm glad I helped to make your script more efficient :)

Is there any possibility to delete the tips? I´ve got the feeling the tips are still alive although the labels, they belong to, are deleted?!

Maybe if you can identify the tooltip windows and delete them with WinClose you will solve your problem. The tooltips can be listed using

$wl = WinList("[class:tooltips_class32]")
_ArrayDisplay($wl)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi Martin,

thank you for the idea. Now I have the list of the ToolTip windows. I tried to delete them with WinClose("[class:<ClassIDNo>]"), but it will show no effect, tooltips are still alive. Maybe you also can give me the right syntax for Winclose for deleting the tooltip class?

Ah ok, I think I got it with Winclose(<ClassIDNr>). The Tooltips are now deleted, but it took about 10 seconds to delete 20 Tooltips :-/ Same with Winkill...

Edited by Cangoo

Share this post


Link to post
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
Sign in to follow this  
Followers 0