salvatoretoob

Auto Clicking Button on PopUp

7 posts in this topic

Hi All,

I've really been trying to figure this out myself and researching but I'm having no luck what so ever...

Basically, when Microsoft Powerpoint opens, a dialog is shown asking to either update links or cancel - I want to update links.

This is the code I have so far:

; Check if Powerpoint is running
If ProcessExists("powerpnt.exe") Then 
    Sleep(5000)
Else
    Run("C:\\scripts\\open.bat", "", @SW_HIDE)
    WinWait("Microsoft PowerPoint Security Notice")
    WinActivate("Microsoft PowerPoint Security Notice")
    ControlClick("Microsoft PowerPoint Security Notice", "", "", "", "", 260, 216)  
    EndIf

This is the Summary from the Window Info Tool:

>>>> Window <<<<
Title:  Microsoft PowerPoint Security Notice
Class:  NUIDialog
Position:   761, 394
Size:   398, 263
Style:  0x94C80000
ExStyle:    0x00000501
Handle: 0x00000000000D11B2

>>>> Control <<<<
Class:  NetUIHWND
Instance:   1
ClassnameNN:    NetUIHWND1
Name:   
Advanced (Class):   [CLASS:NetUIHWND; INSTANCE:1]
ID: 
Text:   
Position:   0, 0
Size:   392, 234
ControlClick Coords:    260, 216
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x0000000000140B68

>>>> Mouse <<<<
Position:   1024, 636
Cursor ID:  0
Color:  0x330000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<


>>>> Hidden Text <<<<

I was trying to use the Control Click to click 260,216 as that is exactly in the middle of the 'Update Links' button.

Any ideas where I'm going wrong here?

Any and all help is really appreciated.

Thanks
Kyle

Share this post


Link to post
Share on other sites



Try this

ControlClick("Microsoft PowerPoint Security Notice", "", "[CLASS:NetUIHWND; INSTANCE:1]")

(As long as that is the info for the button you're trying to click)

Share this post


Link to post
Share on other sites

What does Open.bat do?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hi Inuno - I don't believe that is the Button info as when I put the Window Info tool over the buttons it only highlights the entire pop-up window and not the smaller buttons.

Open.bat simply starts a powerpoint presentation slide.

However guys I think I've solved this with a simpler method.

I just have open.bat start the presentaion then a combination of sleep and Send.

I used Send "U" to update the links - sleep a few seconds then send "{F5}" to put the presentation in fullscreen.

Finally I put the entire thing in a Function so it continously loops. The end user will now just update the excel file - run another batch script to kill powerpoint then this looped autoit script will automatically restart the presentation, update the links and display full screen (on a TV Screen).

Thanks for the help though guys.

Share this post


Link to post
Share on other sites

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

This isn't possible on PowePoint 2010 unfortunately water. I even tried researching Macros for quite a few hours to no avail. Hopefully the solution I have now will work properly. Thanks

Share this post


Link to post
Share on other sites

Ah, I love such additional information :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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