Jump to content

Basic script help


 Share

Recommended Posts

Hi everyone,

I am an Autoit noob, but I had a script that was working well, and now it no longer seems to work. (I am running windows 8, so I am suspicious that an update changed the way the window titles work?   I really am stumped as to why this doesn't work anymore.)

Here is the code:

Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
While 1 ;loop indefinitely
    WinActivate("power") ;give focus to powerpoint
    Sleep(30000) ;sleep 30 seconds
    WinActivate("chrome") ;give focus to chrome
    Sleep(30000) ;sleep 30 seconds
WEnd
 
The code successfully brings powerpoint to the front, but then doesn't activate google chrome.  I also tried replacing chrome with other possible window titiles (e.g. "word" for microsoft word), and I can't seem to get Autoit to do anything beyond the frist WinActivate commnad.  I also tried creating a basic Alt Tab sript and failed at that.  
 
The purpose is to switch back and forth between a full screen weather map on Google chrome and a powerpoint that displays information/advertising for my small business. 
 
Any thoughts?
 
Thanks in advance!!
Link to comment
Share on other sites

  • Developers

Could it be that your powerpoint is in presentationmode and has the ontop window attribute set which causes the window to be always ontop?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Could it be that your powerpoint is in presentationmode and has the ontop window attribute set which causes the window to be always ontop?

Jos

 

No that is not it.  It used to work with the slides in full screen presentation mode.  And I have tried to play with it to get it to work in the slide editing portion of powerpoint, and that will not work either.  I have also tried this on multiple computers, because the computer I run this on is mounted up on the wall by a 1080p TV screen to display, and I can't get the script to work, or a basic alt tab script on any of my machines.  They are all running windows 8.  But, I don't see any recent posts about windows 8 issues, so I am assuming that has not been a widespread issue?   :

Link to comment
Share on other sites

They are all running under the same credentials?

I am not exactly sure what you mean, but they are all different windows 8 licenses and I have different accounts set up on them.

I get this message in the bottom status window in the editor:

>"C:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:UsersMattDesktopalt tab script.au3"

Edited by mtawrldpc
Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...