Jump to content

Merchants

Active Members
  • Posts

    196
  • Joined

  • Last visited

Everything posted by Merchants

  1. i am sorry but i have done that i want to use/edit the new text in the combo input not when i click it and it disappears.. if i use GUICtrlSetData then it wil make a item of it and that is not what i want that was my requirements
  2. M23 not bad, but it was not what i was looking for i know one solution but only if there is no other way can you confirm this M23? #include <GUIConstantsEx.au3> #include <GuiComboBox.au3> $hGUI = GUICreate("Test", 500, 500) $cCombo = GUICtrlCreateCombo("", 10, 10, 300, 20) GUICtrlSetData($cCombo, "These|are|the|selections") _GUICtrlComboBox_SetCueBanner($cCombo, "Not a selection") $cButton = GUICtrlCreateButton("Test", 10, 50, 80, 30) $testButton = GUICtrlCreateButton("Test2", 10, 100, 80, 30) GUICtrlSetState($cButton, $GUI_FOCUS) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $testButton ControlSetText("[CLASS:AutoIt v3 GUI]", "", "[CLASS:Edit; INSTANCE:1]", "New Text Here" ) EndSwitch WEnd
  3. i want to set text in a combo input without make a item of it $Input1 = GuiCtrlCreatecombo("", 10, 10, 100, 20)
  4. will it works.. i think someone will prove you wrong don't know who will be first
  5. this was enough ControlDisable($hGui, "", $hRichEdit) Thank you it works but when i have more text then i can't see it then i wana scroll down but it is...it is disable... got a command to turn only the scroll bar on?
  6. it was a good idea but with some clicking i can still select the text but al will leave it as it is i just have to live with it
  7. is not the best solution.. there is not a style for it?
  8. i can only find this one $ES_READONLY 0x0800 Prevents the user from typing or editing text in the edit control. if i add this the user can still select the text
  9. is it possible to disable the user from typing or editing or selecting items? basically a log box.. $hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 7,45,235,80, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
  10. What for log box is this and how can i create it? and how can i enter different color text like red or yellow? this image is taken for the Autoit editor: SciTE4AutoIt3.exe
  11. i want to color the error red in the label. is there a easy way for it without make 3 different labels? GUICtrlCreateLabel("File 1 Success!" & @CRLF & "File 2 Error!" & @CRLF & "File 3 Success!") output:
  12. when i fist saw this _GUICtrlListBox_SetTopIndex($clist) i also find this: _GUICtrlListBox_GetTopIndex($clist) i finally found out how to get the index of the scroll bar and so it runs smoothly now with the new updates: Thank you M23 ; Look for file size change every 5 secs If TimerDiff($nBegin) > 5000 Then $iFileSize = FileGetSize($sFile) If $iFileSize <> $iPrevFileSize Then ; If size changed than reload contents _GUICtrlListBox_BeginUpdate($cList) $iPrevIndex = _GUICtrlListBox_GetCaretIndex($cList) $iPrevposition = _GUICtrlListBox_GetTopIndex($cList) $iPrevFileSize = $iFileSize _FileReadToArray($sFile, $aLines) GUICtrlSetData($cList, _SearchLines()) _GUICtrlListBox_SetCurSel($cList, $iPrevIndex) _GUICtrlListBox_SetTopIndex($cList, $iPrevposition) _GUICtrlListBox_EndUpdate($cList) EndIf EndIf
  13. Unselecting currently selected item: Fixed Scrolling list to a given point: i have tryed to deal with this on google + help files i can't find a way to fix this i have no id how to deal with _SendMessage and i am very curious what where you come up with
  14. i find this better StringRegExp($aLines[$i], "(?i)" & $sWhiteList) StringRegExp($aLines[$i], "(?i)" & $sBlackList) the multi text search is complete i thank you for that so next 2 things: first: File list contains: more than 30 random items (text) the file list update every 5 sec with more items ok my list is now bigger then i can see. So i need to scroll down. I scroll down half way next my list wil update with new and more items this as result that my scroll bar wil move to the top i find this very annoying the scroll bar needs to go back where it left off once the list is done updating second: if i select a item by doning 1 click on it this wil be deselect when the list is updated
  15. ok not bad there is still a lot to be done File list contains: test1 test2 bla1 bla2 first: when i type in the filter box: test,bla it does not show any of the items anymore (it looks like to do a multi search just type it like: <text>comma<text> am i right?) second: if i leave the filter box blank and i enter: bla in the black list box it does not do anything there is more but al do 2 things at a time or if you like to hear it all just say it
  16. M23 i get a error at line 3: #include <StringConstants.au3> i have search on the google for it but i can't find it you got a link? or post the StringConstants.au3 file
  17. my text filter is almost complete what it still needs is a multie text search Filter inbox Ex: file;win now i want it to find items with the text file and win this is func 1 next func what i need is a black list this meens when i enter a text in the black list box Ex: test i want it to find items with the text file and win and NOT items with the text test i have try to find a way i can not find it maybe kylomas or M23 can help me out PS: black list also need a multie search and is it possible you can find a way that the scroll bar does not go back to the top when the list is updated with new items it most not move when i get more then 20 items + if i select a item it wil be deselect when the list is updated #include <WindowsConstants.au3> #include <GuiListBox.au3> #include <EditConstants.au3> #Include <File.au3> #NoTrayIcon Opt("GUICoordMode", 1) Global $iCurrIndex = -1, $sFile=@ScriptDir & "\File List.txt", $FileSize=0 Global $hGUI = GUICreate("Test Windows", 175, 460, 200, 200) GUICtrlCreateLabel("Filter", 7, 5) Global $hInput = GUICtrlCreateInput("", 5, 20, 165, 25) GUICtrlCreateLabel("Black List", 7, 50) Global $hBlacklist = GUICtrlCreateInput("", 5, 65, 165, 25) Global $hList = GUICtrlCreateList("", 5, 95, 165, 330, BitOr($WS_VSCROLL, $LBS_DISABLENOSCROLL)) Global $hButton = GUICtrlCreateButton("Exit", 5, 430, 165, 25) Global $hClear = GUICtrlCreateButton("Clear", 90, 1, 80, 19) GUICtrlSetFont($hInput, 11, 600, "", "Tahoma") GUICtrlSetColor($hInput, 0x948064) GUICtrlSetBkColor($hInput, 0x000000) GUICtrlSetFont($hList, 11, 600, "", "Tahoma") GUICtrlSetBkColor($hList, 0x000000) GUICtrlSetColor($hList, 0x948064) GUISetStyle($WS_CAPTION, $WS_BORDER) Global $hUP = GUICtrlCreateDummy() Global $hDOWN = GUICtrlCreateDummy() Global $hENTER = GUICtrlCreateDummy() GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') Global $aKeyWords = StringSplit(FileRead($sFile), @CRLF, 3) Keywords(GUICtrlRead($hInput)) Dim $AccelKeys[3][2] = [["{UP}", $hUP], ["{DOWN}", $hDOWN], ["{ENTER}", $hENTER]] GUISetAccelerators($AccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton Exit Case $hClear Keywords(GUICtrlRead($hInput)) $FileSize=0 $aKeyWords = "" FileRecycle($sFile) Case $hUP $iCurrIndex -= 1 If $iCurrIndex < 0 Then $iCurrIndex = 0 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) Case $hDOWN $iTotal = _GUICtrlListBox_GetCount($hList) $iCurrIndex += 1 If $iCurrIndex > $iTotal - 1 Then $iCurrIndex = $iTotal - 1 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) Case $hENTER If $iCurrIndex <> -1 Then $sText = _GUICtrlListBox_GetText($hList, $iCurrIndex) GUICtrlSetData($hInput, $sText) $iCurrIndex = -1 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) EndIf EndSwitch If Not FileExists($sFile) Then $aKeyWords = "" $FileSize=0 Keywords(GUICtrlRead($hInput)) GUICtrlSetData($hList, 'Waiting For:|File List') While Not FileExists($sFile) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton Exit EndSwitch WEnd $aKeyWords = StringSplit(FileRead($sFile), @CRLF, 3) Keywords(GUICtrlRead($hInput)) $FileSize = FileGetSize($sFile) ElseIf Not (FileGetSize($sFile) = $FileSize) Then $aKeyWords = StringSplit(FileRead($sFile), @CRLF, 3) $FileSize = FileGetSize($sFile) Keywords(GUICtrlRead(StringSplit(FileRead($sFile), ";", 3))) EndIf Sleep(0.5) WEnd Func _DubbleClick() Msgbox(64,"Dubble Click","Dubble Click Func!") EndFunc Func Keywords($sFilter) Local $shlist = '|' For $1 = 0 To UBound($aKeyWords) - 2 If $sFilter = '' Then $shlist &= $aKeyWords[$1] & '|' ContinueLoop Else If StringInStr($aKeyWords[$1], $sFilter) > 0 Then $shlist &= $aKeyWords[$1] & '|' EndIf Next GUICtrlSetData($hList, $shlist) EndFunc Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) If FileExists($sFile) Then Switch BitAND($wParam, 0xFFFF) Case $hInput or $hList Switch BitShift($wParam, 16) Case $EN_CHANGE Keywords(GUICtrlRead($hInput)) Case 2 _DubbleClick() EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndIf EndFunc File list contains: File-01 win2 win3 test1
  18. can someone explain me why this does not work and come up with the right solution $text="bla" If Not $text = "test1" Then MsgBox(64,"","msg box 1") EndIf
  19. very very nice i thank you i am not wel experience i have much respect your users like you
  20. "true" hope it is a good game have fun al see it again tomorrow
  21. well i like to see that scroll bar is is possible to show it?
  22. i want to shows a disabled vertical scroll bar for the list box like this:
  23. not bad still does not work as i want when i enter a word in the filter that works but when i clear it the hole list is gone or does not dispay all of the items + i wana do a func when i dubble click on one of the list items #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #Include <File.au3> #include <Array.au3> #Include <GuiListBox.au3> #NoTrayIcon Opt("GUICoordMode", 1) Global $GUI[20], $D2Win, $hInput, $hList, $sPartialData, $asKeyWords[301], $Number $GUI[0] = GUICreate("test windows", 175, 415) GUICtrlCreateLabel("Filter", 7, 5) $hInput = GUICtrlCreateInput("", 5, 20, 165, 25) $hList = GuiCtrlCreateList("", 5, 50, 165, 330, BitOR(0x00100000, 0x00200000)) $hButton = GUICtrlCreateButton("Exit", 5, 385, 165, 25) GUICtrlSetFont($GUI[4], 11, 600, "", "Tahoma") ;GUICtrlSetBkColor($GUI[4], 0x000000) GUICtrlSetColor($GUI[4], 0x948064) GUICtrlSetFont($GUI[2], 11, 600, "", "Tahoma") GUICtrlSetBkColor($GUI[2], 0x000000) GUICtrlSetColor($GUI[2], 0x948064) WinMove($GUI[0], "", 200, 200, Default, Default) Keywords() GUISetStyle($WS_CAPTION, $WS_BORDER) $hUP = GUICtrlCreateDummy() $hDOWN = GUICtrlCreateDummy() $hENTER = GUICtrlCreateDummy() GUISetState(@SW_SHOW, $GUI[0]) $sCurr_Input = "" $iCurrIndex = -1 Dim $AccelKeys[3][2]=[["{UP}", $hUP], ["{DOWN}", $hDOWN], ["{ENTER}", $hENTER]] GUISetAccelerators($AccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hList $sChosen = GUICtrlRead($hList) If $sChosen <> "" Then GUICtrlSetData($hInput, $sChosen) Case $hButton Exit Case $hUP If $sPartialData <> "" Then $iCurrIndex -= 1 If $iCurrIndex < 0 Then $iCurrIndex = 0 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) EndIf Case $hDOWN If $sPartialData <> "" Then $iTotal = _GUICtrlListBox_GetCount($hList) $iCurrIndex += 1 If $iCurrIndex > $iTotal - 1 Then $iCurrIndex = $iTotal - 1 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) EndIf Case $hENTER If $iCurrIndex <> -1 Then $sText = _GUICtrlListBox_GetText($hList, $iCurrIndex) GUICtrlSetData($hInput, $sText) $iCurrIndex = -1 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) EndIf EndSwitch CheckInputText() ; If input has changed, refill list with matching items If GUICtrlRead($hInput) <> $sCurr_Input Then CheckInputText() $sCurr_Input = GUICtrlRead($hInput) EndIf WEnd Func CheckInputText() $sPartialData = "|" ; Start with delimiter so new data always replaces old Local $sInput = GUICtrlRead($hInput) If $sInput <> "" Then For $i = 0 To $Number If StringInStr($asKeyWords[$i], $sInput) <> 0 Then $sPartialData &= $asKeyWords[$i] & "|" Next GUICtrlSetData($hList, $sPartialData) EndIf EndFunc ;==>CheckInputText Func Keywords() Local $sData $Number = 0 $file = FileOpen(@ScriptDir & "\test1.txt", 0) If $file > -1 Then While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop If $Number > 0 Then If $Number = _FileCountLines(@ScriptDir & "\test1.txt") Then $asKeyWords[$Number] = $line $sData = $asKeyWords[$Number] Else $asKeyWords[$Number] = $line $sData &= $asKeyWords[$Number] & "|" EndIf Else $asKeyWords[$Number] = $line $sData = $asKeyWords[$Number] & "|" EndIf $Number = $Number +1 WEnd Else $sData = "Error on open file" EndIf FileClose($file) GUICtrlSetData($hList, $sData) $iCurrIndex = -1 _GUICtrlListBox_SetCurSel($hList, $iCurrIndex) EndFunc ;==>Keywords
×
×
  • Create New...