Jump to content
Advert

Geert

Active Members
  • Posts

    74
  • Joined

  • Last visited

About Geert

  • Birthday 05/01/1973

Profile Information

  • Location
    Assen, The Netherlands

Geert's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. Thanks Gary, I already used your Listview version, but could not get it working for List. This example helps me out!
  2. Good example. How do we catch a doubleclick on a list?
  3. Hello all, For my script I do need to show a count of subitems in a treeview object. I could change the text of a treeviewitem and append my count as a part of the text. The treeview in Outlook uses also counters, but the counters ar not part of the treeviewitemtext itself. For example look at this picture. The treeviewitem 'Junk E-mail' in the smaple picture has a counter [5] that is not selected when selecting te treeviewitem. Is it possible to make these kind of TreeItems in AutoIt GUI? Thanks, Geert
  4. Is this the way to do this? Quick and dirty try: #include <GUIConstants.au3> Dim $MoveMode = False Dim $MoveArea = False $MyGUI = GUICreate("My GUI") ; TreeView part $treeviewleft = 6 $treeviewwidth = 100 $treeview = GUICtrlCreateTreeView($treeviewleft, 6, $treeviewwidth, 150) $generalitem = GUICtrlCreateTreeViewItem("General", $treeview) $displayitem = GUICtrlCreateTreeViewItem("Display", $treeview) $aboutitem = GUICtrlCreateTreeViewItem("About", $generalitem) $resitem = GUICtrlCreateTreeViewItem("Resolution", $displayitem) ; ListView part $listview = GUICtrlCreateListView("col1|col2|col3", $treeviewleft + $treeviewwidth + 3, 6, 350 - $treeviewwidth, 149) GUICtrlCreateListViewItem("line1|data1|more1", $listview) GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() $cursorInfo = GUIGetCursorInfo($MyGUI) If $cursorInfo[4] = $treeview And $cursorInfo[0] > $treeviewleft + $treeviewwidth - 3 And $MoveMode = False Then $MoveArea = True If $MoveMode = False Then ToolTip("$MoveArea=True") GUISetCursor(13, 1); 13 = SIZEWE Else $MoveArea = False GUISetCursor(2, 1); 2 = ARROW If $MoveMode = False Then ToolTip("$MoveArea=False") EndIf If $MoveArea = True And $cursorInfo[2] = 1 Then $MoveMode = True EndIf If $MoveMode = True Then GUISetCursor(13, 1); 13 = SIZEWE ToolTip("$cursorInfo[0]=" & $cursorInfo[0]) $treeviewwidth = $cursorInfo[0] - $treeviewleft GUICtrlSetPos($treeview, $treeviewleft, 6, $treeviewwidth + 2, 150); resize treeview GUICtrlSetPos($listview, $treeviewleft + $treeviewwidth + 3, 6, 350 - $treeviewwidth, 149); resize listview EndIf If $MoveMode = True And $cursorInfo[2] = 0 Then $MoveMode = False ToolTip("") GUISetCursor(2, 1); 2 = ARROW EndIf Until $msg = $GUI_EVENT_CLOSE
  5. Thanks Gary. But how do I resize the TreeView object? #include <GUIConstants.au3> GUICreate("My GUI") ; TreeView part $treeview = GUICtrlCreateTreeView(6, 6, 100, 150) GUICtrlSetResizing (-1,$GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) $generalitem = GUICtrlCreateTreeViewitem("General", $treeview) $displayitem = GUICtrlCreateTreeViewitem("Display", $treeview) $aboutitem = GUICtrlCreateTreeViewitem("About", $generalitem) $resitem = GUICtrlCreateTreeViewitem("Resolution", $displayitem) ; ListView part $listview = GUICtrlCreateListView("col1|col2|col3",115, 6, 210, 149) GUICtrlSetResizing (-1,$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) GUICtrlCreateListViewItem("line1|data1|more1", $listview) GUISetState(@SW_SHOW) GUICtrlSetPos($listview,150, 6, 210, 149) do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE
  6. My gui has a treeview and a listview in it, like windows explorer style: Simple example: #include <GUIConstants.au3> GUICreate("My GUI") ; TreeView part $treeview = GUICtrlCreateTreeView(6, 6, 100, 150) $generalitem = GUICtrlCreateTreeViewitem("General", $treeview) $displayitem = GUICtrlCreateTreeViewitem("Display", $treeview) $aboutitem = GUICtrlCreateTreeViewitem("About", $generalitem) $resitem = GUICtrlCreateTreeViewitem("Resolution", $displayitem) ; ListView part $listview = GUICtrlCreateListView("col1|col2|col3",108, 6, 210, 149) GUICtrlCreateListViewItem("line1|data1|more1", $listview) GUISetState(@SW_SHOW) do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE I would like to resize the treeview control and the listview should follow: treesize control bigger, listview gets smaller. Is this possible without resizing the whole gui?
  7. Word.au3 has useful functions, but it does not have a GUIcontrol which shows only the page object of Word.
  8. Mine too: got dirty glasses I think. Thanks again.
  9. Thanks for the tip. Where can I get Word.au3 and a sample? Can you point me to a post or maybe an old autoit beta? Geert
  10. I read different posts about rtf, but what I need is a rtf-control which can also display bitmaps. I found a solution written in C: http://www.codeproject.com/richedit/COleRichEditCtrl.asp The mentioned files can be downloaded here: http://www.codeexchange.net/program-73_50.htm I do not have any knowledge of C... Maybe one of our devs can help to make this rtf-control available for autoit use. Who can help? Thanks, Geert
  11. "C:\Program Files\AutoIt3\AutoIt3.exe" /AutoIt3ExecuteLine "IniWrite('C:\boot2.ini','boot loader','timeout','6')"
  12. To idle the cpu: add a sleep statement in the loop (as in post #3) To start a shortcut: $file = "MyShortcut.lnk" Run("rundll32 url.dll, FileProtocolHandler " & $file)
  13. You could try Larry's UDF's: _FindPixelRect
  14. Remake of TO_DATE Function for use in AutoIt. Useful for contries with different date format. (like Holland) Mask is supporting: YYYY 4-digit year MM Month (01-12; JAN = 01). DD Day of month (1-31). HH Hour of day (1-23). MI Minute (0-59). SS Second (0-59). Feel free to optimize the code and extend the supported masks. Geert #include <Date.au3> #include <Array.au3> $CalculatableDate = _StringToDate("28-2-2006 16:22", "DD-MM-YYYY HH:MI") If $CalculatableDate Then MsgBox(0, "$CalculatableDate is:", $CalculatableDate) EndIf ; Calculated the days MsgBox(4096, "", "Number of Days since 28-2-2006 16:22 : " & _DateDiff( 'd', _StringToDate("28-2-2006 16:22", "DD-MM-YYYY HH:MI"), _NowCalc())) Func _StringToDate($sDate, $sDateFormatMask) Local $asDate, $asDateFormat, $asCalcDateFormat, $i $asDate = StringSplit(StringRegExpReplace($sDate, "[- :/.]", "|"), "|") $asDateFormat = StringSplit(StringRegExpReplace($sDateFormatMask, "[- :/.]", "|"), "|") $asCalcDateFormat = StringSplit("YYYY|MM|DD|HH|MI|SS", "|") For $i = 1 To $asCalcDateFormat[0] $asCalcDateFormat[$i] = _ArraySearch($asDateFormat, $asCalcDateFormat[$i], 1) If $asCalcDateFormat[$i] < 0 Then $asCalcDateFormat[$i] = "0" Else $asCalcDateFormat[$i] = $asDate[$asCalcDateFormat[$i]] EndIf If StringLen($asCalcDateFormat[$i]) < 2 Then $asCalcDateFormat[$i] = StringFormat("%02d", $asCalcDateFormat[$i]) Next $sDate = $asCalcDateFormat[1] & "/" & $asCalcDateFormat[2] & "/" & $asCalcDateFormat[3] & " " & $asCalcDateFormat[4] & ":" & $asCalcDateFormat[5] & ":" & $asCalcDateFormat[6] If _DateIsValid($sDate) Then Return $sDate Else Return (0) EndIf EndFunc ;==>_StringToDate
  15. $file = "MyShortcut.lnk" Run("rundll32 url.dll, FileProtocolHandler " & $file) Good luck!
×
×
  • Create New...