Jump to content

SpaceCadet

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by SpaceCadet

  1. I don't know if anyone is still working on/with this UDF, but I find it a work of art and use it constantly. Thank you. I do seem to get unusual results from the _ExcelUsedRangeGet function. I've read that using the SpecialCells method is unreliable, and have had better results doing something like this (returning the array in the same format.) Anyone? Func _ExcelSheetUsedRangeGet2($oExcel, $vSheet) Local $aSendBack[4], $sTemp, $aSheetList, $fFound = 0 If NOT IsObj($oExcel) Then Return SetError(1, 0, 0) If IsNumber($vSheet) Then If $oExcel.ActiveWorkbook.Sheets.Count < $vSheet Then Return SetError(2, 0, 0) Else $aSheetList = _ExcelSheetList($oExcel) For $xx = 1 To $aSheetList[0] If $aSheetList[$xx] = $vSheet Then $fFound = 1 Next If NOT $fFound Then Return SetError(3, 0, 0) EndIf $oExcel.ActiveWorkbook.Sheets($vSheet).Select $TempR = $oExcel.Cells.Find('*', $oExcel.Cells(1, 1), Default, Default, $xlByRows, $xlPrevious).Row $TempC = $oExcel.Cells.Find('*', $oExcel.Cells(1, 1), Default, Default, $xlByColumns, $xlPrevious).Column $aSendBack[0] = $oExcel.Cells($TempR, $TempC).Address $aSendBack[1] = "R" & $TempR & "C" & $TempC $aSendBack[0] = StringReplace($aSendBack[0], "$", "") $aSendBack[2] = $TempC $aSendBack[3] = $TempR If $aSendBack[0] = "A1" And $oExcel.Activesheet.Range($aSendBack[0]).Value = "" Then $aSendBack[0] = 0 Return $aSendBack EndFunc ;==>_ExcelSheetUsedRangeGet
  2. Alodar, you is genius. Thank you for this!
  3. That's beautiful, man. Thank you both.
  4. After a bit of experimentation, I found Koda. This is what I came up with. It uses the Edit control instead of a List control. As long as you don't select the text in the edit control box while the script is running (which will cause it to be overwritten), it seems to work. Don't know how to get around that. (Anyone brighter than me with that answer?) The style I was missing before was $ES_AUTOVSCROLL. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Downloads\AutoIT\koda\Forms\Form1.kxf $Form1 = GUICreate("Status", 245, 265, 475, 282) $Edit1 = GUICtrlCreateEdit("", 16, 16, 209, 217, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### For $i = 1 to 25 GuiCtrlSetData($Edit1, "Checking status " & $i & @CRLF, 2) sleep(500) Next
  5. This is just so weird. I created an account on this forum just to ask this same question. I'm trying to do some type of scrolling text progress information and/or troubleshooting data with a GUI and am having issues as well. I ran into the scroll issue. The other issue I saw was that the list type was selectable. It caused an issue whereby if you selected the text in the list while autoit was still running, the next time it was written to it overwrote the selected text. Not what I was after. I started playing around with a ListView GUI control type, and had different problems. It still didn't scroll. It also added a problem that the items in the list cannot be duplicated. Not what i wanted either to, say, mark the beginning or end of a loop in the window. It might have an answer to the scrolling issue with the possibility of using _GUICtrlListBox_ClickItem to just select the last entered item (instead of scrolling), but I'm fairly new to autoit and the handle aspect seems to be kicking me around. I'm very interested in what develops.
×
×
  • Create New...