Sign in to follow this  
Followers 0
Lakes

Control Listview In Camtrack Program

8 posts in this topic

I have done most of what I wanted to with this, the last step is to control the slection of animations.

Program URL http://www.digitalpeers.com/

This gets the number of items correctly, but does not select any of the items, because I can`t get Focus to the Selection window...

;Title: Select Animation
;Class: #32770

;More
;Control ID:    1018
;ClassNameNN:   Button7
;Text:      Show &Banner

;Control ID:    1083
;ClassNameNN:   SysTreeView321
;This is a text list

;Control ID:    1062
;ClassNameNN:   SysListView321
;This show pictures of the available animations.


$Title = "Select Animation"

$ItemsNo = ControlListView ($Title,"","SysListView321","GetItemCount")
DIM $Items[$ItemsNo+1]

For $i = 1 to $ItemsNo
;ControlFocus(($Title,"","SysListView321") <<-----------------------causes an error
ControlListView ($Title,"","SysListView321","Select", $i)

MsgBox(64,"Item Selected ", $i &" Selected")
next

Heres a screenshot of the window I am trying to control.

Posted Image

Thanks for your help as always.


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites



This works to get Focus..

$Title = "Select Animation"

$hwList = WinList()
For $i=1 To $hwList[0][0]
;   MsgBox(0, "Details", "Title=" & $hwList[$i][0] & @LF & "Handle=" & $hwList[$i][1])
        If $hwList[$i][0] = $Title then
    $SelAnim = $hwList[$i][1]
    EndIf
next

But still can`t access the SysListView directly, will have to try sending Tabs..

ControlFocus($SelAnim, "", "SysListView321") 
ControlListView ($SelAnim,"","SysListView321","Select", 1, 0);<<---- causes an error
MsgBox(64,"Item Selected ", $i &" Selected")

ControlClick($SelAnim, "", "Button1"); <<---- Works

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

The Saga continues... :(

While 1
;ControlFocus($SelAnim, "", "SysListView321")
ControlSend ($SelAnim,"","SysTreeView321","{DOWN}"); <---- Works
;Sleep(2000)
;ControlFocus($SelAnim, "", "SysListView321")
ControlSend ($SelAnim,"","SysListView321","{DOWN}")
Sleep(2000)
WEnd

I can now select items in the Select Animations Window with the above.

But, there is no way to access the button that activates the "Select Animations" in the main panel, (see screenshot).

Posted Image

No Control ID, no ClassName, Nothing! :think:

So, anyone know how to access the arrow button?

Btw, the mouse pointer changes to a pointing hand when its over the button, maybe its acting like a link in a webpage??

Thanks!


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

No Control ID, no ClassName, Nothing! crying.gif

you can try sending "Tabs" till it gets there... then send enter

... just an idea

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

you can try sending "Tabs" till it gets there... then send enter

... just an idea

8)

Sending keystrokes to the Main panel does`nt work, all the other "buttons" that are pictures/icons have a check box with them, so I can control them with the check boxes.

The arrow button that activates the "More Animations" has a hidden checkbox but its not used, you have

to click on the this "button" to get to the More Animations" window.

I could maybe get the position of the panel and move the mouse to that control, but thats a sloppy way of doing it. :think:

Now, if I could do a control click at X,Y position without having the mouse pointer move...


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

I have been hoping for a Control Click x,y for a long time also...

maybe some day

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I have been hoping for a Control Click x,y for a long time also...

maybe some day

8)

We've had it for a while: http://www.autoitscript.com/forum/index.ph...indpost&p=37526

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

$WinPos = WinGetPos ($Main)
$x = $WinPos[0]
$y = $WinPos[1]
$W = $WinPos[2]
$H = $WinPos[3]
;MsgBox (0, "WinPos", "Window is at X " &$x &"and Y " &$x &" Size is " &$W &" by " &$H)
$x = $x + 235
$y = $y + 190 

;MouseMove ($x,$y)
;MouseClick("left",$x,$y)

ClickInControl("left",$Main,"","",$x,$y);<<- Only works after button has been pressed once!

Only works if the button has already been clicked on... :think:

Thought I was on a winner there for a while..

Problem number two

Is it possible to get the selected item text from a SysListView321 control?

I`ve tried

$Sel = ControlGetText ($SelAnim, "", "SysTreeView321")

and

$Item = ControlListView ($SelAnim,"","SysListView321","GetText", $n1, $n)

neither of which works.

Thanks for your continued help! :(


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
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
Sign in to follow this  
Followers 0