Jump to content

funkey

Active Members
  • Posts

    871
  • Joined

  • Last visited

  • Days Won

    8

funkey last won the day on October 1 2022

funkey had the most liked content!

About funkey

  • Birthday 12/04/1980

Profile Information

  • Member Title
    New Dad again and again!!
  • Location
    Austria
  • WWW
    http://www.homeaway.at/ferienwohnung-ferienhaus/p2026729
  • Interests
    Programming, electronics

Recent Profile Visitors

1,583 profile views

funkey's Achievements

  1. HookDlgBox.au3HookDlgBox Timeout.au3HookDlgBox Example.au3 Hi! I use hooks to do this task. BR funkey
  2. #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) GUICreate("Mouse Click Detection", 300, 200) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUICtrlCreateLabel('ITEM 01',Default,Default,Default,Default) GUICtrlSetOnEvent(-1, "_Clicked") GUICtrlCreateLabel('ITEM 02',Default,40,Default,Default) GUICtrlSetOnEvent(-1, "_Clicked") GUICtrlCreateLabel('ITEM 03',Default,80,Default,Default) GUICtrlSetOnEvent(-1, "_Clicked") GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc Func _Clicked() Local $id = @GUI_CtrlId ConsoleWrite("Clicked at label id " & $id & " with text '"&GUICtrlRead($id)&"'" & @CRLF) EndFunc
  3. You can have a look at Melba's version:
  4. I don't need it. But the behaviour is not consistently. I just expected there to be a '1' in @extended.
  5. I wanted it to be an integer for replacing characters at position. This is the second way StringReplace() works.
  6. Hi, I use v3.3.14.5 here and have a bug. Local $sBug = StringReplace("123456789", 2, "a") ConsoleWrite($sBug & " - replacements: " & @extended & " <-- expected 1" & @CRLF) This is the result 1a3456789 - replacements: 0 <-- expected 1 Is this already solved in v3.3.16.1 I don't want to update now... Thanks for your answers!
  7. Sorry.... I have once made two different version of native implementation of Modbus TCP and I also used two different libraries for this task. This is long time ago. Here are two links that originated from my work: modbus - Projekte - AutoIt.de - Das deutschsprachige Forum. ModBus & libmodbus.dll - Funktion "0x10" (modbus_write_registers) integrieren - Hilfe & Unterstützung - AutoIt.de - Das deutschsprachige Forum. BR funkey
  8. I have at least one Modbus TCP UDF for over 10 years... 😝😅
  9. If you don't need the return value of the MsgBox you can use this: #include <Misc.au3> Global $WinTitle = "Title" _MsgBox(48, $WinTitle, "Some text", 1) WinWait($WinTitle) Global $aPos = WinGetPos($WinTitle) _MouseTrap($aPos[0], $aPos[1], $aPos[0] + $aPos[2], $aPos[1] + $aPos[3]) While WinExists($WinTitle) Sleep(50) WEnd _MouseTrap() Func _MsgBox($iFlag, $sTitle, $sMsg, $iOnTop = 0, $iTimeout = 0, $hParent = 0) ;Nonblocking MessageBox ;funkey 2010.05.20 If $iOnTop <> 0 Then $iOnTop = 0x40000 Local $str = "MsgBox('" & $iOnTop + $iFlag & "', '" & $sTitle & "', '" & $sMsg & "', '" & $iTimeout & "', '" & $hParent & "')" Local $Exe = @AutoItExe Run('"' & $Exe & '" /AutoIt3ExecuteLine "' & $str & '"') EndFunc ;==>_MsgBox Edit: Just saw now, that @mikell already presented this kind of solution.
  10. Hi 0Ethan0, thanks for reporting the error. I updated the UDF in post #1. I'm happy you like it. BR funkey
  11. When you dispose the image, then set the handle in variable to 0.
  12. Aaah. The difference is that $WS_VISIBLE is set when creating the GUI or afterwards with GuiSetState(). So create your GUI visible and your problem should be solved.
  13. Can someone tell me what is the difference between "$WS_OVERLAPPEDWINDOW" and "0x14CF0000" ???? Resulting style is the same, but for me there is a difference in text selection..... #include <GUIConstants.au3> #include <MsgBoxConstants.au3> #include <FontConstants.au3> #include <GuiEdit.au3> Local $EditText = "This is Line 1" & @CRLF & "This is Line 2" Local $GUIWidth = 800 Local $LogWindowHeight = 326 ;~ Local $hMainGUI = GUICreate("Test", $GUIWidth, 50 + $LogWindowHeight, -1, -1, $WS_OVERLAPPEDWINDOW) Local $hMainGUI = GUICreate("Test", $GUIWidth, 50 + $LogWindowHeight, -1, -1, 0x14CF0000) Local $LogWindowID = GUICtrlCreateEdit($EditText, 20, 25, $GUIWidth - 40, $LogWindowHeight - 20, BitOR($ES_WANTRETURN, $WS_HSCROLL, $ES_READONLY, $ES_MULTILINE)) GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE GUIDelete()
  14. Selection can only be set if window (control) is visible. But this is a strange behaviour. I can not reproduce this with a Win32 C test application. I have to investigate 😉
×
×
  • Create New...