Jump to content

Can't click on a button using it class


Recommended Posts

Hello,

I'm trying to click on a button using its class id but it don't work and i don't know why.

This is the code I use:

Config_Storage()

Func Config_Storage()
    WinActivate("10.1.1.30 - vSphere Client")
    WinWaitActive("10.1.1.30 - vSphere Client")
    sleep(1000)
    Send("^H")
    Sleep(1000)
    ControlClick("10.1.1.30 - vSphere Client","","WindowsForms10.BUTTON.app.0.ef627a8")
    Sleep(1000)
    ControlClick("10.1.1.30 - vSphere Client","","WindowsForms10.STATIC.app.0.ef627a16")
    Sleep(1000)
    ControlClick("10.1.1.30 - vSphere Client","","WindowsForms10.STATIC.app.0.ef627a27")
EndFunc

the 2 first controls clicks work ok but the last one does not.

I'm tryning to act on Vsphere Client 5.1.0 Interface. See join screenshots of the interface and the class id.

Many thx for your future help.

Proc.

post-76790-0-23564700-1369837017_thumb.p

post-76790-0-39198400-1369837017_thumb.p

Link to comment
Share on other sites

  • Moderators

Processor,
 
In your script I see: WindowsForms10.STATIC.app.0.ef627a27

In the Info tool I see: WindowsForms10.STATIC.app.0.ef627a24

 

Perhaps that is the problem? :whistle:

 

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Processor,

Does the class remain the same after the other 2 buttons have been pressed? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Processor,

Then does the Window title remain the same? :huh:

M23

P.S. What version of AutoIt are you using? That looks like a very old version of the Window Info tool.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Yes the windows title never change.

the full windows look like this:

vsphere_client2.jpg

The first click is for configuration, the second is for Storage (but you can't see in this screenshot of course) and the third is for add storage.(the one that does not work.)

I'm using release 3.3.8.1 of autoit, but the windows info of AutoHotKey as I already had problem with the window info of AutoIt previously.

But I tried too with window info and the result is the same. 

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...