Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/19/2017 in all areas

  1. Simpel

    Refresh GUI after ini write

    Hi. You can use GUICtrlSetData() to set the new value. I would prefer a label rather than an input, because it wouldn't look like you can write the path with keyboard. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Local $Form1 = GUICreate("Form1", 615, 437, 192, 124) Local $Input1 = GUICtrlCreateLabel(Iniread(@WorkingDir & "\test.ini","Path","FilePath",""), 64, 80, 321, 21) ; LABEL instead Input Local $Button1 = GUICtrlCreateButton("Change", 400, 80, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $nMsg, $selectedFolder, $newLogPath While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $selectedFolder = FileSelectFolder("Select Log Path Directory",@WorkingDir,0) If NOT $selectedFolder = "" Then $newLogPath = IniWrite(@WorkingDir & "\test.ini","Path","FilePath",$selectedFolder) GUICtrlSetData($Input1, Iniread(@WorkingDir & "\test.ini","Path","FilePath","")) ; SET date into label EndIf EndSwitch WEnd Conrad
    1 point
  2. Skysnake, You need to remove the $WS_HSCROLL style from the control styles - the $ES_AUTOHSCROLL merely allows the control to automatically scroll as you type. This is why the final snippet works and the others do not, as you only remove the correct style in that final one - in the first 2 the edit control is created with the $WS_HSCROLL as a default style as explained in the Help file. This works for me: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) ; Create edit without the $WS_HSCROLL style $cEdit = GUICtrlCreateEdit("", 10, 10, 200, 200, Bitor($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23
    1 point
  3. Yes, so you can do it in cycles.
    1 point
  4. This I meant: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $aAraayList[5] = ["test1", "test2", "test3", "test4"] $Form1 = GUICreate("Form1", 297, 208) $Button1 = GUICtrlCreateButton("Button1", 112, 144, 75, 25) GUISetState(@SW_SHOW) $List = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If $List >= UBound($aAraayList) Then ExitLoop ConsoleWrite($aAraayList[$List] & @CRLF) $List += 1 EndSwitch Wend Conrad
    1 point
  5. jchd

    SQLite performance

    Go ahead, even if it isn't 100% AutoIt. The rationale being that there are enough low-experience AutoIt users who could benefit from various SQL[ite] use cases with possible issues and solutions exposed.
    1 point
×
×
  • Create New...