Leaderboard
Popular Content
Showing content with the highest reputation on 11/10/2024 in all areas
-
Win 11 - My own border color
Danyfirex reacted to argumentum for a file
Version 0.2411.14.2
44 downloads
I use dark mode and would love to have the border with colors of my choosing. While I wait for Windows to implement a user selectable option in their settings, I cooked my own "border color setter". Since am at it, chose to have a color for elevated/admin windows and another for user level GUIs. Or not, is user selectable. Win11myOwnBorderColor.exe (v0.2411.14.2) SHA-1: 8EC62A330C489016E0F142A49E757FB696B3F4E1 SHA-256: D8CF3A723281A5EBAD8FED60898CE7F2410DC1E8EA9B88935D6D39257D0676D9 I wrote a FAQ / Help to give an idea of how to use it. That is very intuitive once you use it. But is there to read if you have questions. If the answers don't cover your question, join the forum and make a post for your question on the thread.1 point -
#include <GUIConstants.au3> #include <GuiEdit.au3> Example() Func Example() GUICreate("Test Suggestion", 300, 100) Local $idButton = GUICtrlCreateButton("OK", 10, 70, 100, 20) Local $input = GUICtrlCreateInput("", 10, 10, 280, 30) _GUICtrlEdit_SetCueBanner($input, "suggested content...") GUISetState() While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>Example1 point
-
1st try (58) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded. do i have to do something? Edit: ok now it works. Now I have to understand how it works? @DesktopWidth x @DesktopHeight = 1920x1080 Global $posx = 958, $posy = 499, $result = ""1 point
-
Yup, ~2 milliseconds on my pc, and that's without the fancy rotating stuff. The basics #include <GDIPlus.au3> #include <ScreenCapture.au3> ;Be sure $posx and $posy is pointing at the correct spot! Global $posx = 1718, $posy = 699, $result = "" ;Lookup table to avoid searching Global $digit[115] = [1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, _ 0,0,0,0,0,0,0,0,0,0,6,0,0,0,3,2,0,0,0,0, _ 0,0,0,0,0,0,0,0,9,0,0,0,0,0,8,0,0,0,0,0, _ 0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, _ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, _ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,5] $capture = _ScreenCapture_Capture("", $posx, $posy, $posx+34, $posy+20) $bitmap = _GDIPlus_BitmapCreateFromHBITMAP($capture); for some reason createfromhbitmap is not a fully compatible gdiplus bitmap $clone = _GDIPlus_BitmapCloneArea($bitmap, 0, 0, 34, 20, $GDIP_PXF32ARGB); so we have to do this before it works correctly _GDIPlus_BitmapDispose($bitmap) Func Getnumber($result) Local $code[3] = [0,0,0], $value = 64 $bitmap1 = _GDIPlus_BitmapLockBits($clone, 0, 0, 34, 20, BitOR($GDIP_ILMWRITE, $GDIP_ILMREAD), $GDIP_PXF32ARGB) $pixels = DllStructCreate("dword[" & 680 & "];", DllStructGetData($bitmap1, "Scan0")) For $loop = 1 To 680 Step 102 $code[0] += DllStructGetData($pixels, 1, $loop ) = 4278255360 ? $value:0 $code[1] += DllStructGetData($pixels, 1, $loop+16) = 4278255360 ? $value:0 $code[2] += DllStructGetData($pixels, 1, $loop+32) = 4278255360 ? $value:0 $value /= 2 Next _GDIPlus_BitmapUnlockBits($clone, $bitmap1) Return String($digit[$code[0]]) & String($digit[$code[1]]) & String($digit[$code[2]]) EndFunc And a runable script (zipped folder with script and test images attached) #include <GDIPlus.au3> #include <ScreenCapture.au3> HotKeySet("{ESC}", "_exit") ;Be sure $posx and $posy is pointing at the correct spot! Global $posx = 1718, $posy = 699, $result = "" ;Lookup table to avoid searching Global $digit[115] = [1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, _ 0,0,0,0,0,0,0,0,0,0,6,0,0,0,3,2,0,0,0,0, _ 0,0,0,0,0,0,0,0,9,0,0,0,0,0,8,0,0,0,0,0, _ 0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, _ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, _ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,5] ;Test section ;-------------------------------------------------------------- $gui = GUICreate("Getnumber", 640, 480, -1, -1) GUISetState() WinWaitActive($gui); <--- necessary or screencapture fails _GDIPlus_Startup() $graphics = _GDIPlus_GraphicsCreateFromHWND($gui) $image = _GDIPlus_BitmapCreateFromFile("518.png") _GDIPlus_GraphicsDrawImageRect($graphics, $image, 280, 200, 136, 31) Sleep(10); <------- necessary because drawimagerect() is too slow, script occasionally fails without ;-------------------------------------------------------------- ;/Test section $time = TimerInit() $capture = _ScreenCapture_Capture("", $posx, $posy, $posx+34, $posy+20) $bitmap = _GDIPlus_BitmapCreateFromHBITMAP($capture); for some reason createfromhbitmap is not a fully compatible gdiplus bitmap $clone = _GDIPlus_BitmapCloneArea($bitmap, 0, 0, 34, 20, $GDIP_PXF32ARGB); so we have to do this before it works correctly _GDIPlus_BitmapDispose($bitmap) $result = Getnumber() Consolewrite("Result: " & $result & " Time: " & TimerDiff($time)/1000 & @crlf) While 1 Sleep(10) WEnd Func Getnumber() Local $code[3] = [0,0,0] $bitmap1 = _GDIPlus_BitmapLockBits($clone, 0, 0, 34, 20, BitOR($GDIP_ILMWRITE, $GDIP_ILMREAD), $GDIP_PXF32ARGB) $pixels = DllStructCreate("dword[" & 680 & "];", DllStructGetData($bitmap1, "Scan0")) $value = 64 For $loop = 1 To 680 Step 102 $code[0] += BitAnd(BitShift(DllStructGetData($pixels, 1, $loop ), 8), 1) = 1 ? $value:0 $code[1] += BitAnd(BitShift(DllStructGetData($pixels, 1, $loop+16), 8), 1) = 1 ? $value:0 $code[2] += BitAnd(BitShift(DllStructGetData($pixels, 1, $loop+32), 8), 1) = 1 ? $value:0 $value /= 2 Next $result = String($digit[$code[0]]) & String($digit[$code[1]]) & String($digit[$code[2]]) $code = 0 _GDIPlus_BitmapUnlockBits($clone, $bitmap1) Return $result EndFunc Func _exit() _GDIPlus_Shutdown() Exit EndFunc Not much code it takes. I havent checked for memoryleaks and stuff, too tired now, if you spot anyting please tell. Be sure to change the $posx and $posy to point at the correct spot, as it is now it fits a 3440x1440 monitor. (you can comment out line 56 that gives error so you can take a screenshot to find the correct spot) /edit Changed, zip not updated Changed again, $code[0] += DllStructGetData($pixels, 1, $loop ) = 4278255360 ? $value:0 $code[1] += DllStructGetData($pixels, 1, $loop+16) = 4278255360 ? $value:0 $code[2] += DllStructGetData($pixels, 1, $loop+32) = 4278255360 ? $value:0 getnumber.zip1 point
-
Post edited: I did see the * -1 part (and didn't expect it), just the > 0 caught my (olding) eyes.1 point
-
Hi. maybe https://support.microsoft.com/en-au/office/enable-activex-controls-in-internet-explorer-04774c30-617d-4de4-a028-0fe03d68b955 ? what is the result, when you do in a CMD box a ... dir c:\path\to\my\helpfile.chm /r is the result presenting alternate data streams in your chm file? C:\Install>dir c:\install\helpfile.chm /r Volume in Laufwerk C: hat keine Bezeichnung. Volumeseriennummer: 9450-A869 Verzeichnis von c:\install 24.11.2023 14:54 5.282.424 helpfile.chm 129 helpfile.chm:Zone.Identifier:$DATA 1 Datei(en), 5.282.424 Bytes 0 Verzeichnis(se), 105.914.585.088 Bytes frei C:\Install>1 point
-
Try this instead.... Dim $firstname $firstname = InputBox("First Name", "What is your first name?", "", " M", -1, -1);<---- The " M" (The space before the M is important) forces input. OK can't be clicked until something is entered. If @error = 1 Then MsgBox(0,"","Cancel was clicked") Exit EndIf MsgBox(1,"Testing",$firstname)1 point