WiseGuy Posted March 14, 2012 Share Posted March 14, 2012 Hi all, Here I am again with another question: I want to create a temporary tooltip and I have sort of succeeded by making a function for it like this: Func CustomToolTip($Tip) ToolTip($Tip, 5, 5) Sleep(5000) ToolTip("") EndFunc But this causes the flow of my other functions and procedures to be interrupted which I find less than desirable. So what I want is basically this function as above but where the other procedures and functions execution isn't interrupted for 5 seconds. Looking at the helpfile I can't seem to find any procedures that allow me to draw on the screen and consequently delete it again. Is there any way to show a tooltip for a limited amount of time, without interrupting the flow of the program? I have also looked into using traytip for this but traytip doesn't always work, it seems not to when a program is running in full screen mode (I don't see it so it sort of defeats the purpose then). A bit more on why I want this: My program runs without a GUI and basically has a bunch of hotkeys that all preform certain functions and I want to display in a temporary tooltip what function was activated when a hotkey is pressed. Now since most of these functions only take a couple of seconds at the most there is no need for a tooltip to be displayed indefinately but it is also sort of ridiculous for the program to have to wait longer than it actually takes to execute yourself as my application is supposed to speed things up for you by making certain series of mouseclicks and commands a single key press rather than having to go through the motions yourself. Sure, theres one or two where displaying a tooltip until it's done is fine but for most of them that is just way too fast. If anyone has got any suggestions on what I can do here, it is most appreciated! Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 14, 2012 Share Posted March 14, 2012 (edited) You could use AdlibRegister to set it to run after 5 seconds then AdlibUnRegister.Another option would be to use TimerInt & TimerDiff.Each of these is where you would have a separate Function with a blank ToolTip. Edited March 14, 2012 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
spudw2k Posted March 14, 2012 Share Posted March 14, 2012 I've done this in the past by utilizing a timer and the adlib function. The logic goes like this: Create a Global variable for a timer [$timer] Initiate the timer right before the tooltip [$timer = timerinit()] AdlibEnable a function to check the TimerDiff [if TimerDiff($timer) > 5000...] If the conditions fit then kill the timer [$timer=0], stop the tooltip, and AdlibDisable Sorry if that is confusing. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now