Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/16/2024 in all areas

  1. Hello Community, let me introduce you to one of my latest projects (with several more in the pipeline), the DCS - Dynamic Cursor Selector My secondary display is the TV in my living room. From the couch the mouse cursor always seemed too small, and also the Explorer Window was hard to read. As I use my computer for home-cinema, I started to code DCS to increase the size of the cursor and the Windows Explorer window for easier browsing and movie selection. DCS dynamically selects the cursor set and size, depending on the display the mouse cursor is on. The amount of displays to customize is automatically adjusted (minimum 2). Possible cursor sizes to select are 32px, 48px, 64px, 96px and 128px. In DCS you can select from two default Windows cursor sets, and it comes with three more custom sets to choose from. The DCS settings can be accessed through the DCS tray icon. Additionally, you have the option to magnify the Windows Explorer window, depending on the display the cursor is on. You can add your own cursor set, take a look at the instructions in the "Cursors" sub-directory. If you have nice sets, please feel free to share them with me and I'll add them to the next release. The executable and the source can be downloaded from my site: https://funk.eu Enjoy, and let me know what you think of DCS, with Best Regards
    2 points
  2. Hello everyone, today I would like to show you how far I have come with the implementation of DarkMode for AutoIT GUIs. Source: https://github.com/ysc3839/win32-darkmode About Win32 Darkmode: Since about 2020 there is a "hidden" / "undocumented" API for Win32 DarkMode. There is also already a program that has implemented this quite well. (Notepad++) Difficulties Unfortunately, the Windows devs are either too lazy or have been stupid with the implementation. So we have to apply all kinds of fixes (as we are already used to) to get the GUIs to actually run completely. Also there are some difficulties as all existing code that could be used is written in c++. I understand that, but only rudimentarily. So if there is someone here who can / would like to help me translate / implement some existing solutions. There are for example: The 'FixDarkScrollBar()' function which I would like to implement, but where I just can't get any further. Also with ChatGPT the code is difficult to 'override' and it doesn't work at all. GPT tells me that the implementation in AutoIT is quite impossible. And the full IatHook.h (https://github.com/ysc3839/win32-darkmode/blob/master/win32-darkmode/IatHook.h) Edit: Sloved witth v0.0.3 Todos / Challenges: * Redrawing of the Menu to Black * Getting the other controls into the right Theme for DarkMode * Setting Text Theme Colder of e.g. Checkboxes, ListViewHeader or Group Text * Getting Darkmode for Date Let me know what you think and where you might have suggestions for improvement or ideas. (Especially if you can help translate c++ into autoit :3) Kind Regards NoNameCode GUIDarkMode_V0.03 - OpenNcThemeData Hook.zip Changelog V.03 * Added HookOpenNcThemeData.dll => Coded by NoNameCode in C++ if someone want the Source pls DM * Added HookOpenNcThemeData_Debug.dll => Same as HookOpenNcThemeData.dll but Creates a OpenNcThemeData.txt with the opened Classes and if the Class got Replaced by Hook * Changed Darkmode_GUISample.au3 > More Data for GUICtrlCreateList and GUICtrlCreateEdit + #include <String.au3> > Added Routine to get AutoIt Install Path by Reg; or if not by @AutoItExe for PIC (logo4.gif) or AVI (SampleAVI.avi) * Changed GUIDarkMode.au3 > Added DllOpen for HookOpenNcThemeData.dll and Added OnAutoItExitRegister for DllClose function > Changed _GUICtrlSetDarkTheme -> Cleand Up Switch by CTRL Class bec. moste of them are not needed anymore through ScrollbarFix via HookOpenNcThemeData.dll Old Stuff:
    1 point
  3. AZJIO

    AutoIt3.apk (reference)

    Using SpiderBasic I built AutoIt3.apk. You can read more about the source here. screenshots: menu, settings, search
    1 point
  4. I'm a little jealous, your computer speed is like 10% - 25% - 40% faster than mine depending on the loop stack! These numbers don't look like much but to me it's a huge deal 😟 Grid 10: 20.7552 ms Grid 100: 833.3427 ms Grid 250: 4 s Grid 500: 18 s Grid 1000: 46 s I need an upgrade 😔
    1 point
  5. @ioa747 Jackpot, I just installed it again. I've uninstalled that version of Scite twice, once because I couldn't get a good color scheme and I don't remember the other reason but I'll have to work on it again for a while and take notes on it. Thanks!
    1 point
  6. Do you have SciTE4AutoIt3.exe installed? , because I don't see the extra information in your console Edit: and if you had set #AutoIt3Wrapper_UseX64=y it should show >Running:(3.3.16.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "D:\i\Pro\.AutoIT\_Test\000_forum-topic\211510-nbtstat-is-not-showing-any-output\Autoit1.au3"
    1 point
  7. #AutoIt3Wrapper_UseX64=y #include <WinAPIConv.au3> #include <Constants.au3> Local $sTxt, $sCmd, $hTimer $sCmd = "NBTSTAT /a 192.168.1.130" $hTimer = TimerInit() $sTxt = RunCmd($sCmd) ConsoleWrite("- processed in: " & Round(TimerDiff($hTimer) / 1000, 3) & " seconds " & @LF) ConsoleWrite($sTxt & @CRLF) ;-------------------------------------------------------------------------------------------------------------------------------- Func RunCmd($sCommand) Local $sStream = '', $iPID = Run(@ComSpec & " /c " & $sCommand, "", @SW_HIDE, 8) While ProcessExists($iPID) $sStream &= StdoutRead($iPID) WEnd Return _WinAPI_OemToChar($sStream) EndFunc ;==>RunCmd ;-------------------------------------------------------------------------------------------------------------------------------- It took me 30 seconds for the result to appear, so be patient console:
    1 point
  8. [NEW VERSION] 16 Feb 24 Changed: Some additional functionality added to the "TimeOut" parameter of _ExtMsgBox: - A positive integer sets the EMB timeout as before. - A negative integer will double the size of the countdown timer if it is used. - A colon-delimited string (eg: "10:5") will set the normal EMB timeout (first integer) and will also initially disable the EMB buttons for the required period (second integer). New UDF and examples in the first post. M23
    1 point
  9. Added to optionally change a default button text.
    1 point
  10. ; Validate timeout value $iTimeOut = Abs(Int($vTimeOut)) If StringInStr($vTimeOut, ":") Then Local $aRet = StringSplit($vTimeOut, ":") $iTimeIn = Abs(Int($aRet[2])) EndIf With this we have both
    1 point
  11. I could even generate then one-by-one, draw the rectangle, draw the circle and then append it to the previous one. But the lack of knowledge prevents me to do this - I have no clue how to merge/attach to another image. This is used as a visualization for a CNC program. It generates a CNC (G) code from an image and also generates this image as a preview to show how the result will look like (circles - holes will be cut on the raw material on the given coordinates).
    1 point
  12. argumentum, Good points. I do not want to add an extra function so I have gone for the "colon-delimited parameter" method. See what you think: <snip> M23
    1 point
  13. I guess the best solution is to use _Date_Time_SystemTimeToTzSpecificLocalTime with second parameter 0. On Windows 11 system, it seems possible to convert any globaltime (permanent offset 0) into localtime (including DST) according the current tz-offset-rule defined in system setting. Background of this topic: I have a script, which logs measuring data within a duration of a few minutes up to a few days. I decided to name the generated data like this: 20240212_205555_123u60 When logging starts, the current offset minutes are requested from system, saved and applied to all subsequent data. This way the data can be easily assigned by humans and and calculated (regarding differences in milliseconds) by a program.
    1 point
  14. As @ioa747 already wrote, #AutoIt3Wrapper_UseX64=y is required. By the way: nbtstat.exe can be started directly, without using @ComSpec. Example : #AutoIt3Wrapper_UseX64=y #include <AutoItConstants.au3> Example() Func Example() ; Info : 'nbtstat /?' will show help Local $iPID = Run('nbtstat -n', @SystemDir, @SW_HIDE, BitOR($STDERR_CHILD, $STDOUT_CHILD)) ; Instead of -n, enter the desired parameters Local $sOutputRead = '', $sOutputErr = '' While 1 $sOutputRead &= StdoutRead($iPID) If @error Then ExitLoop WEnd While 1 $sOutputErr &= StderrRead($iPID) If @error Then ExitLoop WEnd MsgBox(4096, "Stdout Read:", $sOutputRead) MsgBox(4096, "Stderr Read:", $sOutputErr) EndFunc ;==>Example
    1 point
  15. #AutoIt3Wrapper_UseX64=y
    1 point
  16. Hi, I saw my UDF mentioned - here is a new Beta with a "Button TimeIn" functionality set by using a negative $iTimeOut parameter (look at the EMB produced by Case $hButton1): <snip> If anyone thinks this a useful addition to the UDF, please let me know. I am little concerned that you are limited to either a "Button TimeIn" or a "EMB TimeOut", but others might not see that as a problem. M23
    1 point
  17. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <MsgBox_Extn.au3> ; the magic $MsgText = 'Continue using this software at your own risk !' & @CRLF $MsgText &= 'By clicking on OK button you are agree in the software agreement !' #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 339, 131, -1, -1) $Label1 = GUICtrlCreateLabel("Welcome to the empty frame software :)", 72, 32, 191, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;~ $returned = MsgBox(65, 'Info', $MsgText) $returned = _MsgBox_Extn(5, 65, 'Info', $MsgText, 0, $Form1) If $returned = $IDCANCEL Then GUIDelete() Exit Else #do nothing EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I hope that's good enough
    1 point
  18. SmOke_N

    ClipBoard.au3 udf extras

    After answering some clipboard questions in the help forum, I found myself writing a couple of helper funcs so I thought I'd share. I don't think I added any headers, I'm probably assuming (maybe to much?) that most will get it (yep, to lazy). Example code: #include "ClipBoardMisc.au3" #include <Array.au3> #cs Example 1 collect all the text/unicode/binary data in an array from clip #ce Global $gaArgs = _cbTest_GetAllData() _ArrayDisplay($gaArgs, Default, Default, Default, Default, _ "Format Type|Data TEXT|Data Unicode|Data Byte|Data ByteStr") Func _cbTest_GetAllData() Local $aClipFormats = _ClipBoard_GetCurrentFormatArray() If @error Then Return SetError(1, 0, Null) Local $aRet[UBound($aClipFormats)][5] ; [n][3] is memory address For $i = 0 To UBound($aClipFormats) - 1 ; Using all CBRT_ globals because I'm to lazy to go through all the CFSTR and do ; exhausting test functions to test what type of strings they are ; See: https://geekdude.io/static/ahk/Constants.W32.ini if you want to get a long list of CFSTR_ options $aRet[$i][0] = $aClipFormats[$i][2] $aRet[$i][1] = _ClipBoard_GetMemoryData($aClipFormats[$i][3], $CBRT_TEXT) $aRet[$i][2] = _ClipBoard_GetMemoryData($aClipFormats[$i][3], $CBRT_UNICODE) $aRet[$i][3] = _ClipBoard_GetMemoryData($aClipFormats[$i][3], $CBRT_BYTE) $aRet[$i][4] = _ClipBoard_GetMemoryData($aClipFormats[$i][3], $CBRT_BYTESTR) Next Return $aRet EndFunc Example 2: Get specific format id types array #include "ClipBoardMisc.au3" #include <Array.au3> ;~ #cs Example 2 ; Make sure you use "copy" on a file to test this ; Func: _ClipBoard_GetTypeArray($sType, $hOwner = 0) ; ; $sType: 1. String to be split by "|" separator char ; 2. Return type to be added similar as a struct ; example: $sType = "Text;str|FileNameW;wstr" ; Separates 2 types of arrays internally ; 1. Type array: [n] = "Text" ; [n] = "FileNameW" ; 2. Return type: [n] = "str" ; [n] = "wstr" ; Valid Format Return Strying types: ; "str" or "chr" ; "wstr" or "wchr" or "unicode" ; "byte" ; "bytestr" ; Return: Success: 2D array ; [n][0] = Found Type ; [n][1] = Found Value ; ; Note: It will not validate if the memory address is valid for your return type Global $ga_Test = _ClipBoard_GetTypeArray("filename;str|filenameW;wstr") If @error Then MsgBox(16, "Error", "Error: " & @error & " :: Extended: " & @extended) Else _ArrayDisplay($ga_Test) EndIf ;~ #ce ; updated zip ClipBoardMisc.zip
    1 point
  19. simple example: ; https://www.autoitscript.com/forum/topic/211404-gui-on-top-of-specific-window/ #include <WindowsConstants.au3> ;Check if Win is running else start it If Not WinExists("[CLASS:Notepad]") Then Run("notepad.exe") WinWait("[CLASS:Notepad]", "", 5) If WinActivate("[CLASS:Notepad]") Then Local $Host_Hwnd = WinGetHandle("[CLASS:Notepad]") Else Exit EndIf Local $hGUI = GUICreate("MyGUI", 100, 25, -100, -100, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_NOACTIVATE), $Host_Hwnd) Local $idButton_Copy = GUICtrlCreateButton("Copy", 0, 0, 50, 25) Local $idButton_Paste = GUICtrlCreateButton("Paste", 50, 0, 50, 25) GUISetState(@SW_SHOW, $hGUI) WinActivate($Host_Hwnd) Local $Host_Pos ;********************************** While 1 If Not WinExists($Host_Hwnd) Then Exit If WinActive($Host_Hwnd) Then $Host_Pos = WinGetPos($Host_Hwnd) WinMove($hGUI, "", $Host_Pos[0] + 150, $Host_Pos[1] + 3) EndIf Switch GUIGetMsg() Case -3 ;$GUI_EVENT_CLOSE ExitLoop Case $idButton_Copy WinActivate($Host_Hwnd) Send("^c") Case $idButton_Paste WinActivate($Host_Hwnd) Send("^v") EndSwitch Sleep(10) WEnd ;********************************** extended example: 209749-sharexexe-colorpicker/
    1 point
  20. Malkey

    AutoIt drawing overlay

    This may help you. I haven't been able to drag the border with Notepad or the main GUI. Someone else may be able to help with this if this is the type of idea you wanted. #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> #include <WinAPIHObj.au3> #include <WinAPISysWin.au3> Global $iBorder = 50, $hGUIMain, $hWndBorder ;Local $hGUIMain = GUICreate("Example") ; or Run("notepad.exe", "") $hGUIMain = WinWait("[CLASS:Notepad]", "", 10) WinSetOnTop($hGUIMain, "", 1) GUISetState(@SW_SHOW, $hGUIMain) $aPos = WinGetPos($hGUIMain) ;Get windowsize $hWndBorder = _GuiBorder($aPos, "Window's Title: " & WinGetTitle($hGUIMain)) ;ConsoleWrite("$hWndBorder: " & $hWndBorder & @CRLF) ;ConsoleWrite("$hGUIMain: " & $hGUIMain & @CRLF) GUIRegisterMsg($WM_MOUSEMOVE, "_WinMove") GUIRegisterMsg($WM_WINDOWPOSCHANGING, "_WinMove") While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Or Not WinExists($hGUIMain) Or Not WinExists($hWndBorder) Then If WinExists($hWndBorder) Then GUIDelete($hWndBorder) If WinExists($hGUIMain) Then WinClose($hGUIMain) ExitLoop EndIf WEnd Func _GuiBorder($aGUIPos, $sText = "Window information") Local $iWidth = 2 * $iBorder + $aGUIPos[2] Local $iHeight = 2 * $iBorder + $aGUIPos[3] Local $hGUI, $aSize, $hRegion, $hRegion1, $hRGN $hGUI = GUICreate("GDI+", $iWidth, $iHeight, $aGUIPos[0] - $iBorder, $aGUIPos[1] - $iBorder, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x00FFFF) ;Set window background color to blue GUICtrlCreateLabel($sText, 0, 0, $iWidth - 10, 30, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 12, 600) GUISetState(@SW_SHOW) _GDIPlus_Startup() $aSize = WinGetPos($hGUI) ;Get windowsize $hRegion1 = _GDIPlus_RegionCreateFromRect($iBorder + 7, $iBorder + 1, $aSize[2] - $iBorder * 2 - 14, $aSize[3] - $iBorder * 2 - 8) $hRegion = _GDIPlus_RegionCreateFromRect(0, 0, $aSize[2], $aSize[3]) _GDIPlus_RegionCombineRegion($hRegion, $hRegion1, 3) $hRGN = _GDIPlus_RegionGetHRgn($hRegion, 0) ;Create GDI region from GDI+ region _WinAPI_SetWindowRgn($hGUI, $hRGN) ;Set window region ;Clean up resources _WinAPI_DeleteObject($hRGN) _GDIPlus_RegionDispose($hRegion) _GDIPlus_RegionDispose($hRegion1) _GDIPlus_Shutdown() Return $hGUI EndFunc ;==>_GuiBorder Func _WinMove($hWnd, $Command, $wParam, $lParam) If BitAND(WinGetState($hWnd), 32) Then Return $GUI_RUNDEFMSG ;ConsoleWrite($hWnd & @CRLF) If $hWnd = $hWndBorder Then $aPos = WinGetPos($hWndBorder) WinMove($hGUIMain, "", $aPos[0] + $iBorder, $aPos[1] + $iBorder) EndIf EndFunc ;==>_WinMove
    1 point
  21. BrettF

    MultiLang.au3

    MultiLang.au3 V1.0.0.0- 14 AUG 2010 MultiLang.zip This is a UDF version of how I chose to load different languages into my GUI for AAMP. It uses different XML language files to provide multi-language support. The download includes the UDF, example GUI with 3 languages (English, German, French) to play with. Languages were translated using Google Translate. Don't expect it to be correct. In your programs try not to do this. Wherever possible find a fluent speaker and give them a cookie. Change Log: 1.0.0.0 - 14 AUG 2010 Inital Version Released Comments and Criticism welcome.
    1 point
  22. Likurg, This will place the caret at the end of the current text and scroll down to bring it into view: #include <GUIConstantsEx.au3> #include <EditConstants.au3> #Include <GUIEdit.au3> #Include <ScrollBarConstants.au3> $sText = "Line 1" & @CRLF & _ "Line 2" & @CRLF & _ "Line 3" & @CRLF & _ "Line 4" & @CRLF & _ "Line 5" & @CRLF & _ "Line 6" & @CRLF & _ "Line 7" & @CRLF & _ "Line 8" & @CRLF & _ "Line 9" $hGUI = GUICreate("Test", 500, 500) $hEdit = GUICtrlCreateEdit($sText & @CRLF & $sText & @CRLF & $sText, 10, 10, 200, 200, BitOr($GUI_SS_DEFAULT_EDIT, $ES_READONLY)) $hButton = GUICtrlCreateButton("Add", 10, 250, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton $iEnd = StringLen(GUICtrlRead($hEdit)) _GUICtrlEdit_SetSel($hEdit, $iEnd, $iEnd) _GUICtrlEdit_Scroll($hEdit, $SB_SCROLLCARET) GUICtrlSetData($hEdit, @CRLF & "New line inserted", 1) EndSwitch WEnd I hope it is what you wanted. M23
    1 point
×
×
  • Create New...