AXPPES Posted April 13, 2012 Share Posted April 13, 2012 Hello to all, I need to have in one screen a progrma running and a internet page open and swicthing between both I am using tho option winactivated. But for the internet page a cannot put the page in front: This is what I did: While 1 WinActivate("[CLASS:iexplore]", ""); Activate Internet Explorer Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go full screen Sleep(10000); Internet Explorer for 30 seconds Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go windowed WinActivate("[CLASS:WMPlayerApp]", ""); Activate Windows Media Player Send("{ALTDOWN}{enter}{ALTUP}"); Make Media Player go full screen Sleep(5000);Show Media Player in full screen for 10 seconds Send("{ALTDOWN}{enter}{ALTUP}"); Make Media Player go windowed WEnd Can anyone help me? Thanks in advance Link to comment Share on other sites More sharing options...
JohnOne Posted April 13, 2012 Share Posted April 13, 2012 TryWinWaitActive("[CLASS:iexplore]", "") ;after your WinActivate AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 It doesn´t work...:-( Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 (edited) Most of the AutoIt functions return a value or set @error. WinActivate returns 0 when there was a problem. So I would use While 1 $iRC = WinActivate("[CLASS:iexplore]", ""); Activate Internet Explorer If $iRC = 0 Then MsgBox(16, "", "WinActivate for IE was not successful") Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go full screen Sleep(10000); Internet Explorer for 30 seconds Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go windowed $iRC = WinActivate("[CLASS:WMPlayerApp]", ""); Activate Windows Media Player If $iRC = 0 Then MsgBox(16, "", "WinActivate for WMP was not successful") Send("{ALTDOWN}{enter}{ALTUP}"); Make Media Player go full screen Sleep(5000);Show Media Player in full screen for 10 seconds Send("{ALTDOWN}{enter}{ALTUP}"); Make Media Player go windowed WEnd Edited April 16, 2012 by water 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...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 Ok...I got this message error: WinActivated for IE was not successfull I open WMplayer ok..but I cannot open IE page Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 I use IE9 and it works when I change your statement to$iRC = WinActivate("[Class:IEFrame]") 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...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 Works perfectly!!!!! Thanks.. One more question that you can help me... It´s my first time doing this....sorry On this script I need to put a Powerpoint presentatio running instead of windows media player.....How can I do this? Switch between IExplore and power point presentation? Thanks once more Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 You are talking about a fullscreen presentation or just a presentation opened in powerpoint? 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...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 A full screen presentation and a full screen webpage with statistics.... Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 The class for a powerpoint presentation seems to be "screenClass" with Office 2010. 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...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 no can do...... While 1 $iRC = WinActivate("[CLASS:IEFrame]", ""); Activate Internet Explorer If $iRC = 0 Then MsgBox(16, "", "WinActivate for IE was not successful") Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go full screen Sleep(10000); Internet Explorer for 10 seconds Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go windowed $iRC = WinWaitActive("[CLASS:screenClass]", "" ); Activate Windows Power Point If $iRC = 0 Then MsgBox(16, "", "WinActivate for PPT was not successful") Send("{ALTDOWN}{enter}{ALTUP}") Sleep(5000) Send("{ALTDOWN}{enter}{ALTUP}") WEnd It only open the Iexplorer.... Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 Just tested with Office 2010 and it works. Start the Autoit Window Info Tool, start the powerpoint presentation and move the crosshair over the powerpoint presentation. What do you get as Window class? 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...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 This is what I get: Class: screenClass Position: 0, 0 Size: 1280, 1024 Style: 0x94000000 ExStyle: 0x00000000 Handle: 0x000C0820 >>>> Control <<<< Class: paneClassDC Instance: 1 ClassnameNN: paneClassDC1 Name: Link to comment Share on other sites More sharing options...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 But my office is 2007 Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 This works fine for me: While 1 $iRC = WinActivate("[CLASS:IEFrame]", ""); Activate Internet Explorer If $iRC = 0 Then MsgBox(16, "", "WinActivate for IE was not successful") Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go full screen Sleep(5000); Internet Explorer for 10 seconds Send("{ALTDOWN}{enter}{ALTUP}"); Make Internet Explorer go windowed $iRC = WinActivate("[CLASS:screenClass]", ""); Activate Windows Power Point If $iRC = 0 Then MsgBox(16, "", "WinActivate for PPT was not successful") Sleep(2000) WEnd 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...
AXPPES Posted April 16, 2012 Author Share Posted April 16, 2012 Thanks a lot for the help......now it´s working well. Link to comment Share on other sites More sharing options...
water Posted April 16, 2012 Share Posted April 16, 2012 Glad to be of service 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