mattw112 Posted December 12, 2008 Posted December 12, 2008 (edited) I want to run the VSTOInstaller to install an addin for powerpoint. What I'm noticing using the A3Info tool is that the IDs for the controls change every time the tool is launched (I didn't know controls worked like this?). So I've tried many other ways to do this. What you see below works for clicking the controls. My problem is that I can't get this to work when I launch the VSTOInstall tool as SW_HIDE as shown below. (Just to note I've also done this using ShellExecute too, same results) It works fine if I leave this out, but I don't want any users to see it... The script below you'll see I've added and added additional focuses, activates, etc.. trying to do anything to make it work when it is hidden. Any ideas? Terry Opt("TrayIconDebug", 1) Opt("WinTitleMatchMode", 2) Opt("WinTextMatchMode", 1) Opt("WinDetectHiddenText",1) RunWait('eventcreate /t INFORMATION /SO TEST /L Application /id 140 /d "Starting"', "", @SW_HIDE) Run('C:\Program Files\Common Files\Microsoft Shared\VSTO\9.0\vstoinstaller.exe /I "C:\Program Files\BMGF\BMGF Office Add Ins\BMGFPowerPointAddIn.vsto"', "", @SW_HIDE) RunWait('eventcreate /t INFORMATION /SO TEST /L Application /id 140 /d "Launched VSTOInstaller"', "", @SW_HIDE) Sleep(5000) WinWait("Microsoft Office Customization Installer", "Publisher cannot be verified", 30) WinActivate("Microsoft Office Customization Installer", "Publisher cannot be verified") ControlFocus("Microsoft Office Customization Installer", "Publisher cannot be verified", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]") ControlClick("Microsoft Office Customization Installer", "Publisher cannot be verified", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]") RunWait('eventcreate /t INFORMATION /SO TEST /L Application /id 140 /d "Saw it"', "", @SW_HIDE) Sleep(2000) WinWait("Installer", "Close", 20) WinActivate("Microsoft Office Customization Installer", "") ControlClick("Microsoft Office Customization Installer", "", "[Text:Close]") Sleep(5000) RunWait('eventcreate /t INFORMATION /SO TEST /L Application /id 140 /d "Done"', "", @SW_HIDE) Exit(0) Edited December 12, 2008 by mattw112
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