Sign in to follow this  
Followers 0
mtawrldpc

Basic script help

7 posts in this topic

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!!

Share this post


Link to post
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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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?   :

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Try changing line 5 WinActivate("chrome") 

to WinActivate("Chrome") 

Good luck

Share this post


Link to post
Share on other sites

Okay, I think windows 8 & google chrome changed the way they do the window "titles".  I had to change the parameter to the name of the specific webpage as it was listed in the tab.  

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0