Jump to content

littlebigman

Active Members
  • Posts

    193
  • Joined

  • Last visited

Everything posted by littlebigman

  1. This seems to work to remove that second keyboard and go back to normal. I had a bad feeling about making changes to the Region section…and wasn't disappointed.
  2. From unchecked to checked. Thanks for the tip. If it occurs on mine, I'll revert back, and use an alternative — the application I need to use also as the option of saving the output to a file instead. Checking the option in Windows added a second keyboard layout while I only had one before. No biggie, though.
  3. The input file is UTF8, so that didn't work. Nope, still wrong characters. ;Local $iPID = Run(@ComSpec & " /c dir c:\", "", @SW_SHOW, $STDERR_MERGED) Local $iPID = Run(@ComSpec & " /c type test.utf8.txt", "", @SW_SHOW, $STDERR_MERGED) That solved it (reboot required.) Thanks all.
  4. Thanks. Looks like I'm using it wrong: This time, "é" turns into "+¬". ;run CLI app Local $iPID = Run($WholeLine, $szDir, @SW_HIDE,$STDOUT_CHILD) If @error Then Exit MsgBox($MB_ICONERROR, "Error", "Running failed.") Local $sOutput = StdoutRead($iPID) If @error Then Exit ConsoleWrite("Error returned by StdOutRead! @error=" & @error & ", @extended=" & @extended & @CRLF) While True     $sOutput &= StdoutRead($iPID)     If @error Then ExitLoop     ;ConsoleWrite($sOutput & @CRLF) WEnd ;convert from DOS to ANSI $sOutput = _WinAPI_OemToChar ($sOutput) ;Poor man's search: copy STDOUT into clipboard, launch Notepad, paste ClipPut($sOutput)
  5. Hello, I use the following script to 1) run a command-line application (ie. "DOS" app), 2) copy its output to the clipboard, and 3) paste it to Notepad as a simple way to search the data. I notice that accented chars are wrong, eg. "é" becomes "é" Is it because of the DOS to Windows character pages? […] ;run CLI app Local $iPID = Run($WholeLine, $szDir, @SW_HIDE,$STDOUT_CHILD) If @error Then Exit MsgBox($MB_ICONERROR, "Error", "Running failed.") Local $sOutput = StdoutRead($iPID) If @error Then Exit ConsoleWrite("Error returned by StdOutRead! @error=" & @error & ", @extended=" & @extended & @CRLF) While True     $sOutput &= StdoutRead($iPID)     If @error Then ExitLoop WEnd ;Poor man's search: copy STDOUT into clipboard, launch Notepad, paste ClipPut($sOutput) $iPID = Run("notepad.exe") Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Local $hHdl = WinWait("[TITLE:Untitled - Notepad2; CLASS:Notepad2]","",10) if  not $hHdl then Exit MsgBox($MB_ICONERROR,"Error","Windows not found") Sleep(500) Send("^v") ;paste Sleep(1000) Send("^{HOME}") ;jump to first line in notepad Thank you.
  6. Hello, I just saw the following example, with no way to find what it does: Func blah($_) What does $_ refer to? Thank you.
  7. Thanks. Since that control is located in the "Win32" section of the toolbar in Koda, I did suspect it might require using different functions to access its full potential, although the helpfile shows the basic functions support clicking on a row at least through the GUICtrlGetState() function: While 1   Switch GUIGetMsg()     Case $GUI_EVENT_CLOSE             ExitLoop     Case $idButton             MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($idListview)), 2)     Case $idListview             MsgBox($MB_SYSTEMMODAL, "listview", "clicked=" & GUICtrlGetState($idListview), 2)   EndSwitch WEnd --- Edit: Maybe there is a work-around, but it's not as easy to use as the plain GUICtrlCreateListView(): Doesn't support creating + inserting multiple columns in one go with the "|" sign between columns Requires calling _GUICtrlListView_AddItem() to add a row, and then _GUICtrlListView_AddSubItem() to add other columns of that same row Doesn't work with the default GUI loop Requires registering a WM_NOTIFY() WM_NOTIFY() relies on the ListView handle which must be global to be accessible from within that function Edit: To insert items, there's at least the alternative _GUICtrlListView_AddArray()
  8. Hello, This is my first try at the ListView control, and am having some issues. The helpfile didn't help: No event is triggered when I click/double-click How to display a horizontal scrollbar How to enable multi-selection? Here's the code: #Region ### START Koda GUI section $Form1 = GUICreate("My form", 615, 437, 270, 124) $ListView1 = GUICtrlCreateListView("Date|Title|Guid|URL", 8, 8, 594, 374) $Button1 = GUICtrlCreateButton("Download", 8, 392, 595, 25) #EndRegion ### END Koda GUI section ### For $index = 0 to UBound($mst, $UBOUND_ROWS) - 1     Local $idItem1 = GUICtrlCreateListViewItem("My date|My title|My GUID|my URL", $ListView1) Next GUISetState(@SW_SHOW) While True     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit         ;no event when (double-clicking)         ;how to display hz scrollbar?         ;how to enable multiselection?         Case $ListView1             MsgBox($MB_SYSTEMMODAL, "listview", "clicked=" & GUICtrlGetState($ListView1))         Case $Button1             MsgBox($MB_OK,"Button","Dload")     EndSwitch WEnd Thank you.
  9. I don't know, which is why I'm asking for opinions before looking further 😛 -- Edit: I had an epiphany. The reason you mentioned a Tab control is because EccoPro supports displaying more than one notepad… as shown in the screenshot. For this project, I simply need to display a single tree… which should work like EccoPro. Since the other options seem to be free-flow text, I'll take a deeper look at AutoIt's TreeView control, see if it can be tweaked to look and work differently.
  10. Thanks. Since each line should actually be an independant item (node) instead of the whole thing just being free-flow text, would it be easier to tweak a TreeView control than starting with either SciTE Sciter, or Autoit's RichEdit? Once the user has opened/pasted data, it should be easy to add/edit/remove/move items in the tree using the keyboard (ENTER, F2, SHIFT/ALT+arrows). For those who've never heard of EccoPro (deadware since 1997), just download the zip and run its ecco32.exe.
  11. Hello, Out of curiosity, can the TreeView control be modified to work like a one-pane outliner à la EccoPro? Thank you.
  12. Thanks. I assumed the variable was re-created with every click. Should I declare + define them outside the While/Wend loop? Local $aItems = Null, $sItems = Null While True … $sItems = Null For $iI = 1 To $aItems[0] $sItems &= $aItems[$iI] & @CRLF Next … WEnd
  13. Hello, I notice something odd in the following code where the editbox is filled by whatever items are selected in the listbox: The first time the button is clicked, the editbox is cleared and then filled as expected… but not from the second time on, where items are simply appended to the editbox. As shown, it makes no difference if I clear it with either GUICtrlSetData($Edit1, "") or _GUICtrlEdit_SetText($Edit1, ""), and the problem doesn't occur when setting lines directly with GUICtrlSetData() or _GUICtrlEdit_AppendText(). What am I doing wrong? Thank you. #include <array.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiConstants.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <GuiEdit.au3> #include <ButtonConstants.au3> #include <GUIListBox.au3> #include <ListBoxConstants.au3> #include <GuiButton.au3> Global $sTest = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent elementum dolor" #Region ### START Koda GUI section ### $Form1 = GUICreate("Form1", 615, 437, 270, 124) $Edit1 = GUICtrlCreateEdit("", 16, 16, 585, 137, BitOR($ES_MULTILINE, $ES_READONLY, $WS_VSCROLL, $ES_AUTOVSCROLL)) $List1 = GUICtrlCreateList("", 16, 160, 585, 214,BitOR($LBS_STANDARD, $LBS_EXTENDEDSEL)) $BUILD = GUICtrlCreateButton("Build", 224, 400, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;set editbox to default text GUICtrlSetData($Edit1, "Started") ;fill listbox For $i = 1 To 10   _GUICtrlListBox_InsertString ( $List1,StringFormat("%02u %s",$i,$sTest)) Next ;when user clicks on button, copy selected items from listbox into editbox While True     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit         Case $BUILD             ;BUG why isn't cleared after the first click?             ;GUICtrlSetData($Edit1, "")             ;NO DIFF _GUICtrlEdit_SetText($Edit1, "")             ; Get selected item(s)             Local $aItems = _GUICtrlListBox_GetSelItemsText($List1)             Local $sItems             For $iI = 1 To $aItems[0]                 $sItems &= @CRLF & $aItems[$iI]             Next             ;paste to editbox             GUICtrlSetData($Edit1, $sItems & @CRLF)             ;BAD _GUICtrlEdit_AppendText($Edit1, $sItems & @CRLF)             ;this works             ;GUICtrlSetData($Edit1, $sTest & @CRLF)             ;_GUICtrlEdit_AppendText($Edit1, $sTest & @CRLF)     EndSwitch WEnd
  14. After running Tools > ScITE Config, in the General 1 tab, I changed "Choose default" from Edit to Run, ran Koda without restarting SciTE: Fixed! Thank you.
  15. It used to… run the form in Koda, as a way to check that the GUI worked OK before copy and pasting the code into SciTE. It wasn't associated, but clicking on "Set" and restarting Koda doesn't solve the problem 😕
  16. Hello, Searching with "koda run form" returned no hits. It used to work, but now, for some reason, when I hit Tools > Run Form (or F10), Koda doesn't actually run the code like it used to; Instead, it switches to SciTE and copies the generated code into a new "test.au3" file/tab. Did I make a (wrong) change in AutoIt somewhere? Thank you.
  17. "Simply copy the lines from SciTEGlobal.properties into SciTEUser.properties and make the changes:" "Only copy the Keywords that you want to override" So I simply copy/pasted the user.shortcuts line above into SciTEUser.properties, and restarted AutoIt Scite. Thank you.
  18. Should I copy the whole contents of SciTEGlobal.properties (730 lines) and merge (replace?) what's in SciTEUser.properties? Or should I simply edit SciTEUser.properties and add the user.shortcuts line above?
  19. How should I edit C:\Users\blah\AppData\Local\AutoIt v3\SciTE\SciTEUser.properties so that +/- on the keypad work as usual, and disable the customizing in SciTEGlobal.properties?
  20. Over ten years later… I'd rather that the +/- keys on the keypad work as usual. How should I edit the configuration files (SciTEGlobal.properties and SciTEUser.properties, I guess)? The helpfile recommends against editing the SciTEGlobal.properties file: KeypadPlus|IDM_EXPAND|\ KeypadMinus|IDM_BLOCK_COMMENT|\
  21. How can I tell the control can hold no more data, and it's useless to keep writing to it — so I should find a way to remove the oldest data to make room for more ?
  22. How can I tell it's full?
  23. Thanks for the info. I did end up using an Edit widget. By "How much data", I meant how many bytes can it hold before AutoIt deletes old data to make space for new stuff?
×
×
  • Create New...