Sign in to follow this  
Followers 0
gte

How to pause a shutdown or a logoff until an action is completed?

3 posts in this topic

I'm trying to pause a shutdown or logoff and run this script, and not continue with the shutdown or logoff until the user closes the IE window it calls. I have it so that it changes the proper registry key to call the executable, but windows keeps shutting down while the script is functioning, instead of pausing and waiting for the user to enter information and close the IE window.

I saw this script, but I tried incorporating it, and it didn't work for me?

http://www.autoitscript.com/forum/index.ph...shutdown+button

Any ideas?

func _opentimesheet()

local $window_opentimesheet = GUICreate("Deltek Time Reminder", 250, 100)

local $opentimesheet_yes = GUICtrlCreateButton ("Yes" , 30, 60, 70, 25)
local $opentimesheet_no = GUICtrlCreateButton ("No" , 150, 60, 70, 25)
local $message = GUICtrlCreateLabel("Have you entered your time for " & @cr & "   the day, into website yet?", 50,10,200,50)


GUISetState()

While 1
    
    $opentimesheet = GUIGetMsg()
    
    If $opentimesheet = $GUI_EVENT_CLOSE Then Exit
    
        
    
    If $opentimesheet = $opentimesheet_no Then 
        
        _IECreate ('https://www.website.com/welcome.msv')
        
    
        ExitLoop
    
    ElseIf $opentimesheet = $opentimesheet_yes then 
        ExitLoop; exit program


;~   EndIf
    Sleep(100)
    EndIf
WEnd

GUIDelete($window_opentimesheet)



EndFunc

Share this post


Link to post
Share on other sites



I'm trying to pause a shutdown or logoff and run this script, and not continue with the shutdown or logoff until the user closes the IE window it calls. I have it so that it changes the proper registry key to call the executable, but windows keeps shutting down while the script is functioning, instead of pausing and waiting for the user to enter information and close the IE window.

I saw this script, but I tried incorporating it, and it didn't work for me?

http://www.autoitscript.com/forum/index.ph...shutdown+button

Any ideas?

func _opentimesheet()

local $window_opentimesheet = GUICreate("Deltek Time Reminder", 250, 100)

local $opentimesheet_yes = GUICtrlCreateButton ("Yes" , 30, 60, 70, 25)
local $opentimesheet_no = GUICtrlCreateButton ("No" , 150, 60, 70, 25)
local $message = GUICtrlCreateLabel("Have you entered your time for " & @cr & "   the day, into website yet?", 50,10,200,50)


GUISetState()

While 1
    
    $opentimesheet = GUIGetMsg()
    
    If $opentimesheet = $GUI_EVENT_CLOSE Then Exit
    
        
    
    If $opentimesheet = $opentimesheet_no Then 
        
        _IECreate ('https://www.website.com/welcome.msv')
        
    
        ExitLoop
    
    ElseIf $opentimesheet = $opentimesheet_yes then 
        ExitLoop; exit program


;~   EndIf
    Sleep(100)
    EndIf
WEnd

GUIDelete($window_opentimesheet)



EndFunc
This was posted just a day or two ago=) Shows for XP and Vista/7.

http://www.autoitscript.com/forum/index.ph...st&p=690956

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