Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/19/2024 in all areas

  1. Please hit the report button so one of the Mods can close the thread. tnx
    1 point
  2. $minX = FileReadLine($name,5) $maxY = FileReadLine($name,6)
    1 point
  3. I recently stumbled upon an insightful article about the significance of microcontrollers in modern electronics. As many of us here are enthusiasts of automation and scripting with AutoIt, I thought it would be interesting to explore how AutoIt can be integrated with microcontroller-based For those interested in embedded systems and microcontroller programming, I highly recommend reading this article: [Microcontrollers: The Brain of Modern Electronics](Microcontrollers: The Brain of Modern Electronics In the context of AutoIt, microcontrollers can be utilized to enhance our automation scripts. For instance, AutoIt scripts can be used to communicate with microcontroller-based hardware through serial communication, allowing us Here's a simple example of how you can use AutoIt to send data to a microcontrollers. ; Open the serial port $port = _CommSetPort("COM3", 9600, 8, "N", 1, 512, 512) ; Check if the port is opened successfully If $port = -1 Then MsgBox(16, "Error", "Failed to open serial port") Exit EndIf ; Send data to the microcontroller _CommSendString($port, "Hello Microcontroller") ; Close the serial port _CommClosePort($port)
    1 point
  4. jchd

    Experimental Maps UDF

    Beware that Maps don't allow negative integer keys.
    1 point
  5. Belini, This is how I do it: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; Set resize mode for controls Opt("GUIResizeMode", $GUI_DOCKAUTO) Global $iGUIInitSize = 500 $hGUI = GUICreate("Test", $iGUIInitSize, 500, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU)) $cButton = GUICtrlCreateButton("Resizing text", 10, 10, 80, 30) $iLast_Control = GUICtrlCreateDummy() GUISetState() GUIRegisterMsg($WM_SIZE, "_WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd = $hGUI Then ; Calculate required font size Local $aGUI_Size = WinGetClientSize($hGUI) $iFontSize = Int(2 * (.25 + (8 * $aGUI_Size[0] / $iGUIInitSize))) / 2 ; Reset font size for all controls on main GUI For $i = 0 To $iLast_Control GUICtrlSetFont($i, $iFontSize) Next EndIf EndFunc ;==>_WM_SIZE M23
    1 point
×
×
  • Create New...