Jump to content

ControlTreeView Help


Colin
 Share

Recommended Posts

So I've done some searching through the forums and it seems like the ControlTreeView functionality is new or somewhat recent. Problem is, any search I enter always comes up with posts from before it was implemented so it's just people asking for it to be added. I'm also getting a lot of referrences to DLL calls and what not since that's apparently how you had to do it before ControlTreeView was added.

Here's my issue. I'm working with Windows Server 2003 and I'm dealing with the "Internet Information Services (IIS) Manager" window. This is very similar to the Computer Management window. Same tree view on the left side, just different items. I'm attempting to select a specific item in this tree by doing this:

ControlTreeView("Internet Information Services (IIS) Manager", "", "[Class:SysTreeView32; Instance:1]", "Select", "Internet Information Services|ComputerName (local computer)|FTP Sites|ftp.sitename.com|" & $username)

(I removed any personal info such as computer name and site name from the item string, but you get the idea)

Obviously, $username is a string that contains the username I am trying to select.

The problem is, this doesn't work. The root item "Internet Information Services" remains selected. I assumed that this is because the sub items are all collapsed and therfore hidden. So, I attempted to expand each sub item. My first attempt, to open the first sub item was this:

ControlTreeView("Internet Information Services (IIS) Manager", "", "[Class:SysTreeView32; Instance:1]", "Expand", "Internet Information Services|ComputerName (local computer)")

This was a complete failure and resulted in the following error:

An outgoing call cannot be made since the application is dispatching an input-synchronous call.

I'm not sure if this is an AutoIT error or an IIS error.

Now, the weird thing is that if I manually expand some of the items, and then collapse them all back to the point that they are in when IIS opens, both the Expand command and the Select command works. (Actually, this is the reason why I tried the Expand in the first place because I figured automating what I am doing manually will help to Select the item I want.)

(PS/Btw: I'm now getting that "outgoing call error" when I try the Select command after I expand the items manually and collapse them again. It actually selects the correct item I want, but it also displays the error).

Another weird thing is that I added an @error check:

If @error = 1 Then
    MsgBox(1, "", "Error")
Else
    MsgBox(1, "", "No Error")
EndIf

This results in "No Error" when the command does not work, but results in "Error" when it does work...

What am I doing wrong? I searched that outgoing call error and I don't think any of it had to do with AutoIT. It was some kind of memory issue when two programs tried to communicate with eachother (which I assume is what ControlTreeView is doing). How do I solve that? Do I have to somehow set the program to accept communication (I'm probably over my head on that because I have no idea what I'm talking about)?

Please help! And thanks in advance

Link to comment
Share on other sites

No one has any help on this? Has anyone ever gotten that error under any circumstance? I'd like to find out more about why I'm getting that error, but I just don't have enough info. Is there anything I'm leaving out that would help anyone answer my question? I would really like to use this ControlTreeView function, but it just seems like it's broken or I'm doing something wrong.

Link to comment
Share on other sites

  • 2 months later...

I wanted to see if anything came of this. I downloaded the most recent version and nothing seems to have changed (at least with this issue). Should I expect a fix or do I just need to look for another way around my issue. If AutoIT can't automate what I need it to automate, I'm thinking of transferring this project to something like C# and cut out the automation factor altogether. It seems the more and more you rely on the automation portions of the script, the less reliable it becomes. I really enjoy using AutoIT, but it seems this project (or anything that needs to use highly specific controls) is pushing it's limits. Unless there is a fix to this ControlTreeView issue, I need to look for another way. Any thoughts?

Link to comment
Share on other sites

  • 3 months later...

I wanted to see if anything came of this. I downloaded the most recent version and nothing seems to have changed (at least with this issue). Should I expect a fix or do I just need to look for another way around my issue. If AutoIT can't automate what I need it to automate, I'm thinking of transferring this project to something like C# and cut out the automation factor altogether. It seems the more and more you rely on the automation portions of the script, the less reliable it becomes. I really enjoy using AutoIT, but it seems this project (or anything that needs to use highly specific controls) is pushing it's limits. Unless there is a fix to this ControlTreeView issue, I need to look for another way. Any thoughts?

hey there, yeah im actaully having the same problem and its really annoying as i have spent all day over it!! hopefully someone out there comes out with a fix because i dont really have any other option :mellow:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...