Jump to content

Tooltip lower right hand corner


Max Kipness
 Share

Recommended Posts

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

Link to comment
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


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

Link to comment
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)

Link to comment
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)

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


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

Link to comment
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

Link to comment
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.


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

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