Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/31/2021 in all areas

  1. [BUGFIX VERSION] - 6 Apr 24 Fixed: UDF failed if header colours were initialised but not specifically set. New UDF in the zip below. -------------------------------------------------------------------------------------- Note: This is a new recoded and expanded version of my earlier UDF of the same name. If you move to this new version there might well be several script-breaking changes, particularly when setting which columns are to be editable. Please read the "Beginner's Guide" and look at the included example scripts to see where things have changed. -------------------------------------------------------------------------------------- This UDF allows you to do much more with ListView controls (either native or UDF created): Edit the content with plain text, combos or date-time pickers - and edit the headers too Move rows within the ListView Drag rows both within the ListView and to other ListViews in the same GUI (or not as required) Insert and delete columns and rows Sort columns by simply clicking the header Colour individual ListView items and headers Only select a single cell rather then the entire row Save and load entire ListViews For the advanced user: If you use certain Windows message handlers (In particular WM_NOTIFY) in your script, please read the function headers for the equivalent handlers within the UDF. Here is the UDF, with 6 examples and the guide, in zip format: GUIListViewEx.zip Credit to: martin (basic drag code), Array.au3 authors (array functions), KaFu and ProgAndy (font function), LarsJ (colouring code) Happy to take compliments or criticism - preferably the former! M23
    1 point
  2. Ok, so try setting the subsystem parameter to 0: command.subsystem.49.$(au3)=0 I have 0 for that shown command which is working for me.
    1 point
  3. novel, From the function header: ; #FUNCTION# ========================================================================================================= ; Name...........: _GUIListViewEx_Init ... ; $iAdded - 0 - No added features (default). To get added features add any of the following values ... ; + 64 - No external drag ; + 128 - No external drop ; + 256 - No delete on external drag/drop ; + 512 - No internal or external drag/drop ... Are those not sufficient? M23
    1 point
  4. smbape

    Opencv UDF

    Matching homography to find a known object can be tedious and I am not well informed in the subject. If the object always has the same size and orientation in the scene, I would have used matchTemplate like a previous example. If the object always has the same orientation but different size in a known scale range, I would have used multiscale matching like a previous example. Otherwise, I have no clue. There is an error at _cveFindHomography. That is because there is a need for at least 4 point correspondences to calculate Homography. Cases where _VectorOfDMatchGetSize($good_matches) < 4 will crash. Here is an updated version handling that case #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("MustDeclareVars", 1) #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <File.au3> #include <FileConstants.au3> #include <GDIPlus.au3> #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <Math.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "emgucv-autoit-bindings\cve_extra.au3" ;~ Sources: ;~ https://docs.opencv.org/4.5.2/d7/dff/tutorial_feature_homography.html ;~ https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/features2D/feature_homography/SURF_FLANN_matching_homography_Demo.cpp Local Const $OPENCV_SAMPLES_DATA_PATH = @ScriptDir #Region ### START Koda GUI section ### Form= Local $FormGUI = GUICreate("Features2D + Homography to find a known object", 1000, 707, 192, 95) Local $InputObject = GUICtrlCreateInput($OPENCV_SAMPLES_DATA_PATH & "\box.png", 230, 16, 449, 21) Local $BtnObject = GUICtrlCreateButton("Object", 689, 14, 75, 25) Local $InputScene = GUICtrlCreateInput($OPENCV_SAMPLES_DATA_PATH & "\box_in_scene.png", 230, 52, 449, 21) Local $BtnScene = GUICtrlCreateButton("Scene", 689, 50, 75, 25) Local $LabelMatchType = GUICtrlCreateLabel("Match type", 414, 92, 79, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $ComboMatchType = GUICtrlCreateCombo("", 502, 92, 177, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_SIMPLE)) GUICtrlSetData(-1, "BruteForce|BruteForce-L1|BruteForce-Hamming|BruteForce-HammingLUT|BruteForce-Hamming(2)|BruteForce-SL2") Local $BtnExec = GUICtrlCreateButton("Execute", 832, 48, 75, 25) Local $LabelMatches = GUICtrlCreateLabel("Good Matches & Object detection", 377, 144, 245, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") Local $GroupMatches = GUICtrlCreateGroup("", 20, 166, 958, 532) Local $PicMatches = GUICtrlCreatePic("", 25, 177, 948, 516) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $aMatchTypes[6] = [ _ $CV_NORM_L2, _ $CV_NORM_L1, _ $CV_NORM_HAMMING, _ $CV_NORM_HAMMING, _ $CV_NORM_HAMMING2, _ $CV_NORM_L2SQR _ ] _GUICtrlComboBox_SetCurSel($ComboMatchType, 2) _GDIPlus_Startup() _OpenCV_DLLOpen("libemgucv-windesktop-4.5.2.4673\libs\x64\cvextern.dll") Local $img_object, $img_scene Local $nMsg Local $sObject, $sScene Local $tBackgroundColor = _cvRGB(0xF0, 0xF0, 0xF0) Main() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BtnObject $sObject = ControlGetText($FormGUI, "", $InputObject) $sObject = FileOpenDialog("Select an image", $OPENCV_SAMPLES_DATA_PATH, "Image files (*.bmp;*.jpg;*.jpeg;*.png;*.gif)", $FD_FILEMUSTEXIST, $sObject) If @error Then $sObject = "" Else ControlSetText($FormGUI, "", $InputObject, $sObject) EndIf Case $BtnScene $sScene = ControlGetText($FormGUI, "", $InputScene) $sScene = FileOpenDialog("Select an image", $OPENCV_SAMPLES_DATA_PATH, "Image files (*.bmp;*.jpg;*.jpeg;*.png;*.gif)", $FD_FILEMUSTEXIST, $sScene) If @error Then $sScene = "" Else ControlSetText($FormGUI, "", $InputScene, $sScene) EndIf Case $ComboMatchType Detect() Case $BtnExec Clean() Main() EndSwitch WEnd _Opencv_DLLClose() _GDIPlus_Shutdown() Func Main() ;;! [load_image] ;;/ Load object and scene $sObject = ControlGetText($FormGUI, "", $InputObject) $img_object = _cveImreadAndCheck($sObject, $CV_IMREAD_GRAYSCALE) If @error Then $sObject = "" Return EndIf $sScene = ControlGetText($FormGUI, "", $InputScene) $img_scene = _cveImreadAndCheck($sScene, $CV_IMREAD_GRAYSCALE) If @error Then _cveMatRelease($img_object) $sObject = "" $sScene = "" Return EndIf ;;! [load_image] Detect() EndFunc ;==>Main Func Clean() If $sObject == "" Then Return _cveMatRelease($img_object) _cveMatRelease($img_scene) $sObject = "" EndFunc ;==>Clean Func Detect() Local $match_type = $aMatchTypes[_GUICtrlComboBox_GetCurSel($ComboMatchType)] ;;-- Step 1: Detect the keypoints using ORB Detector, compute the descriptors Local $numberOfFeatures = 500 ; Local $tFeature2DPtr = DllStructCreate("ptr value") Local $tSharedPtr = DllStructCreate("ptr") _cveOrbCreate($numberOfFeatures, 1.2, 8, 31, 0, 2, $CV_ORB_HARRIS_SCORE, 31, 20, $tFeature2DPtr, $tSharedPtr) Local $detector = $tFeature2DPtr.value Local $keypoints_object = _VectorOfKeyPointCreate() Local $keypoints_scene = _VectorOfKeyPointCreate() Local $descriptors_object = _cveMatCreate() Local $descriptors_scene = _cveMatCreate() _CvFeature2DDetectAndComputeMat($detector, $img_object, _cveNoArrayMat(), $keypoints_object, $descriptors_object, False) ; _CvFeature2DDetectAndComputeMat($detector, $img_scene, _cveNoArrayMat(), $keypoints_scene, $descriptors_scene, False) ; ;;-- Step 2: Matching descriptor vectors with a BruteForce based matcher ;; Since ORB is a floating-point descriptor NORM_L2 is used Local $tMatcherPtr = DllStructCreate("ptr value") Local $bf_matcher = _cveBFMatcherCreate($match_type, False, $tMatcherPtr) ; Local $matcher = $tMatcherPtr.value Local $knn_matches = _VectorOfVectorOfDMatchCreate() ; _cveDescriptorMatcherKnnMatch1Mat($matcher, $descriptors_object, $descriptors_scene, $knn_matches, 2, _cveNoArrayMat(), False) ; ;;-- Filter matches using the Lowe's ratio test Local $ratio_thresh = 0.75 ; Local $good_matches = _VectorOfDMatchCreate() ; Local $tVectorDMatchPtr = DllStructCreate("ptr value") Local $tDMatchPtr0 = DllStructCreate("ptr value") Local $tDMatchPtr1 = DllStructCreate("ptr value") For $i = 0 To _VectorOfVectorOfDMatchGetSize($knn_matches) - 1 _VectorOfVectorOfDMatchGetItemPtr($knn_matches, $i, $tVectorDMatchPtr) _VectorOfDMatchGetItemPtr($tVectorDMatchPtr.value, 0, $tDMatchPtr0) Local $tDMatch0 = DllStructCreate($tagDMatch, $tDMatchPtr0.value) _VectorOfDMatchGetItemPtr($tVectorDMatchPtr.value, 1, $tDMatchPtr1) Local $tDMatch1 = DllStructCreate($tagDMatch, $tDMatchPtr1.value) If $tDMatch0.distance < $ratio_thresh * $tDMatch1.distance Then _VectorOfDMatchPush($good_matches, $tDMatch0) EndIf Next ;;-- Draw matches Local $img_matches = _cveMatCreate() ; Local $matchesMask = _VectorOfByteCreate() _drawMatchedFeatures1Mat($img_object, $keypoints_object, $img_scene, $keypoints_scene, $good_matches, $img_matches, _cvScalarAll(-1), _ _cvScalarAll(-1), $matchesMask, $CV_DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS) ; ;;-- Need at least 4 point correspondences to calculate Homography If _VectorOfDMatchGetSize($good_matches) >= 4 Then ;;-- Localize the object Local $obj = _VectorOfPointFCreate() ; Local $scene = _VectorOfPointFCreate() ; Local $tObjectKeyPointPtr = DllStructCreate("ptr value") Local $tSceneKeyPointPtr = DllStructCreate("ptr value") For $i = 0 To _VectorOfDMatchGetSize($good_matches) - 1 ;;-- Get the keypoints from the good matches _VectorOfDMatchGetItemPtr($good_matches, $i, $tDMatchPtr0) Local $tDMatch0 = DllStructCreate($tagDMatch, $tDMatchPtr0.value) _VectorOfKeyPointGetItemPtr($keypoints_object, $tDMatch0.queryIdx, $tObjectKeyPointPtr) Local $tObjectKeyPoint = DllStructCreate($tagKeyPoint, $tObjectKeyPointPtr.value) _VectorOfPointFPush($obj, $tObjectKeyPoint) _VectorOfKeyPointGetItemPtr($keypoints_scene, $tDMatch0.trainIdx, $tSceneKeyPointPtr) Local $tSceneKeyPoint = DllStructCreate($tagKeyPoint, $tSceneKeyPointPtr.value) _VectorOfPointFPush($scene, $tSceneKeyPoint) Next Local $H = _cveMatCreate() Local $i_arr_H = _cveInputArrayFromMat($H) Local $o_arr_H = _cveOutputArrayFromMat($H) Local $i_arr_obj = _cveInputArrayFromVectorOfPointF($obj) Local $i_arr_scene = _cveInputArrayFromVectorOfPointF($scene) Local $resultMask = _cveMatCreate() Local $o_arr_resultMask = _cveOutputArrayFromMat($resultMask) _cveFindHomography($i_arr_obj, $i_arr_scene, $o_arr_H, $CV_RANSAC, 3, $o_arr_resultMask) ; _cveOutputArrayRelease($o_arr_resultMask) _cveMatRelease($resultMask) If Not _cveMatIsEmpty($H) Then ;;-- Get the corners from the image_1 ( the object to be "detected" ) Local $img_object_size = _cvSize() _cveMatGetSize($img_object, $img_object_size) Local $obj_corners = _VectorOfPointFCreate() _VectorOfPointFPush($obj_corners, _cvPoint2f(0, 0)) _VectorOfPointFPush($obj_corners, _cvPoint2f($img_object_size.width, 0)) _VectorOfPointFPush($obj_corners, _cvPoint2f($img_object_size.width, $img_object_size.height)) _VectorOfPointFPush($obj_corners, _cvPoint2f(0, $img_object_size.height)) Local $scene_corners = _VectorOfPointFCreateSize(4) Local $i_arr_obj_corners = _cveInputArrayFromVectorOfPointF($obj_corners) Local $o_arr_scene_corners = _cveOutputArrayFromVectorOfPointF($scene_corners) _cvePerspectiveTransform($i_arr_obj_corners, $o_arr_scene_corners, $i_arr_H) ; Local $tPointFPtr = DllStructCreate("ptr value") _VectorOfPointFGetItemPtr($scene_corners, 0, $tPointFPtr) Local $scene_corners_0 = DllStructCreate($tagCvPoint2f, $tPointFPtr.value) _VectorOfPointFGetItemPtr($scene_corners, 1, $tPointFPtr) Local $scene_corners_1 = DllStructCreate($tagCvPoint2f, $tPointFPtr.value) _VectorOfPointFGetItemPtr($scene_corners, 2, $tPointFPtr) Local $scene_corners_2 = DllStructCreate($tagCvPoint2f, $tPointFPtr.value) _VectorOfPointFGetItemPtr($scene_corners, 3, $tPointFPtr) Local $scene_corners_3 = DllStructCreate($tagCvPoint2f, $tPointFPtr.value) ;;-- Draw lines between the corners (the mapped object in the scene - image_2 ) _cveLineMat($img_matches, _cvPoint($scene_corners_0.x + $img_object_size.width, $scene_corners_0.y), _ _cvPoint($scene_corners_1.x + $img_object_size.width, $scene_corners_1.y), _cvScalar(0, 255, 0), 4) ; _cveLineMat($img_matches, _cvPoint($scene_corners_1.x + $img_object_size.width, $scene_corners_1.y), _ _cvPoint($scene_corners_2.x + $img_object_size.width, $scene_corners_2.y), _cvScalar(0, 255, 0), 4) ; _cveLineMat($img_matches, _cvPoint($scene_corners_2.x + $img_object_size.width, $scene_corners_2.y), _ _cvPoint($scene_corners_3.x + $img_object_size.width, $scene_corners_3.y), _cvScalar(0, 255, 0), 4) ; _cveLineMat($img_matches, _cvPoint($scene_corners_3.x + $img_object_size.width, $scene_corners_3.y), _ _cvPoint($scene_corners_0.x + $img_object_size.width, $scene_corners_0.y), _cvScalar(0, 255, 0), 4) ; _cveOutputArrayRelease($o_arr_scene_corners) _cveInputArrayRelease($i_arr_obj_corners) _VectorOfPointFRelease($scene_corners) _VectorOfPointFRelease($obj_corners) EndIf _cveInputArrayRelease($i_arr_scene) _cveInputArrayRelease($i_arr_obj) _cveOutputArrayRelease($o_arr_H) _cveInputArrayRelease($i_arr_H) _cveMatRelease($H) _VectorOfPointFRelease($scene) _VectorOfPointFRelease($obj) EndIf ;-- Show detected matches ; _cveImshowMat("Good Matches & Object detection", $img_matches) ; _cveImshowControlPic($img_matches, $FormGUI, $PicMatches, $tBackgroundColor) _VectorOfByteRelease($matchesMask) _cveMatRelease($img_matches) _VectorOfDMatchRelease($good_matches) _VectorOfVectorOfDMatchRelease($knn_matches) _cveBFMatcherRelease($bf_matcher) _cveMatRelease($descriptors_scene) _cveMatRelease($descriptors_object) _VectorOfKeyPointRelease($keypoints_scene) _VectorOfKeyPointRelease($keypoints_object) _cveOrbRelease($tSharedPtr) EndFunc ;==>Detect
    1 point
  5. Dan_555

    Dan's misc. Scripts

    Hi, this is my Note-Memo-Pad script written in Autoit 3: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=NoteMemoPad.ico #AutoIt3Wrapper_Outfile=NoteMemoPad.exe #AutoIt3Wrapper_Outfile_x64=NoteMemoPad_x64.exe #AutoIt3Wrapper_Compression=0 #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <TrayConstants.au3> #include <Misc.au3> If _Singleton("Memo-Note-Pad00") = 0 Then Exit Global $a_Font, $a_Fontc Dim $a_Font[8] ;Font array definition Dim $a_Fontc[8] Global $f_Italic, $f_Strikethru, $f_Underline Global $f_inifile Opt("TrayMenuMode", 11) TraySetClick(16) Global $closecounter = 0, $TimeHandle = TimerInit(), $TimeDiff = TimerDiff($TimeHandle) Global $formTitle = "Note-memo-pad" Global $inifile = @ScriptDir & "\" & "NoteMemoPad.ini" $f_inifile = $inifile Global $a_BTN[10][9] Global $btnnr = -1 ;Tray menu definition Global $idMenu = TrayCreateMenu("Options") Global $idHideOnSave = TrayCreateItem("Hide on autosave", $idMenu, -1, 1) Global $idSTARTUP = TrayCreateItem("Start Hidden", $idMenu, -1, 1) Global $idBUP = TrayCreateItem("Create Back-Up", $idMenu, -1, 1) Global $idOTYP = TrayCreateItem("Tray single click open/Close", $idMenu, -1, 1) Global $idWW = TrayCreateItem("WordWrap", $idMenu, -1, 1) TrayCreateItem("", $idMenu) Global $idPos = TrayCreateItem("Reset Position", $idMenu) Global $idRPos = TrayCreateItem("Remember Position", $idMenu) TrayCreateItem("", $idMenu) Global $idFont = TrayCreateItem("Set Font", $idMenu) Global $idSave = TrayCreateItem("SaveNow") TrayCreateItem("") Global $idExit = TrayCreateItem("Exit") Local $tmpx, $tmpy $tmpx = IniRead($inifile, "OPTIONS", "POSX", "-1") $tmpy = IniRead($inifile, "OPTIONS", "POSY", "-1") Global $HideOnAutoSave = IniRead($inifile, "OPTIONS", "HideOnAutoSave", "0") If $HideOnAutoSave = 0 Then TrayItemSetState($idHideOnSave, $Tray_Unchecked) Else TrayItemSetState($idHideOnSave, $Tray_checked) EndIf Global $SingleClickOpen = IniRead($inifile, "OPTIONS", "TrayClickSingleOpen", "0") If $SingleClickOpen = 0 Then TrayItemSetState($idOTYP, $Tray_Unchecked) $TRAYCLICK = $TRAY_EVENT_PRIMARYDOUBLE Else TrayItemSetState($idOTYP, $Tray_checked) $TRAYCLICK = $TRAY_EVENT_PRIMARYUP EndIf Global $DoBackup = IniRead($inifile, "OPTIONS", "EnableBackup", "1") If $DoBackup = 0 Then TrayItemSetState($idBUP, $Tray_Unchecked) Else TrayItemSetState($idBUP, $Tray_checked) EndIf Global $WordWrap = IniRead($inifile, "OPTIONS", "Wordwrap", "0") If $WordWrap = 0 Then TrayItemSetState($idWW, $Tray_Unchecked) $ww = BitOR($ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL) Else TrayItemSetState($idWW, $Tray_checked) $ww = BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL) EndIf Global $StartHidden = IniRead($inifile, "OPTIONS", "StartHide", "1") If $StartHidden = 0 Then TrayItemSetState($idSTARTUP, $Tray_Unchecked) Else TrayItemSetState($idSTARTUP, $Tray_checked) EndIf Global $GUIVISIBLE = 1 #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate($formTitle, 680, 450, $tmpx, $tmpy, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_TABSTOP)) $Button1 = GUICtrlCreateButton("Add Button", 508, 2, 82, 19) GUICtrlSetTip(-1, "Add a Copy to Clipboard Button") GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $Button2 = GUICtrlCreateButton("Add Counter", 508, 25, 82, 19) GUICtrlSetTip(-1, "Add counter type buttons") GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $Button3 = GUICtrlCreateButton("Selection", 625, 25, 51, 19) GUICtrlSetTip(-1, "Invert Selection") GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $Button4 = GUICtrlCreateButton("Delete", 625, 2, 51, 19) GUICtrlSetTip(-1, "Delete Selected items") GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) Global $Edit1 = GUICtrlCreateEdit("", 2, 2, 500, 444, $ww) GUICtrlSetData(-1, "") GUICtrlSetResizing(-1, $GUI_DOCKTOP) ;GUICtrlSetFont($Edit1, 8, 0, 0, "JSE_AmigaAMOS", 0) _GUICtrlEdit_SetLimitText($Edit1, 20000000) GetIniFont($Edit1) #EndRegion ### END Koda GUI section ### ReadFromFile() _GUICtrlEdit_SetSel($Edit1, -1, -1) If $StartHidden = 0 Then GUISetState(@SW_SHOW) $GUIVISIBLE = 1 Else GUISetState(@SW_HIDE) $GUIVISIBLE = 0 EndIf CreateButtons() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Global $AutoSaveTimer = TimerInit() Global $AutoSave = 0 While 1 Switch TrayGetMsg() Case $idSave SaveToFile() Case $idExit If $GUIVISIBLE = 1 And _GUICtrlEdit_GetModify($Edit1) = True Then SaveToFile() Exit Case $idHideOnSave $HideOnAutoSave = $HideOnAutoSave + 1 If $HideOnAutoSave > 1 Then $HideOnAutoSave = 0 If $HideOnAutoSave = 0 Then TrayItemSetState($idHideOnSave, $Tray_Unchecked) Else TrayItemSetState($idHideOnSave, $Tray_checked) EndIf IniWrite($inifile, "OPTIONS", "HideOnAutoSave", $HideOnAutoSave) Case $idSTARTUP $StartHidden = $StartHidden + 1 If $StartHidden > 1 Then $StartHidden = 0 If $StartHidden = 0 Then TrayItemSetState($idSTARTUP, $Tray_Unchecked) Else TrayItemSetState($idSTARTUP, $Tray_checked) EndIf $StartHidden = IniWrite($inifile, "OPTIONS", "StartHide", $StartHidden) Case $idWW $WordWrap = $WordWrap + 1 If $WordWrap > 1 Then $WordWrap = 0 If $WordWrap = 0 Then TrayItemSetState($idWW, $Tray_Unchecked) $ww = BitOR($ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL) Else TrayItemSetState($idWW, $Tray_checked) $ww = BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL) EndIf IniWrite($inifile, "OPTIONS", "Wordwrap", $WordWrap) $tmp = GUICtrlRead($Edit1) GUICtrlDelete($Edit1) $Edit1 = GUICtrlCreateEdit("", 2, 2, 500, 444, $ww) _GUICtrlEdit_SetLimitText($Edit1, 20000000) GetIniFont($Edit1) GUICtrlSetData($Edit1, $tmp) $tmp = "" Case $idBUP $DoBackup = $DoBackup + 1 If $DoBackup > 1 Then $DoBackup = 0 If $DoBackup = 0 Then TrayItemSetState($idBUP, $Tray_Unchecked) Else TrayItemSetState($idBUP, $Tray_checked) EndIf IniWrite($inifile, "OPTIONS", "EnableBackup", $DoBackup) Case $idOTYP $SingleClickOpen = $SingleClickOpen + 1 If $SingleClickOpen > 1 Then $SingleClickOpen = 0 If $SingleClickOpen = 0 Then TrayItemSetState($idOTYP, $Tray_Unchecked) $TRAYCLICK = $TRAY_EVENT_PRIMARYDOUBLE Else TrayItemSetState($idOTYP, $Tray_checked) $TRAYCLICK = $TRAY_EVENT_PRIMARYUP EndIf IniWrite($inifile, "OPTIONS", "TrayClickSingleOpen", $SingleClickOpen) Case $idFont SetFont($Edit1, $Form1) Case $idRPos Local $aTmp = WinGetPos($Form1) IniWrite($inifile, "OPTIONS", "POSX", $aTmp[0]) IniWrite($inifile, "OPTIONS", "POSY", $aTmp[1]) $aTmp = "" Case $idPos IniWrite($inifile, "OPTIONS", "POSX", "-1") IniWrite($inifile, "OPTIONS", "POSY", "-1") WinMove($Form1, "", 0, 0) WinActivate($Form1) Case $TRAYCLICK If _GUICtrlEdit_GetModify($Edit1) = True Then SaveToFile() If $GUIVISIBLE = 0 Then GUISetState(@SW_SHOW, $Form1) $GUIVISIBLE = 1 Tray_Items(1) Else GUISetState(@SW_HIDE, $Form1) $GUIVISIBLE = 0 Tray_Items(2) EndIf EndSwitch $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE If _GUICtrlEdit_GetModify($Edit1) = True Then SaveToFile() GUISetState(@SW_HIDE, $Form1) $GUIVISIBLE = 0 Tray_Items(2) Case $Button1 ;Add Button AddButtons(1) Case $Button2 ;Add Counter AddButtons(2) Case $Button3 ;Invert Selection For $x = 0 To $btnnr $tmp = _IsChecked($a_BTN[$x][3]) If $tmp = 0 Then $tmp1 = 1 Else $tmp1 = 0 EndIf _CheckUncheck($a_BTN[$x][3], $tmp1) Next Case $Button4 ;Delete $tmp1 = 0 For $x = 0 To $btnnr $tmp = _IsChecked($a_BTN[$x][3]) If $tmp = 1 Then IniWrite($inifile, "BUTTON_" & $a_BTN[$x][8], "00", 0) $tmp1 = 1 EndIf Next If $tmp1 = 1 Then CreateButtons() Case Else If $nMsg > 0 Then For $x = 0 To $btnnr If $a_BTN[$x][0] = 1 Then If $nMsg = $a_BTN[$x][4] Then ClipPut($a_BTN[$x][2]) Else $tmp = 0 If $nMsg = $a_BTN[$x][4] Then GUICtrlSetData($a_BTN[$x][5], GUICtrlRead($a_BTN[$x][5]) - 1) $tmp = 1 EndIf If $nMsg = $a_BTN[$x][6] Then GUICtrlSetData($a_BTN[$x][5], GUICtrlRead($a_BTN[$x][5]) + 1) $tmp = 1 EndIf If $tmp = 1 Then IniWrite($inifile, "BUTTON_" & $a_BTN[$x][8], "02", GUICtrlRead($a_BTN[$x][5])) EndIf Next EndIf EndSwitch If TimerDiff($AutoSaveTimer) > 300000 And $AutoSave = 0 And $GUIVISIBLE = 1 Then If _GUICtrlEdit_GetModify($Edit1) = True Then SaveToFile() $AutoSave = 1 If $HideOnAutoSave = 1 Then GUISetState(@SW_HIDE, $Form1) $GUIVISIBLE = 0 Tray_Items(2) EndIf EndIf EndIf WEnd Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $IdFrom, $iCode $IdFrom = BitAND($wParam, 0x0000FFFF) $iCode = BitShift($wParam, 16) Switch $IdFrom Case $Edit1 Switch $iCode Case $EN_UPDATE $AutoSaveTimer = TimerInit() $AutoSave = 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func Tray_Items($typ) Local $tmp, $tmp1 If $typ = 1 Then $tmp = $TRAY_ENABLE $tmp1 = $TRAY_ENABLE ElseIf $typ = 0 Then $tmp = $TRAY_DISABLE $tmp1 = $TRAY_DISABLE Else $tmp = $TRAY_DISABLE $tmp1 = $TRAY_ENABLE EndIf TrayItemSetState($idWW, $tmp) TrayItemSetState($idPos, $tmp) TrayItemSetState($idRPos, $tmp) TrayItemSetState($idFont, $tmp) TrayItemSetState($idSave, $tmp) TrayItemSetState($idExit, $tmp1) EndFunc ;==>Tray_Items Func AddButtons($typ) If $btnnr < 9 Then Tray_Items(0) $nMsg = GUIGetMsg() Local $InputForm, $Button1, $Button2, $Input1, $Input2, $Label1, $Label2 #Region ### START Koda GUI section ### Form= GUISetState(@SW_DISABLE, $Form1) $InputForm = GUICreate("Button Generator", 237, 135, -1, -1, BitOR($WS_BORDER, $WS_CAPTION), $WS_EX_APPWINDOW, $Form1) $Button1 = GUICtrlCreateButton("Ok", 16, 104, 55, 18, $BS_DEFPUSHBUTTON) $Button2 = GUICtrlCreateButton("Cancel", 167, 104, 55, 18) If $typ = 1 Then $Input1 = GUICtrlCreateInput("", 15, 24, 208, 21) $Label1 = GUICtrlCreateLabel("Button Name:", 15, 4, 122, 17) $Input2 = GUICtrlCreateInput("", 15, 74, 208, 21) $Label2 = GUICtrlCreateLabel("Clipboard Text:", 14, 55, 267, 17) GUICtrlSetLimit($Input1, 22) Else $Input1 = GUICtrlCreateInput("", 15, 24, 208, 21) $Label1 = GUICtrlCreateLabel("Descriptional Text:", 15, 4, 122, 17) $Input2 = GUICtrlCreateInput("", 15, 74, 208, 21, $ES_NUMBER) GUICtrlSetLimit($Input1, 28) GUICtrlSetLimit($Input2, 8) $Label2 = GUICtrlCreateLabel("Enter a Number", 14, 55, 267, 17) EndIf GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $Ex = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 If GUICtrlRead($Input1) <> "" And GUICtrlRead($Input2) <> "" Then $Ex = 0 ExitLoop EndIf Case $Button2 $Ex = 1 ExitLoop EndSwitch WEnd If $Ex = 0 Then Local $found = 0 For $x = 0 To 9 $tmp = IniRead($inifile, "BUTTON_" & $x, "00", "-1") If $tmp <= 0 Then IniWrite($inifile, "BUTTON_" & $x, "00", $typ) IniWrite($inifile, "BUTTON_" & $x, "01", GUICtrlRead($Input1)) IniWrite($inifile, "BUTTON_" & $x, "02", GUICtrlRead($Input2)) $found = 1 ExitLoop EndIf Next EndIf GUIDelete($InputForm) GUISetState(@SW_ENABLE, $Form1) WinActivate($Form1) CreateButtons() Tray_Items(1) EndIf EndFunc ;==>AddButtons Func CreateButtons() If $btnnr > -1 Then For $x = 0 To $btnnr $tmp = $a_BTN[$x][0] If $tmp = 1 Then GUICtrlDelete($a_BTN[$x][3]) GUICtrlDelete($a_BTN[$x][4]) ElseIf $tmp = 2 Then GUICtrlDelete($a_BTN[$x][3]) GUICtrlDelete($a_BTN[$x][4]) GUICtrlDelete($a_BTN[$x][5]) GUICtrlDelete($a_BTN[$x][6]) GUICtrlDelete($a_BTN[$x][7]) EndIf Next $btnnr = -1 EndIf For $x = 0 To 9 $tmp = IniRead($inifile, "BUTTON_" & $x, "00", "-1") If $tmp > 0 And $tmp < 9 Then $btnnr = $btnnr + 1 $a_BTN[$btnnr][0] = Int($tmp) $a_BTN[$btnnr][1] = IniRead($inifile, "BUTTON_" & $x, "01", "") $a_BTN[$btnnr][2] = IniRead($inifile, "BUTTON_" & $x, "02", "") $a_BTN[$btnnr][8] = $x EndIf Next For $x = 0 To $btnnr $tmp = $a_BTN[$x][0] If $tmp > 0 Then If $tmp = 1 Then $a_BTN[$x][3] = GUICtrlCreateCheckbox("", 650, 60 + $x * 40, 18, 30) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $a_BTN[$x][4] = GUICtrlCreateButton($a_BTN[$x][1], 510, 60 + $x * 40, 130, 30) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) GUICtrlSetTip($a_BTN[$x][4], "Click to copy to clipboard") ElseIf $tmp = 2 Then $a_BTN[$x][7] = GUICtrlCreateLabel($a_BTN[$x][1] & ":", 510, 53 + $x * 40, 220, 18) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $a_BTN[$x][3] = GUICtrlCreateCheckbox("", 650, 70 + $x * 40, 18, 20) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $a_BTN[$x][4] = GUICtrlCreateButton("-", 510, 70 + $x * 40, 20, 20) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $a_BTN[$x][5] = GUICtrlCreateInput($a_BTN[$x][2], 540, 70 + $x * 40, 60, 20, BitOR($ES_NUMBER, $ES_READONLY)) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) $a_BTN[$x][6] = GUICtrlCreateButton("+", 610, 70 + $x * 40, 20, 20) GUICtrlSetResizing(-1, BitOR($GUI_DOCKHCENTER, $GUI_DOCKVCENTER)) EndIf EndIf Next EndFunc ;==>CreateButtons Func _CheckUncheck($id, $nr) If $nr = 0 Then GUICtrlSetState($id, $GUI_UNCHECKED) Else GUICtrlSetState($id, $GUI_CHECKED) EndIf EndFunc ;==>_CheckUncheck Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Func ReadFromFile() If FileExists(@ScriptDir & "\" & "memory.txt") Then Local $hFileOpen = FileOpen(@ScriptDir & "\" & "memory.txt", $FO_READ) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "ReadFromFile", "An error occurred when reading the file." & @CRLF & @ScriptDir & "\" & "memory.txt") Return False EndIf Local $sFileRead = FileRead($hFileOpen) ; Close the handle returned by FileOpen. FileClose($hFileOpen) GUICtrlSetData($Edit1, $sFileRead, 1) EndIf EndFunc ;==>ReadFromFile Func SaveToFile() If $DoBackup = 1 Then If FileExists(@ScriptDir & "\" & "memory.bak") Then FileDelete(@ScriptDir & "\" & "memory.bak") FileCopy(@ScriptDir & "\" & "memory.txt", @ScriptDir & "\" & "memory.bak") EndIf Local $hFileOpen = FileOpen(@ScriptDir & "\" & "memory.txt", $FO_OVERWRITE) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "SaveToFile", "An error occurred whilst writing the temporary file." & @CRLF & @ScriptDir & "\" & "memory.txt") Return False EndIf If FileWrite($hFileOpen, GUICtrlRead($Edit1)) = 0 Then MsgBox($MB_SYSTEMMODAL, "FileWrite", "Failed to write to Memory.txt" & @CRLF & @ScriptDir & "\" & "memory.txt") Return False Else _GUICtrlEdit_SetModify($Edit1, False) EndIf FileClose($hFileOpen) EndFunc ;==>SaveToFile Func SetFont($id, $h_gui, $nr = 0) For $x = 0 To 7 $a_Fontc[$x] = $a_Font[$x] Next $a_Font = _ChooseFont($a_Font[2], $a_Font[3], $a_Font[5], $a_Font[4], $f_Italic, $f_Underline, $f_Strikethru, $h_gui) If $a_Font <> -1 Then ; GUICtrlSetFont ( controlID, size [, weight [, attribute [, fontname [, quality]]]] ) GUICtrlSetFont($id, $a_Font[3], $a_Font[4], $a_Font[1], $a_Font[2], 0) GUICtrlSetColor($id, $a_Font[5]) $f_Italic = BitAND($a_Font[1], 2) $f_Underline = BitAND($a_Font[1], 4) $f_Strikethru = BitAND($a_Font[1], 8) SaveIniFont($nr) ;ConsoleWrite(@CRLF & $a_Font[3] & @CRLF & $a_Font[4] & @CRLF & $a_Font[1] & @CRLF & $a_Font[2] & @CRLF & $a_Font[5]) Else Dim $a_Font[8] ;Font array definition For $x = 0 To 7 $a_Font[$x] = $a_Fontc[$x] Next EndIf EndFunc ;==>SetFont Func GetIniFont($id, $nr = 0) ;Default font definition $a_Font[1] = IniRead($f_inifile, "font", $nr & "1", "0") $a_Font[2] = IniRead($f_inifile, "font", $nr & "2", "Arial") $a_Font[3] = IniRead($f_inifile, "font", $nr & "3", "8") $a_Font[4] = IniRead($f_inifile, "font", $nr & "4", "400") $a_Font[7] = IniRead($f_inifile, "font", $nr & "7", "0") $f_Italic = BitAND($a_Font[1], 2) $f_Underline = BitAND($a_Font[1], 4) $f_Strikethru = BitAND($a_Font[1], 8) GUICtrlSetFont($id, $a_Font[3], $a_Font[4], $a_Font[1], $a_Font[2], 0) GUICtrlSetColor($id, $a_Font[7]) EndFunc ;==>GetIniFont Func SaveIniFont($nr = 0) IniWrite($f_inifile, "font", $nr & "1", $a_Font[1]) IniWrite($f_inifile, "font", $nr & "2", $a_Font[2]) IniWrite($f_inifile, "font", $nr & "3", $a_Font[3]) IniWrite($f_inifile, "font", $nr & "4", $a_Font[4]) IniWrite($f_inifile, "font", $nr & "7", $a_Font[7]) EndFunc ;==>SaveIniFont Func CW($txt) ConsoleWrite($txt & @CRLF) EndFunc ;==>CW It is meant to stay in the Tray menue, so the script will exit only if you choose the Exit from its icon. (Only single instance can run at a time) It has an editor field, its content is saved when the app is hidden (if there was a change in the editor - if the modify flag is set). The text is saved as "memory.txt" in the script folder. The ini file is named "NoteMemoPad.ini" and will be created in the script folder. It has some additional buttons (max 10): You can add a button, which will copy a predefined text into clipboard. You can add a counter. Click on + or - to change it. The counter and the button are saved in the ini file. When you delete a button, its contents are not deleted - The slot is only marked as unused. (In case you deleted it by a mistake) This is how it looks like: The options for this tool are located in the tray menu, and they are saved in the ini file. Some options can be changed only when the Editor Window is visible. Options are: Hide on Autosave: An autosave will be done, if something is typed in the editor field, after 5 minutes. You can let the window be hidden then. Start Hidden: Do not open the window at the first start. Make backup : (Create a backup of the last saved file as memory.bak before saving) Tray Single Click open/close : Open the window with 1 or 2 clicks on the tray menu. WordWrap: Set or Reset the wordwrap mode for the editor. Reset position: Reset the window starting position to center of the screen. (Using this option will set the window to the top left edge, but it will open centered by the next start) Remember Position: Position the window where you like it to be, and it will always open there (if you do not move it). Set Font: Change the used font. Attached is an icon file. Have fun. NoteMemoPad.ico
    1 point
  6. Subz

    ugly TAB resizing

    You can use GuiResizeMode to stop the controls moving for example: Opt("GUIResizeMode", 802) You can also use GUICtrlSetResizing to change specific controls resizing.
    1 point
  7. Yes, but, you have to decide which data should be preferred. The data from the Array or the data from the ListView. Because if you change the data in the ListView, it is not automatically updated in the Array. The same is with the Array, if you modify the Array, the data is not automatically updated in the ListView. Until you update it. So here is the answer, on how to edit a Listview. There are few ways of doing it, and so i have chosen this one (without array) : #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> $GUI_Main = GUICreate("SELL", 562, 327, 386, 141) GUICtrlCreateLabel("Name of dish", 8, 24, 70, 17) $Input_Name = GUICtrlCreateInput("", 80, 24, 113, 21) GUICtrlCreateLabel("Price", 230, 24, 50, 17) $Input_Price = GUICtrlCreateInput("", 280, 24, 129, 21) $Button_Edit = GUICtrlCreateButton("Save", 440, 24, 105, 25) $ListView_Sell = GUICtrlCreateListView("Name of dish|Price", 0, 64, 561, 257) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 300) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 250) $ListViewItem_Sellone = GUICtrlCreateListViewItem("Stir-fried noodles with beef|35$", $ListView_Sell) $ListViewItem_Selltwo = GUICtrlCreateListViewItem("Fried fish ball|10$", $ListView_Sell) $ListViewItem_Sellthree = GUICtrlCreateListViewItem("goby hotpot|50$", $ListView_Sell) GUISetState(@SW_SHOW) Global $fClick = 0, $iLV, $iRow, $iCol Global $itemEdited=-1 GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY_Handler") $hLV_1_Handle = GUICtrlGetHandle($ListView_Sell) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button_Edit if $itemEdited>-1 Then _GUICtrlListView_SetItemText($ListView_Sell,$itemEdited,GuiCtrlRead($Input_Name)) _GUICtrlListView_SetItemText($ListView_Sell,$itemEdited,GuiCtrlRead($Input_Price),1) ;~ GUICtrlSetData($Input_Name, "") ;~ GUICtrlSetData($Input_Price, "") ;~ $itemEdited=-1 ;~ _GUICtrlListView_SetItemSelected($ListView_Sell,-1,False) EndIf Case $GUI_EVENT_CLOSE Exit EndSwitch If $fClick Then ; Display result ConsoleWrite("Clicked LV: " & @TAB & $iLV & " Row: " & @TAB & $iRow & " Col: " & @TAB & $iCol & @CRLF) If $iRow > -1 Then $tmparray = _GUICtrlListView_GetItemTextArray($ListView_Sell, $iRow) If $tmparray[0] > 0 Then $itemEdited = $iRow GUICtrlSetData($Input_Name, $tmparray[1]) GUICtrlSetData($Input_Price, $tmparray[2]) EndIf $tmparray = "" EndIf ; Clear flag $fClick = 0 EndIf WEnd Func _WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam) ;modified code from https://www.autoitscript.com/forum/topic/155607-how-to-detect-which-listview-was-clicked/ #forceref $hWnd, $iMsg, $wParam ; Struct = $tagNMHDR and "int Item;int SubItem" from $tagNMLISTVIEW Local $tStruct = DllStructCreate("hwnd;uint_ptr;int_ptr;int;int", $lParam) If @error Then Return Switch DllStructGetData($tStruct, 1) Case $hLV_1_Handle $iLV = 1 Case Else Return EndSwitch If BitAND(DllStructGetData($tStruct, 3), 0xFFFFFFFF) = $NM_CLICK Then $iRow = DllStructGetData($tStruct, 4) $iCol = DllStructGetData($tStruct, 5) ; Set flag $fClick = 1 EndIf EndFunc ;==>_WM_NOTIFY_Handler Click on a listview item to select it for editing, then change the text in the input boxes, and click on save to save it. Eventually, modify the Case $Button_Edit and remove comment from the commented lines to see a small change.
    1 point
  8. Well, you could give us at least something to start with: A ready Listview with added items etc etc. Here is an example, it does not save to a textfile, instead it displays the text in an edit field, with the right font selected: #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #include <String.au3> Example() Func Example() Local $aItem, $sText, $idListview #Region ### START Koda GUI section ### Form= $f1 = GUICreate("Listview format", 490, 279, 192, 125) $idListview = GUICtrlCreateListView("col1|col2|col3", 2, 2, 194, 268) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50) $Edit1 = GUICtrlCreateEdit("", 205, 3, 278, 269) GUISetState(@SW_SHOW) GUICtrlSetFont ( $Edit1, 9 , 0 , 0 , "Courier", 1 ) #EndRegion ### END Koda GUI section ### GUICtrlCreateListViewItem("line1|data1|more1", $idListview) GUICtrlCreateListViewItem("li2|data2aasd|more2", $idListview) GUICtrlCreateListViewItem("line3|1234 23 |more3", $idListview) GUICtrlCreateListViewItem("line4|data4|more4", $idListview) GUICtrlCreateListViewItem("line5|data5|more5", $idListview) GUISetState(@SW_SHOW) Local $a_ColW[4] ;Define the column width array, we are using the numbers 1 to 3 (but skipping the 0) therefore its 4 items ! $a_ColW[1] = 6 ;Predefined column length, assumes that the text will not exceed these numbers $a_ColW[2] = 15 $a_ColW[3] = 15 For $x = 0 To _GUICtrlListView_GetItemCount($idListview) ;Outer Loop $aItem = _GUICtrlListView_GetItemTextArray($idListview, $x) ;Extract the columns into array For $i = 1 To $aItem[0] ;Inner Loop $sText = $sText & $aItem[$i] & _StringRepeat(" ",($a_ColW[$i]-StringLen($aItem[$i])+1)) ;Assemble the text Next WriteEdit($Edit1,$sText,0) ;Paste the formated text into the edit field $sText="" Next ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Func WriteEdit($ed, $sMessage = "", $clear = 1) If $clear = 1 Then GUICtrlSetData($ed, "") GUICtrlSetData($ed, $sMessage & @CRLF , $clear) EndFunc ;==>WriteEdit I had to use a script from Autoit help file and to modify it a bit.
    1 point
  9. 😀 This is the very first time I have posted anything on this Forum. I have been using AutoIt since 2006 believe it or not I have attached a script here that holds info that may help someone who is having a hard time understanding how to detect double clicking inside a ListView. It has lots (and I mean lots!) of comments through out the script. Hope this helps! DoubleClickListView.au3
    1 point
  10. SYRAU3 http://pastebin.com/WhPLnjRN
    1 point
×
×
  • Create New...