Jump to content

theTony

Members
  • Posts

    4
  • Joined

  • Last visited

theTony's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. PhoenixXL, Here is the code where the issue with clicking on the scroll bar in the predict window does not work: #include-once #include <GUIConstants.au3> #include 'PredictText.au3' ;Our Graphic User Interface $hGUI = GUICreate('Predict Text - Phoenix XL', 500, 400) GUICtrlCreateGroup("Edit Group - Number Check", 5, 10, 490, 170) GUICtrlCreateLabel("Type any number to Find Out What Happens", 10, 30, 480, 30) Global $Edit1 = GUICtrlCreateEdit('', 10, 50, 480, 120) GUICtrlCreateGroup("", -99, -99, 480, 30) GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') GUISetState() ;GUI Message Loop Local $iGUIGetMsg While 1 $iGUIGetMsg = GUIGetMsg() Switch $iGUIGetMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) ;$lParam is the Handle of the Control. ;When Focus is set to an Edit Control Change the Prediction of the Edit Controls. If _WinAPI_HiWord($wParam) = $EN_SETFOCUS Then ;The Words which have to be Predicted for First Edit Box. Local $_Words1[27] = ['345','3456','456','4567','567','5678','6789012345678','678','789012345678','754','8765','87654','90123','901','1','12','123','1234','12345','123456','1234567','12345678','12344','12345679','111','111333','11'] If $lParam = GUICtrlGetHandle($Edit1) Then ;Case-Sensitive _RegisterPrediction($lParam, $_Words1, 1, 0, 0, 1) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Run the above code and choose '1', then try clicking on the scroll bar in the predict window. Thank you,
  2. PhoenixXL, Please see I have edited my response above. Are you able to reproduce this issue: when the predict list is too long for the predict window the scroll bar does not work with mouse click, works with arrow down or up but not with mouse scroll/click. Thank you,
  3. Hello PhoenixXL, That is exactly what I was looking to do. It works perfectly. Thank you! I have a strange behavior now. if the array has enough entries so that a vertical scroll bar show up in the Predict list, this vertical scroll bar is inaccessible. To see what I mean try replacing this line and type 1 for the first character then see if you can scroll down: Local $_Words1[27] = ['345','3456','456','4567','567','5678','6789012345678','678','789012345678','754','8765','87654','90123','901','1','12','123','1234','12345','123456','1234567','12345678','12344','12345679','111','111333','11']
  4. Hello Phoenix XL, Thanks for this excellent script! I am very new to this. I am trying to see if I can use it but one thing I am not able to figure out how to accomplish. This is what I have so far, all taken from your examples: #cs Predict Text - Phoenix XL This code is taken from AutoIt @ http://www.autoitscript.com/forum/topic/143380-predict-text-for-an-edit-control-predicttextau3-udf/ #ce #include-once #include <GUIConstants.au3> #include 'PredictText.au3' ;Our Graphic User Interface $hGUI = GUICreate('Predict Text - Phoenix XL', 500, 400) GUICtrlCreateGroup("Edit Group - Number Check", 5, 10, 490, 170) GUICtrlCreateLabel("Type any number to Find Out What Happens", 10, 30, 480, 30) Global $Edit1 = GUICtrlCreateEdit('', 10, 50, 480, 120) GUICtrlCreateGroup("", -99, -99, 480, 30) GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') GUISetState() ;GUI Message Loop Local $iGUIGetMsg While 1 $iGUIGetMsg = GUIGetMsg() Switch $iGUIGetMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) ;$lParam is the Handle of the Control. ;When Focus is set to an Edit Control Change the Prediction of the Edit Controls. If _WinAPI_HiWord($wParam) = $EN_SETFOCUS Then ;The Words which have to be Predicted for First Edit Box. Local $_Words1[22] = ['345','3456','456','4567','567','5678','6789012345678','678','789012345678','754','8765','87654','90123','901','123','1234','12345','123456','2345','234','23','234567'] ;The Words which have to be Predicted for Second Edit Box. If $lParam = GUICtrlGetHandle($Edit1) Then ;Case-Sensitive _RegisterPrediction($lParam, $_Words1, 1, 0, 0, 1) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND When you run the above code and then type the number 1, you are presented with 123, 1234, 12345, and 123456 in the Predict window, with 123 already filled in the Edit control (the 23 part is highlighted) . What I need is for nothing to get prefilled in the Edit widow except what I just typed,1, and instead wait till I make the selection of which number from the Predict window needs to be filled in the Edit control. Is that possible? Any help is greatly appreciated. Thanks.
×
×
  • Create New...