donnyh13 Posted December 3, 2023 Posted December 3, 2023 Hi again Jos, I just tried to do a SyntaxCheck (ctrl+f5) and get this with your new AU3 Wrapper (hadn't done one since you posted the new one). Seems I'm missing FMIPC.au3 include?? LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 (edited) yea... the current version of AutoIt3Wrapper requires FMIPC.au3. Not sure whether I will add it internally or not, but please download that as well for now. Edited December 3, 2023 by Jos donnyh13 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.
donnyh13 Posted December 3, 2023 Posted December 3, 2023 Okay. Thanks Jos. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 Just included the FMIPC UDFs made by @argumentum inside of the AutoIt3Wrapper.au3 to avoid the need for extra downloads and uploaded the updated version to beta. the FMIPC.au3 is removed. donnyh13 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.
argumentum Posted December 3, 2023 Posted December 3, 2023 (edited) ..the new wrapper uses "AW_" instead of "AutoIt3Wrapper_". Could you set it back as it was ?. The ControlViewer skips these scripts while listing scripts. Otherwise I'll have to update the code just for that. And maybe other users have scripts written with the old string in mind too. Edited December 3, 2023 by argumentum added pic. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted December 3, 2023 Posted December 3, 2023 Global $IPCA = 0 ; IPCName for AdminLevel (shelled by Master in case of #RequireAdmin) ... ... If StringInStr($CMDLINERAW, "/runadmin") Then AutoItWinSetTitle($IPCA) therefore the title is zero instead of AutoIt3Wrapper_ or AW_ Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 (edited) 18 minutes ago, argumentum said: therefore the title is zero instead of AutoIt3Wrapper_ or AW_ Yea... moved the AutoItWinSetTitle($IPCA) to the section where the pid is retrieved from the commandline. tnx 43 minutes ago, argumentum said: the new wrapper uses "AW_" instead of "AutoIt3Wrapper_". Could you set it back as it was ?. Sure no issue, just made it shorter while coding for clarity, but no issue putting it back as it was. Updates made in current Beta. Edited December 3, 2023 by Jos argumentum 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.
argumentum Posted December 3, 2023 Posted December 3, 2023 (edited) Func _RestartReqAdmin() Local $temp_Script = _TempFile($TempDir, "~", ".au3") ; Start a new RunScript instances with @RequireAdmin and communicate via IPC Local $runline = "RunWait('""" & @AutoItExe & '" ' & StringReplace($cmdlineraw, " /run ", ' /RunAdmin ' & @AutoItPID & ' ') & ' '', "' & @WorkingDir & '")' FileWriteLine($temp_Script, '#NoTrayIcon') FileWriteLine($temp_Script, '#RequireAdmin') FileWriteLine($temp_Script, '#AutoIt3Wrapper_AutoIt3="' & $AutoIt3_PGM & '"') FileWriteLine($temp_Script, 'AutoItWinSetTitle("AutoIt3Wrapper_RunAsAdmin_" & @AutoItPID )') ; <---- I'll need this too FileWriteLine($temp_Script, $runline) I'll need this too, ..or something like that Edited December 3, 2023 by argumentum clarify request Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 3 minutes ago, argumentum said: I'll need this too, ..or something like that That should now be set correctly by line in this block, which i changed in the last version: right? Case $T_Var = "/runadmin" $Option = "RunAdmin" $x = $x + 1 ; Start IPC channel for this process $IPCA = "AutoIt3Wrapper_RunUserScript" & @AutoItPID $IPCCurrent = $IPCA _FMIPC_Create($IPCA) ; Get PID of Master AutoIt3Wrapper and Send the PID of this elevated version of AutoIt3Wrapper so they can communicate via IPC $PIDM = $CMDLINE[$x] $IPCM = "AutoIt3Wrapper_RunUserScript" & $PIDM ; add PID of the master AutoIt3Wrapper_RunUserScript AutoItWinSetTitle($IPCA) IPCWrite($IPCCurrent, $IPCM, "#$#APID:" & @AutoItPID & "#$#") argumentum 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.
argumentum Posted December 3, 2023 Posted December 3, 2023 Is not. The temp script does not have a prefix ( AutoIt3Wrapper_* ) to identify that is a process that is part of the wrapper. So AutoIt3Wrapper_ReqAdmin_* would be needed by ControlViewer Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 (edited) How are you testing this? I am not sure what you are looking at to determine this. As far as I can see the #requireAdmin reshelled script gets the Title set by these lines in the indicated code block: $IPCA = "AutoIt3Wrapper_RunUserScript" & @AutoItPID AutoItWinSetTitle($IPCA) so ... it has different name than you expect? Edited December 3, 2023 by Jos 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.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 I also see another issue which I was sure I tested but seem to fail now: Using the Ctrl+Break stops the process properly, but using SciTE menu Tools/ Stop Executing doesn't stop all shelled scripts, so I need some time to fix&test this. donnyh13 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.
argumentum Posted December 3, 2023 Posted December 3, 2023 48 minutes ago, Jos said: How are you testing this? #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** MsgBox(262144, @ScriptName, 'IsAdminn: ' & IsAdmin() & @LF & '@AutoItX64 : ' & @AutoItX64, 10) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted December 3, 2023 Posted December 3, 2023 51 minutes ago, Jos said: so ... it has different name than you expect? None. That's just fine. Is the temp script that should have a mention that is running as part of the wrapper. The line I added to the temp script: FileWriteLine($temp_Script, 'AutoItWinSetTitle("AutoIt3Wrapper_ReqAdmin_" & @AutoItPID )') ; <<< FileWriteLine($temp_Script, $runline) does just that. Should not affect anything other than set the title in the temp script used to restart as Admin, as far as I can see. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 (edited) 14 minutes ago, argumentum said: #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** MsgBox(262144, @ScriptName, 'IsAdminn: ' & IsAdmin() & @LF & '@AutoItX64 : ' & @AutoItX64, 10) How are you listing these exactly? Don't think this is generated from my AutoIt3Wrapper version...right? Scratch that...believe I understand now. Edited December 3, 2023 by Jos argumentum 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.
argumentum Posted December 3, 2023 Posted December 3, 2023 4 hours ago, argumentum said: The ControlViewer skips these scripts while listing scripts. Funny story: ... it seems that I never released the above version that exclude these files from view. 🙄 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 I am not familiar with that script so guess that is why. Ok, Have been messing a lot with the messages between all the different AutoIt3Wrapper instances and think I am getting close now. The mod you proposed is made for the tmp script and have hopefully fixed the closing of all scripts in all the different scenarios. Latest version in Beta. Jos argumentum and donnyh13 2 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.
argumentum Posted December 3, 2023 Posted December 3, 2023 23 minutes ago, Jos said: The mod you proposed is made for the tmp script Yes, thank you !. 24 minutes ago, Jos said: Have been messing a lot with the messages between all the different AutoIt3Wrapper instances and think I am getting close now. My Bluetooth MX ho my god is so good keyboard, does not have the break key So much for modern keyboards and I was going to ask, .. but then I heard your voice in my brain: "..look at the code.." IniRead($AutoIt3WapperIni, "Other", "SciTE_STOPEXECUTE", '^{BREAK}') So ok, I'll set ^{VOLUME_UP} in the ini. Thanks voice of Jos in my brain donnyh13 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted December 3, 2023 Author Developers Posted December 3, 2023 It is also a little hidden in the AutoIt3Wrapper.ini definition, but yes it probably isn't really clearly documented. My laptop also doesn't have a break and need to use fn+b to simulate break. argumentum 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.
donnyh13 Posted December 3, 2023 Posted December 3, 2023 Seems to be a performance boost for start up, such as when running AU3Check -- Thanks Jos! And Argumentum! argumentum 1 LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."
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