salvatoretoob Posted February 26, 2016 Share Posted February 26, 2016 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: expandcollapse popup>>>> 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 Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 26, 2016 Share Posted February 26, 2016 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) Link to comment Share on other sites More sharing options...
water Posted February 26, 2016 Share Posted February 26, 2016 What does Open.bat do? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
salvatoretoob Posted February 27, 2016 Author Share Posted February 27, 2016 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. I Link to comment Share on other sites More sharing options...
water Posted February 27, 2016 Share Posted February 27, 2016 You could set the web site as a Trusted Site so the message does not get displayed. https://support.office.com/en-us/article/Enable-or-disable-security-alerts-about-links-to-and-files-from-suspicious-Web-sites-95407809-a88f-4fb1-8e14-68e1f0938534 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
salvatoretoob Posted February 27, 2016 Author Share Posted February 27, 2016 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 Link to comment Share on other sites More sharing options...
water Posted February 27, 2016 Share Posted February 27, 2016 Ah, I love such additional information My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now