Jump to content

Controlclick problem


JimC
 Share

Recommended Posts

I am trying to do a controlclick on a popup to uninstall the novell client:

I am using the following code:

_rundos("%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient")

If not Winactive("Uninstall Novell Client for Windows") then Winactivate("Uninstall Novell Client for Windows")

ControlClick("Uninstall Novell Client for Windows", "&Yes", "[CLASS:Button; TEXT:&Yes; Instance:1]")

Here is the capture from window info tool:

>>>> Window <<<<

Title: Uninstall Novell Client for Windows

Class: #32770

Position: 24, 157

Size: 389, 119

Style: 0x94C801C5

ExStyle: 0x00010101

Handle: 0x0024011C

>>>> Control <<<<

Class: Button

Instance: 1

ClassnameNN: Button1

Advanced (Class): [CLASS:Button; INSTANCE:1]

ID: 6

Text: &Yes

Position: 113, 60

Size: 75, 23

ControlClick Coords: 53, 14

Style: 0x50030001

ExStyle: 0x00000004

Handle: 0x002000DE

>>>> Mouse <<<<

Position: 193, 253

Cursor ID: 2

Color: 0xD4D0C8

>>>> StatusBar <<<<

>>>> Visible Text <<<<

&Yes

&No

Are you sure you want to uninstall the Novell Client for Windows?

>>>> Hidden Text <<<<

I am trying to click the yes button. Any help would be greatly appreciated.

The command to uninstall the novell client is: %SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient

Link to comment
Share on other sites

  • Developers

I would think you need to wait for the window to appear first or else the Controlclick() goes nowhere.:

_rundos("%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient")
WinWait("Uninstall Novell Client for Windows")
If not Winactive("Uninstall Novell Client for Windows") then Winactivate("Uninstall Novell Client for Windows")
ControlClick("Uninstall Novell Client for Windows", "&Yes", "[CLASS:Button; TEXT:&Yes; Instance:1]")
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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