MrBlack Posted April 27, 2007 Share Posted April 27, 2007 hi all, this is my issue: my boss installed monitoring software on all pc's from my workplace and he want to be fair to employees by makeing a nag screen to anounce every user that the pc is monitored. so i need a nag screen (full screen) with some text on it, ex. this pc is monitored, do not use it for personal purpose etc..., with two buttons button 1 "i agree" if is pressed u can enter windows, button 2 "i do not agree" if is pressed windows shut down. if anyone cand help me ill tnx alot (my job depends on this) or at least to tell me if is possible. tnx in advance Link to comment Share on other sites More sharing options...
Xand3r Posted April 27, 2007 Share Posted April 27, 2007 (edited) this is what you want at least i think so #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: alexmadman - Bucharest #ce ---------------------------------------------------------------------------- $text="NAG SCREEN" #include<GUIconstants.au3> Opt("OnExitFunc" , "exit1") GUICreate("NAG SCREEN" , @DesktopWidth , @DesktopHeight , 0 , 0 ,$WS_POPUP) WinSetOnTop("NAG SCREEN" , "" ,1) GUICtrlCreateEdit($text , @DesktopWidth/2-100 , @DesktopHeight/2-100,200,200,$SS_BLACKFRAME+$WS_DISABLED) $AGREE=GUICtrlCreateButton("Agree" , @DesktopWidth/2-100 , @DesktopHeight/2+100 , 90 , 30) $NOT=GUICtrlCreateButton("Dissagree",@DesktopWidth/2+10 ,@DesktopHeight/2+100 ,90,30) GUISetState() $agreed=0 While 1 Sleep(100) $msg=GUIGetMsg() Switch $msg Case $AGREE $agreed=1 exit1() Case $NOT exit1() EndSwitch WinActivate("NAG SCREEN");this is what i eddited( so they can't cheat theyr way out of it :) WEnd Func exit1() If $agreed=1 Then Exit 1 Else Shutdown(9);//Shutdown and powerdown\\; EndIf EndFunc P.S. if u want something more i mean so u realy cant exit just put #NoTrayIcon on the first line of the code cause if u hit alt tab during the program the taskbar flashes and u might have time to pause the script Edited April 27, 2007 by alexmadman Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
MrBlack Posted May 4, 2007 Author Share Posted May 4, 2007 tnx alot alexmadman, u saved me, is exactly what i need 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