Sign in to follow this  
Followers 0
Max Kipness

Tooltip lower right hand corner

7 posts in this topic

Hello -

Does anybody know how I can have a multiline tooltip appear just above the systray in the lower right hand corner. I'm working on a small app that I'd like to flash a message there like other apps do, for a few seconds before disappearing. I have all the code right except for how to position.

Thanks,

Max

Share this post


Link to post
Share on other sites



How about this

$x = @DesktopWidth - 100
$y = @DesktopHeight - 30
ToolTip("This is a tooltip" & @CRLF & "Line 2", $x, $y)
Sleep(2000); Sleep to give tooltip time to display


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Thanks. The other thing I need to figure out is how to get the message consistently above the the taskbar no matter the height. With your reply and another older post I came up with the following, but it doesn't get the height of the taskbar properly. Is something wrong here? Or is there another way to do this?

I was hoping this would have appeared above the XP taskbar.

#NoTrayIcon

$taskbar = WinGetPos("","Notification Area") ;taskbar x,y,width,height

$x = @DesktopWidth - 67

$y = @DesktopHeight - 50 - $taskbar

ToolTip("This is a test" & @CR & @CR & @CR, $x, $y)

Sleep(3000)

ToolTip("" & @CR & @CR & @CR, 0, 0)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks. The other thing I need to figure out is how to get the message consistently above the the taskbar no matter the height. With your reply and another older post I came up with the following, but it doesn't get the height of the taskbar properly. Is something wrong here? Or is there another way to do this?

I was hoping this would have appeared above the XP taskbar.

#NoTrayIcon

$taskbar = WinGetPos("","Notification Area") ;taskbar x,y,width,height

$x = @DesktopWidth - 67

$y = @DesktopHeight - 50 - $taskbar

ToolTip("This is a test" & @CR & @CR & @CR, $x, $y)

Sleep(3000)

ToolTip("" & @CR & @CR & @CR, 0, 0)

Try this

#NoTrayIcon

$taskbar = WinGetPos("","Notification Area");taskbar x,y,width,height

$x = @DesktopWidth - 67
$y = @DesktopHeight - 50 - $taskbar[3]

ToolTip("This is a test" & @CR & @CR & @CR, $x, $y)
Sleep(3000)

Edit

Removed unrequired line

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Thanks, that worked perfectly!

Max

Share this post


Link to post
Share on other sites

One other thing. Does anybody know of a calculation that can use StringLen to figure out the x-axis postion that would place the tooltip against the right side of the screen? Right now I'm just figuring this out manually based on what string I have in the tooltip.

I guess the question would be how many pixels is one character.

Thanks,

Max

Share this post


Link to post
Share on other sites

One other thing. Does anybody know of a calculation that can use StringLen to figure out the x-axis postion that would place the tooltip against the right side of the screen? Right now I'm just figuring this out manually based on what string I have in the tooltip.

I guess the question would be how many pixels is one character.

Thanks,

Max

What you could do is run your tooltip in a script with a long sleep and use the AutoIt Window Info tool to measure it. You could then build the the measurements into your proper script.

Mess but it will work as long as your tooltip is not a variable.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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