Jump to content

Utorrent interface won't refresh when minimized.


walle

Recommended Posts

Posted

I'm programming a small script that monitoring a specified active torrent.

I have recently notice that the utorrent interface doesn't refresh when

Utorrent is minimized. It makes it very hard to read data. Is there any work around?

Here is a small part of my script. As you can see, it works

perfectly except when utorrent is minimized.

The script. Works with all versions of Utorrent.

http://uploadfile.org/download.php?id=l1QxJ9gTPCQWb6jOZdVM

If you want to complie it yourself, Autoitscript

#include <GUIConstants.au3>
#include <GuiListView.au3>
#include <String.au3>
#include <Array.au3>
#RequireAdmin


GUICreate("My GUI") ; will create a dialog box that when displayed is centered

$LABEL4 = GUICtrlCreateLabel("Label",0,0,500)
$LABEL1 = GUICtrlCreateLabel("Label",0,20,500)
$LABEL5 = GUICtrlCreateLabel("Label",0,40,500)
$LABEL11 = GUICtrlCreateLabel("Label",0,60,500)
$Input = GUICtrlCreateInput("Torrent name",0,100,500)
$button = GUICtrlCreateButton("Start Script",0,120)
GUISetState (@SW_SHOW) ; will display an empty dialog box



While 1
$msg = GUIGetMsg()
If $MSG = $button Then
$Readinput = GUICtrlRead($Input)
Collectdata()
EndIf
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Func Collectdata()
Do
$title = "[REGEXPTITLE:Torrent.\d+.*$]"
$listcontrol = "[CLASSNN:SysListView321]"

$hWnd = ControlGetHandle( $title, "", $listcontrol )
$header_hWnd = _GUICtrlListView_GetHeader($hWnd)

$FindTN = _GUICtrlListView_FindInText($HWND, $Readinput)
$ccount = ControlListView("[REGEXPTITLE:Torrent.\d+.*$]", "", "SysListView321", "GetSubItemCount")
$icount = ControlListView("[REGEXPTITLE:Torrent.\d+.*$]", "", "SysListView321", "GetItemCount")



Dim $listarray[$ccount][$icount+1]
For $c = 0 To $ccount-1
$listarray[$c][0] = _GUICtrlListView_GetItemText($header_hWnd, $c)
$Countmore = $icount - $FindTN
For $i = $FindTN To $icount-$Countmore
$itemtext = _GUICtrlListView_GetItemText($hWnd, $i, $c)
$listarray[$c][$i+1] = $itemtext
Next
Next
For $c = 0 To $ccount-1
ConsoleWrite($listarray[$c][0])
For $i = 0 To $icount-1
ConsoleWrite($listarray[$c][$i+1])
Next
ConsoleWrite("|")
Next




For $c = 0 To $ccount-1
$tmp = ''
For $i = 0 To $icount-1
$tmp &= $listarray[$c][$i+1]
Next
Switch $c
Case 0
GUICtrlSetData($LABEL4,"Torrent name:" & ' ' & $listarray[$c][0] & $tmp)
Case 2
GUICtrlSetData($LABEL1,"Size:" & ' ' & $listarray[$c][0] & $tmp)
Case 4
GUICtrlSetData($LABEL5,"Statusr:" & ' ' & $listarray[$c][0] & $tmp)
Case 7
GUICtrlSetData($LABEL11,"Downloadspeed:" & ' ' & $listarray[$c][0] & $tmp)
EndSwitch
Next
sleep(2000)
Until $LABEL11 = 100
EndFunc

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...