Sign in to follow this  
Followers 0
MrBlack

need help to create a nag screen

3 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

this is what you want at least i think so :shocked:

#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 :P

cause if u hit alt tab during the program the taskbar flashes and u might have time to pause the script ;)

Edited 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

Share this post


Link to post
Share on other sites

tnx alot alexmadman,

u saved me, is exactly what i need

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