VAN0 Posted October 14 Posted October 14 (edited) My script has these: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_Description=blah #AutoIt3Wrapper_Res_Fileversion=1.6.7.26 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_Fileversion_First_Increment=y #AutoIt3Wrapper_Res_ProductVersion=1.6.7 #AutoIt3Wrapper_Res_LegalCopyright=©blah #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Res_Icon_Add=myicon.ico #AutoIt3Wrapper_Run_Stop_OnError=y #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Ignore_Funcs=_FileSysMonShellEventHandler #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;There were several "intercept shutdown" examples in the forum. ;This is one of them: Global $b_ShutdownInitiated = False $WM_QUERYENDSESSION = 0x11 GUIRegisterMsg($WM_QUERYENDSESSION, "System_Shutdown") GUICreate("PreventShutdownGUI") GUISetState(@SW_HIDE) ; set highest notification level If Not _SetProcessShutdownParameters(0xFFF) Then ; MSDN says maximum is 0x4FF, but it worked for me If Not _SetProcessShutdownParameters(0x4FF) Then ; MSDN says this is reserved for System, but worked for me _SetProcessShutdownParameters(0x3FF) ; highest not reserved number, if everything else does not work EndIf EndIf It doesn't have visible GUI When compiled it shows console window (like CMD) with all my ConsoleWrites outputs in it. It also creates an issue when I execute a CUI application via Run() it doesn't create a new CUI window for this application and shows application's output inside its own CUI window. Has anyone experienced something like this? and most importantly how do I fix it? Edited October 14 by VAN0
Solution VAN0 Posted October 14 Author Solution Posted October 14 So, it turned out the issue is a side effect of a work around for Is there a reason ConsoleWrite converts everything to ANSI and doesn't support Unicode? , specifically _CUI_ConsoleWrite function. Apparently it opens up CUI window whether it compiled as GUI or CUI
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