amuskie Posted September 13, 2008 Share Posted September 13, 2008 I tried to use AutoIT to automate the uTorrent. When I got a torrent file, uTorrent will open it and check its content (i.e. only download for .iso, .rar, .pdf etc) filter out the other. My problem is I cant retrieve those filenames under the SysListView32. I could get the filesize under column 2 (item 1) but nothing under column 1 (item 0). Any help?Ive been using 3 function and they all failed to get the data out. Below is the extract from window control info, my script and the screen dump.>>>> Control <<<<Class: SysListView32Instance: 1ClassnameNN: SysListView321Advanced (Class): [CLASS:SysListView32; INSTANCE:1]ID: 1206Text: Position: 23, 218Size: 379, 96ControlClick Coords: 243, 51Style: 0x50211009ExStyle: 0x00000200Handle: 0x00380232$hWnd = WinGetHandle("[CLASS:#32770]", "Save As")ControlFocus($hWnd, "", 1206)ControlListView($hWnd, "", 1206, "Selectclear")ControlListView($hWnd, "", 1206, "Select",0)$hListView = ControlGetHandle($hWnd,"",1206)ControlListView($hWnd, "", 1206, "GetText",0,0)_GUICtrlListView_GetItemTextString($hListView, 0)GUICtrlListView_GetItemText($hListView,, 0, 0) Link to comment Share on other sites More sharing options...
MrCreatoR Posted September 13, 2008 Share Posted September 13, 2008 Try this: #include <GuiListView.au3> $hWnd = WinGetHandle("[CLASS:#32770]", "Save As") ControlFocus($hWnd, "", "SysListView321") ControlListView($hWnd, "", "SysListView321", "Selectclear") ControlListView($hWnd, "", "SysListView321", "Select", 0) $hListView = ControlGetHandle($hWnd, "", "SysListView321") $iIndex = ControlListView($hWnd, "", "SysListView321", "GetSelected") $sText1 = _GUICtrlListView_GetItemTextString($hListView, $iIndex) $sText2 = _GUICtrlListView_GetItemText($hListView, $iIndex, 0) MsgBox(0, "", $sText1 & @LF & $sText2) If it's not working, then post here the link to the torrent, i will test it. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
amuskie Posted September 14, 2008 Author Share Posted September 14, 2008 (edited) MrCreatoR, Thanks for the help. I just tried your code but still not working. Please try this torrent (with no foreign character filename inside): Btw, I'm using the uTorrent v1.8. Cheers! Edited September 15, 2008 by SmOke_N Removed link Link to comment Share on other sites More sharing options...
MrCreatoR Posted September 14, 2008 Share Posted September 14, 2008 Hm, that's a strange indeed. The first subitem can't be read - I am not sure, but maybe the current selection can be read from the label? $sText = ControlGetText("[CLASS:#32770]", "Save as", "Static3") ConsoleWrite($sText) And then you could get all the items by using a loop and select every item and get a current text from the label... Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
amuskie Posted September 14, 2008 Author Share Posted September 14, 2008 (edited) MrCreatoR,Thanks for the prompt response. I tried your new code but it only worked for that specific torrent I gave you earlier.Please check with these 2 captures, the filename don't even show up under "Static3".fyi, the torrent link is under:Cheers! Edited September 15, 2008 by SmOke_N Removed link Link to comment Share on other sites More sharing options...
Confuzzled Posted September 14, 2008 Share Posted September 14, 2008 Found the problem: My computer has good taste and refuses to play Celine Dion and Metallica under any circumstances! Link to comment Share on other sites More sharing options...
amuskie Posted September 15, 2008 Author Share Posted September 15, 2008 I've raised a ticket and reported as a bug. Link to comment Share on other sites More sharing options...
Valik Posted September 15, 2008 Share Posted September 15, 2008 (edited) The list-view data is managed by the program itself (it has LVS_OWNERDATA set). That means data is not stored or accessed in the standard way. There is a second, different way to access the data and the code you are using does not try the alternate way. The control is what's called a "Virtual List-View" and you can find information on MSDN for how to work with it.Edit: I strongly suggest you remove the torrent links. Common sense should have been the order of the day and you should have created a dummy torrent since it's only important to access the "Add new torrent" screen. What you've done here by linking to those two torrents is a bannable offense. Edited September 15, 2008 by Valik Link to comment Share on other sites More sharing options...
lianhc Posted September 23, 2014 Share Posted September 23, 2014 The list-view data is managed by the program itself (it has LVS_OWNERDATA set). That means data is not stored or accessed in the standard way. There is a second, different way to access the data and the code you are using does not try the alternate way. The control is what's called a "Virtual List-View" and you can find information on MSDN for how to work with it.Edit: I strongly suggest you remove the torrent links. Common sense should have been the order of the day and you should have created a dummy torrent since it's only important to access the "Add new torrent" screen. What you've done here by linking to those two torrents is a bannable offense. how to deal with listview those of "data is not stored or accessed in the standard way"? It seem very popular. Can you give more details, thx for your kinds. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 23, 2014 Moderators Share Posted September 23, 2014 lianhc, you seriously didn't notice this post was more than 6 years old? The language has changed just a touch since 2008, as have the forum rules. Please open a new thread, explain in detail what you're trying to do, and show what you have already tried on your own, rather than necroing old posts. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bert Posted September 23, 2014 Share Posted September 23, 2014 how to deal with listview those of "data is not stored or accessed in the standard way"? It seem very popular. Can you give more details, thx for your kinds. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now