Shaun Burdick Posted March 29, 2006 Share Posted March 29, 2006 Hello, I am new to AutoIT and I am trying to make a quick program that will display some information about the computer in a window.I have searched in this forum for the past 3 days and I haven't been able to find everything I need.I would like to create a window that has no border, or Title bar, just a blank window.It would also be nice to be able to make sure it is always on the bottom, so it is pretty much only visible when you are looking on the desktop (Basically part of the desktop). I don't want you to be able to move it or close it, or anything.I have gotten pretty close using SplashTextOn, but It would be nice to be able to change the look of it a little more (Background color, perhaps an image or 2)Here is what I have so far:#include <GUIConstants.au3> #NoTrayIcon $WINDOWWIDTH = 220 $WINDOWHEIGHT = 52 $WINDOWLOCATIONX = @DesktopWidth - $WINDOWWIDTH - 10 $WINDOWLOCATIONY = 30 $LINE1 = "Computer Name: " & @ComputerName $LINE2 = "IP Address: " & @IPAddress1 $LINE3 = "Username: " & @UserName If isAdmin() Then $LINE4 = "Computer Administrator" Else $LINE4 = "Power User" EndIf SplashTextOn("Computer Information", $LINE1 & @CR & $LINE2 & @CR & $LINE3 & @CR & $LINE4, $WINDOWWIDTH, $WINDOWHEIGHT, $WINDOWLOCATIONX, $WINDOWLOCATIONY,3, "", 8) GUISetState() While 1 sleep(600000) $LINE1 = "Computer Name: " & @ComputerName $LINE2 = "IP Address: " & @IPAddress1 $LINE3 = "Username: " & @UserName If isAdmin() Then $LINE4 = "Computer Administrator" Else $LINE4 = "Power User" EndIf ControlSetText("Computer Information", "", "Static1", $LINE1 & @CR & $LINE2 & @CR & $LINE3 & @CR & $LINE4) WendWARNING: This window will not close, or show any way to close it, you have to kill the task in Windows TaskManagerAny suggestions would be extremly appreciated!(Sorry if there is a post on this, I looked everywhere and didn't find one.) --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] Link to comment Share on other sites More sharing options...
CyberSlug Posted March 29, 2006 Share Posted March 29, 2006 You may be interested in BgInfo. That program might meet your needs by itself, but check the EULA regarding redistribution (if applicable).I've used AutoIt to augment the type of data BgInfo displays. The file of attached contains a BgInfo.bgi (config) file as well as my AutoIt script.How it works:The config file contains some preset data as well as a field that tells BgInfo to import the text in C:\DriveInfo.txt. (Unfortunately, I believe the path needs to be hard-coded, but you can use BgInfo.exe to modify the config file.)If you run GenInfo.au3, it creates a file C:\DriveInfo.txt then calls Run("bginfo.exe bginfo.bgi /timer:0") to update the desktop background. If you run GenInfo.au3 again, it will refresh the information.Hope that makes sense. BgInfo is pretty easy to use; it just takes some work to customize the data if none of the many available fields is what you want.GenInfo.zip Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
pecloe Posted March 29, 2006 Share Posted March 29, 2006 heres an example of a gui that fits your description (instead of splash text) #include <GuiConstants.au3> GuiCreate("",400, 300, -1,-1, BitOr($WS_POPUP,$WS_DLGFRAME)) GUISetBkColor(0xadd8e6);;; lightblue GuiSetState() While 1 Sleep(1000) WEnd Link to comment Share on other sites More sharing options...
Shaun Burdick Posted March 29, 2006 Author Share Posted March 29, 2006 That is really close to what I need pecloe!! The only problem with that is I don't want the Task Bar to show up in your task menu --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] Link to comment Share on other sites More sharing options...
Shaun Burdick Posted March 29, 2006 Author Share Posted March 29, 2006 CyberSlug, I would be more confortable using my own code, using a 3rd party application would require me to install it on all the pcs, as well as run my own code. Who knows what legal trouble will result. This way, its just one file, and all I have to do is run it. (Easier to push out and such) --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 29, 2006 Moderators Share Posted March 29, 2006 Is this what your looking to do?expandcollapse popup#include <GUIConstants.au3> #NoTrayIcon HotKeySet('{ESC}', 'EXITNOW') $WINDOWWIDTH = 220 $WINDOWHEIGHT = 60 $WINDOWLOCATIONX = @DesktopWidth - $WINDOWWIDTH - 10 $WINDOWLOCATIONY = 30 $LINE1 = "Computer Name: " & @ComputerName $LINE2 = "IP Address: " & @IPAddress1 $LINE3 = "Username: " & @UserName If isAdmin() Then $LINE4 = "Computer Administrator" Else $LINE4 = "Power User" EndIf $SPLASH = GUICreate('', $WINDOWWIDTH, $WINDOWHEIGHT, $WINDOWLOCATIONX, $WINDOWLOCATIONY, BitOr($WS_POPUP,$WS_DLGFRAME), $WS_EX_TOOLWINDOW) $EDIT = GUICtrlCreateLabel("Computer Information" & @CR & $LINE1 & @CR & $LINE2 & @CR & $LINE3 & @CR & $LINE4, 0, 0, $WINDOWWIDTH, $WINDOWHEIGHT, $SS_CENTER) GUICtrlSetFont($EDIT, 9, 4, '', 'ARIAL BOLD') GUICtrlSetColor($EDIT, 0x0000FF) GUICtrlSetBkColor($EDIT, 0xFFFF00) GUISetState() Sleep(8000) GUIDelete($SPLASH) While 1 sleep(600000) $LINE1 = "Computer Name: " & @ComputerName $LINE2 = "IP Address: " & @IPAddress1 $LINE3 = "Username: " & @UserName If IsAdmin() Then $LINE4 = "Computer Administrator" Else $LINE4 = "Power User" EndIf ControlSetText("Computer Information", "", "Static1", $LINE1 & @CR & $LINE2 & @CR & $LINE3 & @CR & $LINE4) Wend Func EXITNOW() Exit EndFuncThe Hotkey I put in there so I wouldn't have to use the task bar to exit it... (guess I could have just removed the #NoTrayIcon for testing it Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
pecloe Posted March 30, 2006 Share Posted March 30, 2006 try this #include <GuiConstants.au3> GuiCreate("",400, 300, -1,-1, BitOr($WS_POPUP,$WS_DLGFRAME), $WS_EX_TOOLWINDOW) GUISetBkColor(0xadd8e6);;; lightblue GuiSetState() While 1 Sleep(1000) WEnd guestscripter 1 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 30, 2006 Moderators Share Posted March 30, 2006 try this #include <GuiConstants.au3> GuiCreate("",400, 300, -1,-1, BitOr($WS_POPUP,$WS_DLGFRAME), $WS_EX_TOOLWINDOW) GUISetBkColor(0xadd8e6);;; lightblue GuiSetState() While 1 Sleep(1000) WEndThat was in the example I gave above pecloe guestscripter 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
pecloe Posted March 30, 2006 Share Posted March 30, 2006 @SmOke_N sorry, i did not see it, the eyes are the first to go ! Link to comment Share on other sites More sharing options...
Shaun Burdick Posted March 31, 2006 Author Share Posted March 31, 2006 Great, thanks!!! that is definetally what I needed! Looks like I was jsut missing $WS_EX_TOOLWINDOW Thank you so much -Shaun --ShaunProject PageProjects:[Drive and Printer List Tool] [RunAS Box Tool] 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