Jump to content

Label timed like tooltip


Recommended Posts

I want to make a label display for a certain amount of time like a tooltip. The way I've been doing it is putting a sleep after the label show for a certain time...2-4 seconds. Problem is, that interferes with other functions running properly/timely. I don't really want to use the TimerInit(), because I have enough of those running, and don't want to constantly be polling the app for something that may not always be used. So is there another way to have a label display for a brief period of time and then hide...NOT destroy...like a tooltip? And no I don't want to use a tooltip for those who will say "why don't you just use a tooltip?"

Link to comment
Share on other sites

I want to make a label display for a certain amount of time like a tooltip. The way I've been doing it is putting a sleep after the label show for a certain time...2-4 seconds. Problem is, that interferes with other functions running properly/timely. I don't really want to use the TimerInit(), because I have enough of those running, and don't want to constantly be polling the app for something that may not always be used. So is there another way to have a label display for a brief period of time and then hide...NOT destroy...like a tooltip? And no I don't want to use a tooltip for those who will say "why don't you just use a tooltip?"

_Timer_SetTimer?
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.
Link to comment
Share on other sites

Thanks. Either I'm doing something wrong, or this isn't what I need. From what I understand, it is suppose to call my function "_Sort_Display" after the amount of time I set "5000". Here is what I have. What it does is pause the script for the time I set, and doesn't activate the function I'm calling. What am I doing wrong?

func First()
    $Sort_Display = _Timer_SetTimer($GUI, 5000, "_Sort_Display");, $Sort_Display
    ;a bunch of stuff
endfunc

Func _Sort_Display()
    GUICtrlSetState($Sort_1, @SW_HIDE)
    GUICtrlSetState($Rating_1, @SW_SHOW)
    _Timer_KillTimer(GUI, $Sort_Display)
endfunc
Link to comment
Share on other sites

Thanks. Either I'm doing something wrong, or this isn't what I need. From what I understand, it is suppose to call my function "_Sort_Display" after the amount of time I set "5000". Here is what I have. What it does is pause the script for the time I set, and doesn't activate the function I'm calling. What am I doing wrong?

func First()
    $Sort_Display = _Timer_SetTimer($GUI, 5000, "_Sort_Display");, $Sort_Display
    ;a bunch of stuff
endfunc

Func _Sort_Display()
    GUICtrlSetState($Sort_1, @SW_HIDE)
    GUICtrlSetState($Rating_1, @SW_SHOW)
    _Timer_KillTimer(GUI, $Sort_Display)
endfunc
I assume you didn't run the code you posted because there is GUI in the _Sort_Displat instead of $GUI.

Anyway, the function called by the timer has to have parameters like this (Even if you don't use the parameters in your function)

Func _Sort_Display($hWnd, $Msg, $iIDTimer, $dwTime)

Then I expect it will work.

Edited by martin
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.
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...