Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/20/2023 in Posts

  1. ...just an idea... ..and the idea is that you don't have to go far as they are in the help file. Again, just an idea.
    2 points
  2. SOLVE-SMART

    AutoIt Cheat Sheet

    Hi folks, 💡 I completed a "draft" version of my AutoIt (en) Cheat Sheet 😀 . The draft as website on cheatography => a website which is made to create and publish cheat sheets by the help of templates. The draft as PDF => generated by cheatography. May I ask you folks now for a review and an assessment please 🤞 ? In case it's fine, I will publish it. Don't get confused please, if you expected way more. This content represents basically what a common Cheat Sheet does, nothing more No additional sources (next to the help), because there is no special information, only static things of the language. Best regards Sven
    1 point
  3. Hi @mLipok, files get put there (AppData\Local\VirtualStore) when an application that does not have administrative power tries and put files to a location that requires administrative power (run as admin). The folder prevents the application from crashing and burning. It's a old windows concept. Why do you ask for? You can move files from this "VirtualStore" folder to wherever you want after they are in this folder. Best regards Sven
    1 point
  4. orbs

    Encrypt embedded password

    @Ebola57, what you are asking is both logically and technically impossible. but when there's a will, there's a way... storing the password in your compiled script is prone to reverse engineering, that much is true. storing the password in any form that is available for the script, makes it available for the user as well. if you insist the user must not enter any password, then the "hacker" (whom you want to secure the access from) does not need to, either. this pretty much cripples your security efforts. the official way of doing this is managing and auditing the permissions on the resource level, not on the client level, same way you do with any network share or print queue in your network. so it isn't your script responsibility anymore to handle the connection, it is the user that is allowed or denied access. there are however ways to store credentials, that may be acceptable by your security authority (to which i assume you need to adhere). for example, using the Windows built-in credential manager; to my experience, that typically raises no concerns. 3rd-party credential manager app may be acceptable, especially if you have an enterprise-class one already installed. any SSO (single-sign-on) means is probably fine, too. that's on the formality side. on the practical side, consider this: is reverse engineering really a considerable threat? what is the interest for a hacker to hack your password, and how much time and effort will he invest in doing so? if he does, then - how easy would it be for you to identify illegitimate access and mitigate it? assuming you expect only your script to access the resource, and you know what your script is supposed to do, then identifying access by someone or something that is not your script should not be that difficult. my advice - have some coffee with your security guy, explain and discuss the issue. he may come up with a completely different approach... i'm certain you'll figure this out together. P.S. lots of words, no code. sorry 🙂 but that's not a coding issue you have here.
    1 point
  5. zid

    Get NetConnectionIDs

    Try this: Local $objWMIService = ObjGet("winmgmts:\\localhost\root\cimv2") Local $aItems = $objWMIService.ExecQuery _ ("SELECT NetConnectionID FROM Win32_NetworkAdapter WHERE NetConnectionStatus='2' ", "WQL") For $objItem In $aItems ConsoleWrite($objItem.NetConnectionID & @CRLF) Next
    1 point
  6. Use _FileListToArray to create the list of files to attach. _FileListToArray supports wildcards.
    1 point
  7. That udf doesn't support filemasks and will require exactfiles names.
    1 point
  8. smbape

    Mediapipe UDF

    Update mediapipe to 0.9.1 COM registration is no longer required
    1 point
  9. smbape

    OpenCV v4 UDF

    Update opencv to 4.7.0 COM Registration is no longer required
    1 point
  10. I did some searching and found this, and looks like that it works: #include <APIConstants.au3> #include <WinAPIGdi.au3> #include <WinAPIGdiDC.au3> #include <WinAPIDiag.au3> #include <StructureConstants.au3> $hGUI = GUICreate("Sample GUI", 400, 300, 1200) GUISetFont(48, 400, 0, "Tahoma") Local $idLabel = GUICtrlCreateLabel("Sample Text", 10, 10) Local $hLabel = GUICtrlGetHandle($idLabel) GUISetState(@SW_SHOW, $hGUI) WinWaitActive($hGUI) $aFont = GUICtrlGetFont($idLabel) _ArrayDisplay($aFont) #cs [0] - Size [1] - Weight [2] - Attribute [3] - Name [4] - Quality #ce Func GUICtrlGetFont($CtrlID) Local $hWnd = GUICtrlGetHandle($CtrlID) If Not $hWnd Then Return 0 EndIf Local $Ret, $hDC, $hFont, $tFont Local $aFont = 0 $hDC = _WinAPI_GetDC($hWnd) $hFont = _SendMessage($hWnd, $WM_GETFONT) $tFont = DllStructCreate($tagLOGFONT) $Ret = DllCall('gdi32.dll', 'int', 'GetObjectW', 'ptr', $hFont, 'int', DllStructGetSize($tFont), 'ptr', DllStructGetPtr($tFont)) If (Not @error) And ($Ret[0]) Then Dim $aFont[5] = [0] $aFont[0] = -Round(DllStructGetData($tFont, 'Height') / _WinAPI_GetDeviceCaps($hDC, $LOGPIXELSY) * 72, 1) $aFont[1] = DllStructGetData($tFont, 'Weight') $aFont[2] = BitOR(2 * (DllStructGetData($tFont, 'Italic') <> 0), 4 * (DllStructGetData($tFont, 'Underline') <> 0), 8 * (DllStructGetData($tFont, 'Strikeout') <> 0)) $aFont[3] = DllStructGetData($tFont, 'FaceName') $aFont[4] = DllStructGetData($tFont, 'Quality') EndIf _WinAPI_ReleaseDC($hWnd, $hDC) Return $aFont EndFunc ;==>GUICtrlGetFont I haven't really looked into why it works and yours doesn't (for me), but it did return the font and size correctly when I tested it with your GUI code. Try it out, see if that works for you, and what Yashied has done differently.
    1 point
  11. @pixelsearch Well done, your tool is very good, especially (and not only) for beginners. With the guide on the right click, it guides you briefly, and explains what the symbols do. Congratulations ! if i could suggest, since I see that there is a position available on the right of the tabs. or a hole between the buttons to give the complete code, for copying in the form (ready for delivery) #include <Debug.au3> Local $sRegex = '"data":"([^"]+)"' Local $sString = '[[{"records":{"data":"random data"}}],[{"filtered":{"data":"unknown variable"}}],[{"duplicate":{"data":"not constant"}}],{"subject":"Test"}]' Local $aArray = StringRegExp($sString, $sRegex, 3) _DebugArrayDisplay($aArray)
    1 point
  12. I believe the better way to do all of this would be to get the hdc for the control and send the proper message to have the winproc send you the hBrush for the background Something like this (for static controls at least) Func GUICtrlGetBkColor($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) Local $hWnd_Main = _WinAPI_GetParent ($hWnd) Local $hDC = _WinAPI_GetDC($hWnd) Local $hBrush = _SendMessage($hWndMain, $WM_CTLCOLORSTATIC, $hdc, $hWnd) Local $iColor = _GetBrushColor($hBrush) _WinAPI_ReleaseDC($hWnd, $hDC) Return $iColor EndFunc
    1 point
  13. Hi, by working in an large script, sometimes it's usefull to have two parts of this script side by side. It's not possible to Tile/MDI SciTE. SciTE has an option to arrange the windows by opening an second instance (see chapter "# Window sizes and visibility" in properties). But by using this, you can't open the first instance maximized. And by closing the second instance has the other one always a small size. Thats why i've made a launcher, to arrange two instances of SciTE automatically. With a shortcut (i.e. Ctrl+Alt+T) will opened a second instance of SciTE with the current script. If you make changes in the script and want to toggle between both instances, it's recommended to save the script. Then are all changes available in both instances. By closing of one instance will the other one shown on full screen (but if you don't like that, you can change the code to store the first opened size and restore it). Standard config of SciTE allows no 2nd instance, you must add following line to your SciTEUser.properties: check.if.already.open=0 To create the shortcut you must also add these lines: # 43 SciTE-2ndWindow command.43.*.au3="$(SciteDefaultHome)\SciTE.exe" "$(FilePath)" command.name.43.*.au3=2nd SciTE Window command.save.before.43.*.au3=1 command.is.filter.43.*.au3=1 command.shortcut.43.*.au3=Ctrl+Alt+T Here i've used number 43. If you have no own entry in your SciTEUser.properties, you can start with number 36. Otherwise take the next one. I've compiled the script and added to "Autostart". And now, everytime i want to see two parts of an script, i hit Ctrl+Alt+T and it's done. Opt("TrayIconHide", 1) Global $List While True Do Sleep(500) $List = WinList('[CLASS:SciTEWindow]') Until $List[0][0] = 2 WinMove($List[1][1], '', 0, 0, @DesktopWidth/2, @DesktopHeight) WinMove($List[2][1], '', @DesktopWidth/2, 0, @DesktopWidth/2, @DesktopHeight) Do Sleep(500) $List = WinList('[CLASS:SciTEWindow]') Until $List[0][0] = 1 WinMove($List[1][1], '', 0, 0, @DesktopWidth, @DesktopHeight) WEndSciTELauncher.au3
    1 point
×
×
  • Create New...