Jump to content

DonChunior

Active Members
  • Posts

    90
  • Joined

  • Last visited

Reputation Activity

  1. Like
    DonChunior reacted to Jos in Visual Studio Code Extension currently available and future plans for SciTE?   
    All,
    I see that there are multiple efforts to create/maintain an AutoIt3 Visual Studio Code extension, and I would like to open a discussion to see how that can be streamlined/merged/done more effectively so we can come up with the one that's preferred.
    I have been toying with the idea to stop the development of all the LUA extra's used by SciTE and start using VSCode for the more advanced way of developing AutoIt3 scripts, as many things a way after when the extension supports it, like running au3check on save so you just click the problems tab to see the warnings/errors of the currently opened scripts.
    So I have been working on making the utilities packaged with SciTE4AutoIt3 suitable to run stand-alone without the need for wrapping them with AutoIt3Wrapper, with the plan to be able to make them all more generic usable for any editor. They need to support UTF8 & ANSI encoded files, even when through includes the encoding is mixed. 
    I have modified AutoIt3Wrapper to stop renaming and changing encoding of script/include files, and updated Tidy/Au3check/Au3stripper to support special characters in filenames and mixed ANSI/UTF8 file encoding and the generated console output is UTF8.
    I have been toying a bit with the VSCODE extension maintained by Damian (just picked one without looking at any others) and made some modifications locally for testing. Run au3check (Ctrl+F5), Tidy (Ctrl+t),  Au3Stripper (Ctrl+Shift+o)  without using AutoIt3Wrapper.
    Other already standardly available option (Run/Compile) still run via AutoIt3Wrapper as there is an added value doing it that way.
    I really like what I see and think this is a good way forward.
    So...  I like to hear how you all think about this and possibly your preferred VSCode autoIt3 extension with reasons why.
    Also feels as a waste of effort when so many are making their own version of an extension instead of bundling the effort making one really nice one with all required features.
    Thoughts/Opinions?
  2. Like
    DonChunior got a reaction from Danyfirex in Problem determining the adapter GUID when using the Network List Manager COM interface   
    Hello @Danyfirex and @Nine,
    thank you both COM professionals - your solutions work!
    What would I do without specialists like you? I would have to stay stupid forever. 🤗
    Best regards from Austria,
    DonChunior
  3. Like
    DonChunior reacted to Nine in Problem determining the adapter GUID when using the Network List Manager COM interface   
    The problem is that those objects inherit from IDispatch, you will need to add the methods before, like this :
    Interface() Func Interface() Local Const $tagIDispatch = _ "GetTypeInfoCount hresult(dword*);" & _ "GetTypeInfo hresult(dword;dword;ptr*);" & _ "GetIDsOfNames hresult(struct*;struct*;dword;dword;struct*);" & _ "Invoke hresult(uint;struct*;dword;word;struct*;struct*;ptr;uint*);" Local Const $sCLSID_NetworkListManager = "{DCB00C01-570F-4A9B-8D69-199FDBA5723B}" Local Const $sIID_INetworkListManager = "{DCB00000-570F-4A9B-8D69-199FDBA5723B}" Local Const $sTag_INetworkListManager = $tagIDispatch & _ "GetNetworks hresult(int;ptr*);" & _ "GetNetwork hresult(ptr;ptr*)" & _ "GetNetworkConnections hresult(ptr*);" & _ "GetNetworkConnection hresult(ptr;ptr*);" & _ "IsConnectedToInternet hresult(short*);" & _ "IsConnected hresult(short*);" & _ "GetConnectivity hresult(int_ptr*);" & _ "SetSimulatedProfileInfo hresult(struct*);" & _ "ClearSimulatedProfileInfo hresult();" Local $oNLM_INetworkListManager = ObjCreateInterface($sCLSID_NetworkListManager, $sIID_INetworkListManager, $sTag_INetworkListManager) ConsoleWrite(IsObj($oNLM_INetworkListManager) & @CRLF) Local $hResult, $oNWCs $hResult = $oNLM_INetworkListManager.GetNetworkConnections($oNWCs) ConsoleWrite($hResult & "/" & $oNWCs & @CRLF) EndFunc ;==>Interface  
  4. Thanks
    DonChunior reacted to Danyfirex in Problem determining the adapter GUID when using the Network List Manager COM interface   
    Maybe this;
     
    Local Const $tagIDispatch = _ "GetTypeInfoCount hresult(dword*);" & _ "GetTypeInfo hresult(dword;dword;ptr*);" & _ "GetIDsOfNames hresult(struct*;struct*;dword;dword;struct*);" & _ "Invoke hresult(uint;struct*;dword;word;struct*;struct*;ptr;uint*);" Local Const $sIID_INetworkConnection = "{DCB00005-570F-4A9B-8D69-199FDBA5723B}" Local Const $sTag_INetworkConnection = $tagIDispatch & _ "GetNetwork hresult()" & _ "IsConnectedToInternet hresult();" & _ "IsConnected hresult();" & _ "GetConnectivity hresult();" & _ "GetConnectionId hresult();" & _ "GetAdapterId hresult(clsid*);" & _ "GetDomainType hresult(int*);" Local $oObj = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") ;NetworkListManager Local $oConnections = $oObj.GetNetworkConnections() For $oConnection In $oConnections Local $oConnectionCast = ObjCreateInterface($oConnection, $sIID_INetworkConnection, $sTag_INetworkConnection) Local $GUID = "" Local $iDomainType=0 $oConnectionCast.GetAdapterId($GUID) $oConnectionCast.GetDomainType($iDomainType) ConsoleWrite("GetAdapterId: " & $GUID & @CRLF) ConsoleWrite("GetDomainType: " & $iDomainType & @CRLF) ;~ ConsoleWrite($oConnection.GetAdapterId & @CRLF) ;this will not work ;~ ConsoleWrite($oConnection.GetDomainType & @CRLF) ;this will work Next  
     
    Saludos
  5. Thanks
    DonChunior reacted to Nine in Problem determining the adapter GUID when using the Network List Manager COM interface   
    Or a full interface version :
    #include <Constants.au3> Opt("MustDeclareVars", True) Interface() Func Interface() Local Const $sTagIDispatch = _ "GetTypeInfoCount hresult(dword*);" & _ "GetTypeInfo hresult(dword;dword;ptr*);" & _ "GetIDsOfNames hresult(struct*;struct*;dword;dword;struct*);" & _ "Invoke hresult(uint;struct*;dword;word;struct*;struct*;ptr;uint*);" Local Const $sCLSID_NetworkListManager = "{DCB00C01-570F-4A9B-8D69-199FDBA5723B}" Local Const $sIID_INetworkListManager = "{DCB00000-570F-4A9B-8D69-199FDBA5723B}" Local Const $sTag_INetworkListManager = $sTagIDispatch & _ "GetNetworks hresult(int;ptr*);" & _ "GetNetwork hresult(ptr;ptr*)" & _ "GetNetworkConnections hresult(ptr*);" & _ "GetNetworkConnection hresult(ptr;ptr*);" & _ "IsConnectedToInternet hresult(short*);" & _ "IsConnected hresult(short*);" & _ "GetConnectivity hresult(int_ptr*);" & _ "SetSimulatedProfileInfo hresult(struct*);" & _ "ClearSimulatedProfileInfo hresult();" Local Const $sIID_IEnumNetworkConnections = "{DCB00006-570F-4A9B-8D69-199FDBA5723B}" Local Const $sTag_IEnumNetworkConnections = $sTagIDispatch & _ "NewEnum hresult(ptr*);" & _ "Next hresult(int;ptr*;int*);" & _ "Skip hresult(int);" & _ "Reset hresult();" & _ "Clone hresult(ptr*);" Local Enum $NLM_CONNECTIVITY_DISCONNECTED, $NLM_CONNECTIVITY_IPV4_NOTRAFFIC, $NLM_CONNECTIVITY_IPV6_NOTRAFFIC, _ $NLM_CONNECTIVITY_IPV4_SUBNET = 0x10, $NLM_CONNECTIVITY_IPV4_LOCALNETWORK = 0x20, $NLM_CONNECTIVITY_IPV4_INTERNET = 0x40, _ $NLM_CONNECTIVITY_IPV6_SUBNET = 0x100, $NLM_CONNECTIVITY_IPV6_LOCALNETWORK = 0x200, $NLM_CONNECTIVITY_IPV6_INTERNET = 0x400 Local Const $sIID_INetworkConnection = "{DCB00005-570F-4A9B-8D69-199FDBA5723B}" Local Const $sTag_INetworkConnection = $sTagIDispatch & _ "GetNetwork hresult(ptr*)" & _ "IsConnectedToInternet hresult(boolean*);" & _ "IsConnected hresult(boolean*);" & _ "GetConnectivity hresult(int*);" & _ "GetConnectionId hresult(clsid*);" & _ "GetAdapterId hresult(clsid*);" & _ "GetDomainType hresult(int*);" Local Enum $NLM_NETWORK_CATEGORY_PUBLIC, $NLM_NETWORK_CATEGORY_PRIVATE, $NLM_NETWORK_CATEGORY_DOMAIN_AUTHENTICATED Local Const $sIID_INetwork = "{DCB00002-570F-4A9B-8D69-199FDBA5723B}" Local Const $sTag_INetwork = $sTagIDispatch & _ "GetName hresult(wstr*);" & _ "SetName hresult(wstr);" & _ "GetDescription hresult(wstr*);" & _ "SetDescription hresult(wstr);" & _ "GetNetworkId hresult(clsid*);" & _ "GetDomainType hresult(int*);" & _ "GetNetworkConnections hresult(ptr*);" & _ "GetTimeCreatedAndConnected hresult(int*;int*;int*;int*);" & _ "IsConnectedToInternet hresult(boolean*);" & _ "IsConnected hresult(boolean*);" & _ "GetConnectivity hresult(int*);" & _ "GetCategory hresult(int*);" & _ "SetCategory hresult(int);" Local $pNWCs, $iNum, $pConn, $oNWC, $sGUID, $pNet, $oNet, $sName Local $oNLM_INetworkListManager = ObjCreateInterface($sCLSID_NetworkListManager, $sIID_INetworkListManager, $sTag_INetworkListManager) If Not IsObj($oNLM_INetworkListManager) Then Exit MsgBox($MB_OK, "Error", "INetworkListManager") $oNLM_INetworkListManager.GetNetworkConnections($pNWCs) Local $oNWCs = ObjCreateInterface($pNWCs, $sIID_IEnumNetworkConnections, $sTag_IEnumNetworkConnections) If Not IsObj($oNWCs) Then Exit MsgBox($MB_OK, "Error", "IEnumNetworkConnections") While True $oNWCs.Next(1, $pConn, $iNum) If Not $iNum Then ExitLoop $oNWC = ObjCreateInterface($pConn, $sIID_INetworkConnection, $sTag_INetworkConnection) If Not IsObj($oNWC) Then Exit MsgBox($MB_OK, "Error", "INetworkConnection") $oNWC.GetAdapterId($sGUID) ConsoleWrite("GetAdapterId: " & $sGUID & @CRLF) $oNWC.GetNetwork($pNet) $oNet = ObjCreateInterface($pNet, $sIID_INetwork, $sTag_INetwork) If Not IsObj($oNet) Then Exit MsgBox($MB_OK, "Error", "INetwork") $oNet.GetName($sName) ConsoleWrite("GetName: " & $sName & @CRLF) WEnd EndFunc ;==>Interface  
  6. Thanks
    DonChunior reacted to water in Getting information about active domain network   
    I started here to get a list of networks.
    MS information can be found here.
  7. Thanks
    DonChunior reacted to water in Active Directory UDF - Help & Support (III)   
    Version 1.6.3.0 of the UDF has been released.
    Please test before using in production!
    For download please see my signature.
  8. Thanks
    DonChunior reacted to water in Active Directory UDF: _AD_GetObjectsInOU doesn't return the expected result   
    What is the value of @error and @extended after calling _AD_GetObjectsInOu when searching for GUID?
    Looks like you need to enter the GUID in a special format as described here.
     
  9. Thanks
    DonChunior reacted to TheXman in Problem with encryption, decryption and the Credential Manager   
    One of the simplest ways would be to store your encrypted data as text using a binary-to-text encoding scheme like Base64.
  10. Like
    DonChunior reacted to Danyfirex in Problem with encryption, decryption and the Credential Manager   
    Hello, Maybe using https://stackoverflow.com/questions/9221245/how-do-i-store-and-retrieve-credentials-from-the-windows-vault-credential-manage
     
    Saludos
  11. Like
    DonChunior reacted to Andreik in Problem with encryption, decryption and the Credential Manager   
    Well, when you store the encrypted string in Credential Manager you might end there with some characters that might not be accepted. Let's take for example the string WhatIsHereTheProblem. After you encrypt that string you have a binary like this one 0xD30B275190CF6055989600883E25CDC3D1BA0D9C. It's easy to spot that 11th character is null character (00). Convert that binary to string and you already send messy data to Credential Manager so don't expect anything good when you try to read and decrypt what Credential Manager saved. So it's not about length but about what you get after encryption. You can test that with a string even longer like "Very longggggggggggggggg" and you can see this one doesn't have any problem, but it's just a happy case.
  12. Thanks
    DonChunior reacted to Jos in Issue when installing SciTE4AutoIt3 using account without local admin rights   
    I have updated the current production installer with the newer version of SciTEConfig.au3 which will do these steps when there is a different Username in the parent process tree:
    Copy  %LOCALAPPDATA%\AutoIt v3  directory from the Admin username to the original user. Update the  "HKEY_USERS\SID\Environment" key "SCITE_USERHOME" for the SID of the original Username. The Environment is also updated so it should work without a restart of Explorer or Logout&Login  Additional install_user.log will be generated in the SciTE directory with info about the above. Update Tidy to avoid the initial SciTEConsole Debug messages hanging it for a while. Please give that a try to see if that works and let me know, so I can implement this for the next release.
    Jos
  13. Like
    DonChunior reacted to mistersquirrle in DllClose() is still a good idea? - (Moved)   
    Maybe not really needed anymore on Windows 10/11 and/or current version of AutoIt. I see it there as a "good practice" for managing your resources if you ever write in other languages where it matters more. So it's not "useless and superfluous", and it might be useful for people still using older versions of Windows that maybe don't handle it as well.
    As Nine said, you're saving microseconds, but there is a small gain in opening the DLL yourself, around 9-10%. Unless you're making literally millions of calls though, it's not going to make much of a difference. Here's a test I did for 1,000,000 runs with kernel32 calling GetTickCount64:
    +———————————————+—————————————————+———————————————+——————————————+—————————————+ | Function Name | Time Taken (ms) | Avg Time (ms) | Std Dev (ms) | Faster By % | +———————————————+—————————————————+———————————————+——————————————+—————————————+ | DllCall | 8179.74 | 0.0082 | 0.0056 | 0.00 | +| DllCall(Open) | 7444.30 | 0.0074 | 0.0032 | 8.99 | +———————————————+—————————————————+———————————————+——————————————+—————————————+ | Total time | 15624.03 | | | | +———————————————+—————————————————+———————————————+——————————————+—————————————+ So, is it worth doing? Yeah, why not? Is it necessary if you open a DLL to close it? Nah, AutoIt and/or Windows will manage that pretty well for you. Is not doing it hurting you? Nah.
  14. Thanks
    DonChunior reacted to Jos in Issue when installing SciTE4AutoIt3 using account without local admin rights   
    I think I can adapt the section in SciTEConfig.au3, which is ran at the end of the install process to finalize some things.
    I added some extra code which scans through the parent processes and when a different name is found, it will copy the %LOCALAPPDATA% from the Installer UserName to the Parent UserName directory and also update the "HKEY_USERS\SID\Environment" key "SCITE_USERHOME".
    So all should be good after the Environment load is forced (Kill Explorer or LogOff/LogOn)
    Still need to do some testing with the actual installer but running the script itself elevated with an different admin account seems to work fine.
  15. Thanks
    DonChunior reacted to Jos in Issue when installing SciTE4AutoIt3 using account without local admin rights   
    Ok...  I have tested a bit in VM and see indeed in the install.log that the Admin user is used as target for the %localappdata% files and Registry settings.
    Next question to answer: How can I get the original UserId in this situation so I can use that in the NSIS script....   needs some investigation.
  16. Thanks
    DonChunior got a reaction from argumentum in Issue when installing SciTE4AutoIt3 using account without local admin rights   
    My use case is that only I am working on the computer with SciTE4AutoIt3, but the installation has to be done with an admin account as described before.
  17. Thanks
    DonChunior reacted to Jon in AutoIt v.3.3.16.1 Released   
    AutoIt v3.3.16.1 has been released. 
    Thanks to @jpm and the MVPs who were responsible for the majority of code in this version.
    Download it here.
    Complete list of changes: History
  18. Like
    DonChunior reacted to mLipok in AutoIt 3.3.16.1 Release Candidate   
    Support for IE is ended. But the IE activex component will be available for next few years.
  19. Like
    DonChunior reacted to Danp2 in Can use _WebDriver for Normal Chrome ?   
    It's easy to hide the "automated test software" notification. Simple add this line to your setup routine --
    _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation') If you aren't using the _WD_Capabilities* functions to build your capabilities string, then simple add this to your existing string --
    "excludeSwitches":[ "enable-automation" ] An existing Chrome instance would need to have remote debugging enabled for you to attach to it with webdriver. Suggest that you search the forum on the term "remote-debugging-port" to locate past discussions.
  20. Like
    DonChunior reacted to Jon in AutoIt 3.3.16.1 Release Candidate   
    https://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.3.16.1-rc2-setup.zip
    https://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.3.16.1-rc2.zip
    3.3.16.1 (xxx, 2022) (Release) AutoIt: - Fixed #3866: REGEXPCLASS broken in 3.3.16.0. - Fixed #3865: Image Control resizing behave as forced $GUI_DOCKWIDTH and $GUI_DOCKHEIGHT. - Fixed #3864: StringRegExp() crash with patterns that cause infinite recursion. - Fixed #3876: Hex Number Arithmetic is incorrect. - Fixed #3869: Subtraction operator before power operation is parsed incorrectly. - Fixed #3879: Dim Map to Array. - Fixed #3875: GUICtrlSetResizing() performance by Reverting #3831: GUICtrlSetPos() $GUI_DOCKHCENTER. - Fixed: missing uninstalling file GUICtrlInternals.au3 since 3.3.15.2. UDFs: - Added: UBound[2] example. - Added: StringRegExp[5] example. - Added: _GUICtrlEdit_SetPadding() function and example. - Added: _WinAPI_RegDeleteKey() can use $hKey as in RegRead(). - Added #3863: _WinAPI_GetCapture(). - Added: Allows _DebugArrayDisplay() to be used in UserFunc. - Added: _ArrayDisplay() and _DebugArrayDisplay() support Min Column width. - Added: _Array2DCreate() support 1D and/or 2D arrays. - Added: _DebugReportVar() display DllStruct content. - Added: _ArrayDisplay() and _DebugArrayDisplay() display {Array[dims]}, {Map[nentry]} and {Object}. - Fixed #3867: Changes in 'SecurityConstants.au3' to avoid name conflict. THIS IS A SCRIPT BREAKING CHANGE - Fixed: Regression in 3.3.15.1, _WinAPI_RegCreateKey() and _WinAPI_RegOpenkey(). - Fixed: Regression of #3835 on _GDIPlus_GraphicsGet*(). - Fixed #3871: _ArrayDisplay() Hang sorted array with Null element. - Fixed: _FTP_FileGetSize() very big size. - Fixed #3872: FTP-Server in AutoIt Help no longer accessible. - Fixed #3877: GUICtrlCreateLabel() overlapping controls doc precision ($WS_CLIPSIBLINGS). - Fixed #3883: _DebugArrayDisplay() produces uncalled console message.  
  21. Like
    DonChunior reacted to Jon in AutoIt 3.3.16.1 Release Candidate   
    https://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.3.16.1-rc1-setup.zip
    https://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.3.16.1-rc1.zip
    3.3.16.1 (xxx, 2022) (Release) AutoIt: - Fixed #3866: REGEXPCLASS broken in 3.3.16.0. - Fixed #3875: GUICtrlSetResizing() performance. - Fixed #3865: Image Control resizing behave as forced $GUI_DOCKWIDTH and $GUI_DOCKHEIGHT. - Fixed #3764: StringRegExp() crash with patterns that cause infinite recursion. - Fixed #3876: Hex Number Arithmetic is incorrect. - Fixed #3879: Dim Map to Array. UDFs: - Fixed #3867: Changes in 'SecurityConstants.au3' to avoid name conflict. THIS IS A SCRIPT BREAKING CHANGE - Added: UBound[2] example. - Added: StringRegExp[5] example. - Added: _GUICtrlEdit_SetPadding() function and example. - Fixed: Regression in 3.3.15.1, _WinAPI_RegCreateKey() and _WinAPI_RegOpenkey(). - Added: _WinAPI_RegDeleteKey() can use $hKey as in RegRead(). - Fixed: Regression of #3835 on _GDIPlus_GraphicsGet*(). - Fixed #3871: _ArrayDisplay() Hang sorted array with Null element. - Fixed: _FTP_FileGetSize() very big size. - Fixed #3872: FTP-Server in AutoIt Help no longer accessible. - Fixed #3877: GUICtrlCreateLabel() overlapping controls doc precision ($WS_CLIPSIBLINGS). - Added #3863: _WinAPI_GetCapture(). - Added: Allows _DebugArrayDisplay() to be used in UserFunc. - Added: _ArrayDisplay() and _DebugArrayDisplay() support Min Column width. - Added: _Array2DCreate() support 1D and/or 2D arrays. - Added: _DebugReportVar() display DllStruct content. - Fixed #3883: _DebugArrayDisplay() produces uncalled console message. - Added: _ArrayDisplay() and _DebugArrayDisplay() display {Array[dims]}, {Map[nentry]} and {Object}.  
  22. Like
    DonChunior reacted to water in Active Directory UDF - Help & Support (III)   
    MS tells us that the userWorkstations attribute should not be used any longer: https://docs.microsoft.com/en-za/windows/win32/adschema/a-userworkstations
    Recommended setting is described here: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/allow-log-on-locally
    Might be the cause of your problem.
    Good reading: http://woshub.com/restrict-workstation-logon-ad-users/
  23. Thanks
    DonChunior reacted to Subz in Active Directory UDF - Help & Support (III)   
    Are you sure the attribute is being replicated between DCs?  In our environment the isMemberOfPartialAttributeSet is set to null meaning it's not replicated.  To verify used the following:
    Computer running script is connected to DC1
    Added @ComputerName to userWorkstations attribute on DC2
    nb: Noticed that the data wasn't replicated to DC1 Running the script I received the same results as above Added @ComputerName to userWorkstations attribute on DC1 Ran the script without error and it returned the @ComputerName correctly
  24. Thanks
    DonChunior reacted to water in Active Directory UDF - Help & Support (III)   
    Will have a look
  25. Like
    DonChunior reacted to water in Active Directory UDF - Help & Support (III)   
    & stands for AND
    | stands for OR
    You are looking for groups whose name start with APZ_ OR APPL_ OR CPZ_PRD_. The syntax gets a bit more complex now:
    "(&(objectcategory=group)(|(name=APPL_*)(name=APZ_*)(name=CPZ_PRD_*)))" See "Nested Operation" on the SelfADSI page.
     
×
×
  • Create New...