hiddenwindow Posted December 8, 2023 Posted December 8, 2023 I have a compiled AutoIt3 script that shall start a Python script. I use Run(...) for this. However, depending on the way the compiled is started, the window does not show if the compiled script itself has no window handle. Why is this the case? All is fine if I start the compiled script in such a way it has its own window. My platform is Windows 10. For reference, a "minimum" sample that shows the problem. (As $PID_Progress is non-zero, it is certain that the process is actually started in both cases.) #requireadmin #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <File.au3> #include <Date.au3> #include <WinAPISysWin.au3> #include <WinAPI.au3> ; logging helper function Func _Trace(Const $msg) Local $logFile = FileOpen(@ScriptDir & "\testpython.log",$FO_APPEND ) FileWrite($logFile, _Now() & " : " & $msg & @CRLF) FileClose($logFile) EndFunc ; Script Start ProgressOn("Windows Snapin", "Installation", "Start installing packages", -1, -1, $DLG_MOVEABLE) _Trace("Before executing Python") ; show progress window Local $PID_Progress = Run(@ComSpec & " /c " & "InstallerProgress.py", "", @SW_MAXIMIZE, $RUN_CREATE_NEW_CONSOLE) _Trace("After executing Python" & $PID_Progress) ; Script end
Developers Jos Posted December 8, 2023 Developers Posted December 8, 2023 Moved to the appropriate forum. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
paw Posted December 8, 2023 Posted December 8, 2023 Quote $RUN_CREATE_NEW_CONSOLE (0x10000) = The child console process should be created with it's own window instead of using the parent's window. This flag is only useful when the parent is compiled as a Console application. use #AutoIt3Wrapper_Change2CUI=y
hiddenwindow Posted January 2, 2024 Author Posted January 2, 2024 Thanks for the idea, but using #AutoIt3Wrapper_Change2CUI=y does not help. No UI is being shown (neither GUI, nor CUI).
ioa747 Posted January 2, 2024 Posted January 2, 2024 (edited) When the #AutoIt3Wrapper_Change2CUI=y directive is used call your application from the dos console Edited January 2, 2024 by ioa747 I know that I know nothing
Developers Jos Posted January 2, 2024 Developers Posted January 2, 2024 There is no relation with the showing of a gui and that directive! The directive is required to show consolewrite() output on the command prompt. ioa747 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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