Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/04/2025 in Posts

  1. Here is the announced video, a little how-to one: 💡 Maybe I create few more videos like this for XPath usage and determination. I guess also for more JavaScript debugging (in the browser) etc. Time will show. Best regards Sven 👉 Btw: Forgive me, my spoken english is a bit rusty (as non native speaker). But for one take 🎬 only, it's not too bad (I hope so).
    3 points
  2. I am a special type of coder. I'd call me a channeler or medium that knows what is needed and then, just like an angel, forgot, as it's all an eternal now. ( meaning that I google like a maniac, copy and paste until am done, and go to sleep, not to remember what I did because I never knew how anything works ) But maybe those that know GDI can cook an image out of code ( like in the SizeGrip code ) and that'd be nice to have. Or find a way to just change the color of the checkbox text, because after all, a checkbox is a button of sorts ( low level wise ).
    1 point
  3. #AutoIt3Wrapper_Res_Icon_Add=unchecked.ico, 201 #AutoIt3Wrapper_Res_Icon_Add=checked.ico, 202 Global $g_Compiled = Int(@AutoItExe = @ScriptFullPath) ; better than @Compiled ConsoleWrite("- $g_Compiled = " & $g_Compiled & @CRLF) ; this part must be applied AFTER dark mode has already been set If $isDarkMode = True Then $hImageList = _GUICtrlListView_GetImageList($hListView, 2) _GUIImageList_Remove($hImageList) ;~ If @Compiled = 0 Then ; Returns 1 if script is a compiled executable or an .a3x file; returns 0 if an .au3 file. If $g_Compiled Then _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 201) ; because it can become a game of chance as you add/remove code _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 202) ; so is better to declare it. Else _GUIImageList_AddIcon($hImageList, "unchecked.ico") _GUIImageList_AddIcon($hImageList, "checked.ico") EndIf EndIf I strongly believe that declaring the resource number is better.
    1 point
  4. One thing that bothered me for a while was how regular checkboxes would get the dark theme but ListView checkboxes ($LVS_EX_CHECKBOXES) would not and it would be a significant contrast. This is not a limitation of AutoIt but actually a limitation of Windows dark mode Aero theme. Before, regular checkboxes would be in dark mode and listview checkboxes would be in light mode. I have attached the dark mode checkboxes to this post and each ICO file contains all sizes (13, 16, 20, 26, 32, 40, 52 pixels). All you need is the following code after dark mode has been applied: If $isDarkMode = True Then $hImageList = _GUICtrlListView_GetImageList($hListView, 2) _GUIImageList_Remove($hImageList) _GUIImageList_AddIcon($hImageList, "unchecked.ico") _GUIImageList_AddIcon($hImageList, "checked.ico") EndIf Alternatively, you can add the icons as resources for compiled binaries like this: #AutoIt3Wrapper_Res_Icon_Add=unchecked.ico #AutoIt3Wrapper_Res_Icon_Add=checked.ico ; this part must be applied AFTER dark mode has already been set If $isDarkMode = True Then $hImageList = _GUICtrlListView_GetImageList($hListView, 2) _GUIImageList_Remove($hImageList) If @Compiled = 0 Then _GUIImageList_AddIcon($hImageList, "unchecked.ico") _GUIImageList_AddIcon($hImageList, "checked.ico") Else _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 3) _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 4) EndIf EndIf Screenshot: DarkModeCheckboxes.zip
    1 point
  5. MattyD

    WinRT Object Libraries

    Apologies -here are a bunch on XAML libraries. Its been a while since I've looked at the library generator - I remember there were some issues around passing arrays that I wanted to fix. I'll have a fresh look at that over the next couple of days, and then just release what I have so we've got something to work with! XamlLibs.zip
    1 point
  6. OverloadUT

    HTTP UDF's

    I am working on a fairly large project and a big part of it is an AutoIt application that uploads a lot of data to a PHP script. For a while I was using INetGet and submitting all my data as GET variables in the URL. However, the amount of data to upload got too big (over 1000 characters) and the INetGet function started to fail. I also hated that INetGet ONLY works if the webserver responds with "200 OK" - There is no way to tell the difference between a 404 error and simply not being able to connect to the server in the first place. So I write this library of UDF's. Basically, it's a fully compliant HTTP/1.1 client. It uses only the TCP functions; no DllCall needed here! I had a blast learning all about the HTTP protocol and how to use it. Advantages over INetGet: The data is downloaded right in to variables instead of to files. You can of course then write this data to a file if you wish. You can read all of the headers supplied by the webserver. You can get the HTTP Response Code from the webserver. When it failes, you know exactly what failed instead of having to guess. ; =================================================================== ; HTTP UDF's ; v0.5 ; ; By: Greg "Overload" Laabs ; Last Updated: 07-22-06 ; Tested with AutoIt Version 3.1.1.131 ; Extra requirements: Nothing! ; ; A set of functions that allow you to download webpages and submit ; POST requests. ; ; Main functions: ; _HTTPConnect - Connects to a webserver ; _HTTPGet - Submits a GET request to a webserver ; _HTTPPost - Submits a POST request to a webserver ; _HTTPRead - Reads the response from a webserver ; =================================================================== I consider this UDF package to be a "beta" and that's why I call it version 0.5. However, I would love people to give it a try and tell me how it works for them. I have done extensive testing and I think I have the parser working perfectly. I plan on improving this library. It's possible that I might change the way the functions work (I don't think the _HTTPConnect function is necessary; I could move that functionality right in to the Get or Post functions.) To Do: Add a function that downloads the data right to a file. You might not want to download a 10 meg file in to memory before saving it to a file.Add a method to get the progress of the download. This will probably be in the form of a callback function, if that's possible in AutoIt.Add the ability to automatically follow "Location:" headers. Currently you'd have to do it manually.Other things I can't think of!Post #25 For Updated functions to work with current AutoIt versions.
    1 point
  7. trancexx

    WinHTTP functions

    Try this: #include "WinHTTP.au3" $LocalIP = "192.168.3.1" $hw_open = _WinHttpOpen() $hw_connect = _WinHttpConnect($hw_open, $LocalIP) $h_openRequest = _WinHttpOpenRequest($hw_connect, "POST", "restart.cgi") _WinHttpSetCredentials($h_openRequest, $WINHTTP_AUTH_TARGET_SERVER, $WINHTTP_AUTH_SCHEME_BASIC, "admin", "admin") _WinHttpSendRequest($h_openRequest) _WinHttpWriteData($h_openRequest, "restart=Restart?") _WinHttpReceiveResponse($h_openRequest) _WinHttpCloseHandle($h_openRequest) _WinHttpCloseHandle($hw_connect) _WinHttpCloseHandle($hw_open) Func _WinHttpWriteData($hRequest, $string) Local $dwNumberOfBytesToWrite = StringLen($string) Local $a_iCall = DllCall("Winhttp.dll", "int", "WinHttpWriteData", _ "hwnd", $hRequest, _ "str", $string, _ "dword", $dwNumberOfBytesToWrite, _ "ptr", 0) If @error Or Not $a_iCall[0] Then Return SetError(1, 0, -1) EndIf Return SetError(0, 0, $a_iCall[0]) EndFunc ;==>_WinHttpWriteData That script have _WinHttpWriteData() that is not in WinHTTP.au3 (I wasn't sure about "str" or "wstr" in dll call).
    1 point
×
×
  • Create New...