dannydy Posted February 4, 2012 Share Posted February 4, 2012 Hi need some helps here.i was stunk in this coding, i wanted to use winwaitactive to wait for the excel file open window to active instead of using sleeplocal $oExcelopen = _ExcelBookNew()winwaitactive("Microsoft Excel - Book1")Send("{LALT}")Send("f")Send("o")winwaitclose(FileOpenDialog)open a new excel and go to file, open a new one, appreaciate if anyone can help. Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 4, 2012 Share Posted February 4, 2012 Is working for me! Are you sure that the title is correct for your version of Office? Also look at _ExcelBookOpen were you can pass the file that you want to open. #include <Excel.au3> local $oExcelopen = _ExcelBookNew() winwaitactive("Microsoft Excel - Book1") Send("{LALT}") Send("f") Send("o") Link to comment Share on other sites More sharing options...
dannydy Posted February 4, 2012 Author Share Posted February 4, 2012 yeah...now is working for me as well. Link to comment Share on other sites More sharing options...
dannydy Posted February 4, 2012 Author Share Posted February 4, 2012 my next question is... when i open the excel file's FileOpenDialogHow do i winwaitactive the until the Open Dialog window is active? Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 4, 2012 Share Posted February 4, 2012 Maybe if you explain 'n bit more what you want to do it'll help? If you just want to open the excel file with a fileopendialog the you don't have to first open an Excel session. You can call the file and the do an @error check to see if all is good. Orherwise use the _ExcelBookOpen option to open you file. Within that it'll check if the Excel object exist and if the file exist. Link to comment Share on other sites More sharing options...
dannydy Posted February 4, 2012 Author Share Posted February 4, 2012 Thanks for the advise.the reason being is because i need to open an excel from sharepoint. i had tried to use _excelBookOpen option but failed to do that...therefore i use this method to open the excel from sharepoint.local $oExcelopen = _ExcelBookNew()winwaitactive("Microsoft Excel - Book1")Send("{LALT}")Send("f")Send("o")sleep (1200)send("My Share Point url")i tried on other machine, the fileopendialog open(it takes some times to open) before it could send my Share Ponit Url. thus for the effectiveness i wanna to replace the sleep with winwaitactive to handle it. 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