steve8tch Posted October 12, 2004 Share Posted October 12, 2004 I am following this with interest. Can I ask a question. If you fire up Win2k or XP ;Network and Dialup Connections;Advanced;Advanced settings - you get A dialogue with 2 separate areas. AutoIt Window spy shows the top one as a ListView and the bottom section as a TreeView - is the TreeView just a subsection of a list view, are they related at all - or will the devs need to write different code to read a TreeView. A bit of a boring question I'm afraid - but this stuff will eventually be really useful Link to comment Share on other sites More sharing options...
trids Posted October 12, 2004 Author Share Posted October 12, 2004 I believe they are related somehow .. but they are distinctly separate controls; and Jon has selected the listview as a starting point before tackling the treeview HTH Link to comment Share on other sites More sharing options...
steve8tch Posted October 12, 2004 Share Posted October 12, 2004 Thanks Link to comment Share on other sites More sharing options...
bigred Posted November 8, 2004 Share Posted November 8, 2004 Does the version of AutoItX from here support the ControlListView function?http://www.hiddensoft.com/autoit3/files/unstable/autoitx/I tried it but couldn't get the commands to work. Also the .chm file in that directory says it v3.0.103 but does not list the ControlListView info. Link to comment Share on other sites More sharing options...
trids Posted November 8, 2004 Author Share Posted November 8, 2004 I know - the versioning is confusing .. there appear to be multiple version 3.0.103's distinguishable only by date. One of mine is 2004-10-12 14:14 .. and works with ControlCommand(). HTH Link to comment Share on other sites More sharing options...
Administrators Jon Posted November 8, 2004 Administrators Share Posted November 8, 2004 Does the version of AutoItX from here support the ControlListView function?http://www.hiddensoft.com/autoit3/files/unstable/autoitx/I tried it but couldn't get the commands to work. Also the .chm file in that directory says it v3.0.103 but does not list the ControlListView info.AutoItX is not up to date with AutoIt - too much effort to keep up on both so I will update AutoItX after AutoIt gets released. Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
bigred Posted November 8, 2004 Share Posted November 8, 2004 Ok, sounds good. Do you have any idea when AutoIt will be released? Also when you say relesed, do you just mean publishing v3.0.103? Link to comment Share on other sites More sharing options...
Administrators Jon Posted November 8, 2004 Administrators Share Posted November 8, 2004 Ok, sounds good.Do you have any idea when AutoIt will be released? Also when you say relesed, do you just mean publishing v3.0.103?Yeah, after 3.0.103. Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
bigred Posted November 8, 2004 Share Posted November 8, 2004 I'm not looking for a solid date, but do you have a general idea when that might be? Link to comment Share on other sites More sharing options...
Administrators Jon Posted November 8, 2004 Administrators Share Posted November 8, 2004 I'm not looking for a solid date, but do you have a general idea when that might be?About 2 months ago is when I thought it would be. Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
bigred Posted November 9, 2004 Share Posted November 9, 2004 Well if there is anything I can do to help, just let me know. Link to comment Share on other sites More sharing options...
steve8tch Posted November 22, 2004 Share Posted November 22, 2004 Is the ControlListView command limited to certain types of ListView. I have scripts with ControlListView looking at "SysListView321" and "FolderView". I have "SysListView321" working on an NT4 script - but I can't get "ListBox1" working on NT4. Should this work ? ;Run this on an NT4 PC ;Eventually - what I want to do is set the 'Allow Interact with desktop' flag for a couple of services ;The vbs stuff I use on Win2k doesn't work here Run("rundll32.exe shell32.dll,Control_RunDLL srvmgr.cpl Services") While 1 If WinExists("Services") Then ExitLoop Sleep(500) Wend Sleep(1000) WinActivate("Services") $x = ControlListView ("Services", "", "ListBox1", "GetItemCount") MsgBox(0, "debug", $x) $x always = 0 - it can't read the ListBox1 Should this work ? (or is there a better way of doing this - as I said - the vbs stuff I use on more up to date machines does not work here !!) Thanks. Link to comment Share on other sites More sharing options...
this-is-me Posted November 22, 2004 Share Posted November 22, 2004 Well, If you look carefully, you can see that a ListBox is not a ListView... Can anyone else see the differences in spelling here? Anyway, what is it specifically you want to do with the ListBox? Who else would I be? Link to comment Share on other sites More sharing options...
steve8tch Posted November 22, 2004 Share Posted November 22, 2004 I was looking to Start the services dialog box in NT4 - this works OK. The list of services is displayed as a ClassNN:ListBox1 I then wanted read in this list - select 5 of the services and do some work on them. Yes you are right - it does show up as a ListBox rahter than a xxxList - as it was a standard windows dialog - I thought it might read it - Link to comment Share on other sites More sharing options...
this-is-me Posted November 22, 2004 Share Posted November 22, 2004 (edited) The way I have done it in the past (before dllcall) was to send the down arrow key to the list, read the current item with ControlCommand and GetCurrentSelection, and loop that until I hit what I needed or hit the same thing more than once, indicating that I was at the end of the list. (Don't you just love run-on sentences?) EDIT: It seems there could be a better way, including DllCall + SendMessage + LB_GETCOUNT Edited November 22, 2004 by this-is-me Who else would I be? Link to comment Share on other sites More sharing options...
SlimShady Posted November 22, 2004 Share Posted November 22, 2004 DllCall + SendMessage + LB_GETCOUNT is the same as $LB_GETCOUNT = 0x0000018B GUISendMsg($control, $LB_GETCOUNT, 0, 0) Link to comment Share on other sites More sharing options...
steve8tch Posted November 22, 2004 Share Posted November 22, 2004 "... was to send the down arrow key to the list, read the current item with ControlCommand and GetCurrentSelection, and loop that until I hit what ...."I'll give this a go -Thanks alotIt would be nice to be able to pull up the dialog for a particular service directly - but I can't find anything about a dll call that will do it for me. AAAHHH!Thanks again Link to comment Share on other sites More sharing options...
this-is-me Posted November 22, 2004 Share Posted November 22, 2004 (edited) Been looking around, and this is what I came up with: $LB_GETCOUNT = 0x18B $LB_GETTEXT = 0x189 $hwnd = ControlGetHandle("Advanced TCP/IP Settings", "", "ListBox1") $ret = DllCall("user32.dll", "int", "SendMessage", "hWnd", $hwnd, "int", $LB_GETCOUNT, "int", 0, "int", 0) $items = $ret[0] for $i = 0 to $items - 1 $ret = DllCall("user32.dll", "int", "SendMessage", "hWnd", $hwnd, "int", $LB_GETTEXT, "int", $i, "str", "") msgbox(0,"",$ret[4]) Next $ret[0] will give the amount of items in the listview. I am still working on trying to get the text of the items, so hang on. EDIT: Code above changed... Still working... EDIT AGAIN: Code above is now done. It should give you the name of each item in the lsitbox, providing you change the values to accomodate your situation. Edited November 22, 2004 by this-is-me Who else would I be? Link to comment Share on other sites More sharing options...
steve8tch Posted November 22, 2004 Share Posted November 22, 2004 "... was to send the down arrow key to the list, read the current item with ControlCommand and GetCurrentSelection, and loop that until I hit what ...."This didn't work.. I will modify your latest suggestions in the morning when I get access to the NT4 PC.Thanks again for yor efforts - much appreciated 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