Sign in to follow this  
Followers 0
mrjoli021

box on top of time

12 posts in this topic

I would like to display a box on top of the time with the computer name and IP address. I would need this for serveral clients so I cant relay on a specific resolution.

splashTextOn would work but again if the resolution changes this wont work. I want it always on and always on and by default on top of the time.

Share this post


Link to post
Share on other sites



Just a suggestion but why create something that is, as you say, "always on" - thus forcing your users to look at it all the time while they're trying to work? Why not something simple like a Tray Icon they can click on to give you the information if necessary? Something like this can be set as a service and therefore always running, but is only visible when needed.

#NoTrayIcon
#include <GUIConstantsEx.au3>

Opt("TrayMenuMode", 3)
TrayCreateItem("Account: " & @UserName)
TrayCreateItem("Hostname: " & @ComputerName)
TrayCreateItem("Domain: " & @LogonDomain)
TrayCreateItem("Resolution: " & @DesktopWidth & "x" & @DesktopHeight)
TrayCreateItem("IP Address: " & @IPAddress1)
TrayCreateItem("")
$aboutItem = TrayCreateItem("About")
TraySetState()
TraySetToolTip("Helpdesk Utility")
While 1
$msg = TrayGetMsg()
  Select
   Case $msg = 0
    ContinueLoop
   Case $msg = $aboutItem
    MsgBox(64, "About", "Helpdesk Tooltip Utility")
  EndSelect
WEnd

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

the problem is that sometime users have a hard time looking for the icon specially in windows7 that not all icon are visible in the taskbar. I would like the same thing but in a box that is set by default on top of the time and if the user wishes he can move it but always visible.

Share this post


Link to post
Share on other sites

OK thinking about it your right it is better to have the icon on the taskbar, but is there a way to have the information popup with some key strokes like "ctrl" + "i" or what ever we choose?

Share this post


Link to post
Share on other sites

Use a ToolTip and HotKeySet and you can have it pop up using whatever key(s) you want.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

$icg = "Desktopicg.ico"
$tv = RegRead("HKLMSOFTWAREWow6432NodeTeamViewerVersion7", "ClientId")
#NoTrayIcon
#include <GUIConstantsEx.au3>
Opt("TrayMenuMode", 3)
TraySetIcon($icg)
TrayCreateItem("Account: " & @LogonDomain&""[email="&@UserName"]&@UserName[/email])
TrayCreateItem("Hostname: " & @ComputerName)
TrayCreateItem("TeamViewer No. " & $tv)
TrayCreateItem("IP Address: " & @IPAddress1)
TrayCreateItem("")
$aboutItem = TrayCreateItem("About")
TraySetState()
TraySetToolTip("ICG Support")
ToolTip("Account: " & @LogonDomain&""[email="&@UserName"]&@UserName[/email] & @CRLF & "Hostname: " & @ComputerName & @CRLF & "TeamViewer No. " & $tv & @CRLF & "IP Address: " & @IPAddress1,0, 0,"Support Info:")
Sleep(1000)
While 1
$msg = TrayGetMsg()
  Select
   Case $msg = 0
    ContinueLoop
   Case $msg = $aboutItem
    MsgBox(64, "About", "For Support Please contact 888-823-5975")
  EndSelect
WEnd

I would like for the icon $icg to show up instead of the autoit icon. Also the tooltip does not close.

Share this post


Link to post
Share on other sites

You

^------>Help File


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

For the icon, you need to change this:

$icg = "Desktopicg.ico"

to this:

$icg = @DesktopDir & "icg.ico"

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

that worked but what about getting the tooltip to close automatically.

Share this post


Link to post
Share on other sites

As BrewManNH suggested, it is time to start seeing your own efforts. Check out the help file for both ToolTip and HotKeySet; the answer is there.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I did read the tooltip help and the example says it is the command and after the sleep timer. Which is what I have done but it does not close.

Share this post


Link to post
Share on other sites

I figured it out.

thx

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