Jump to content
Sign in to follow this  

Switching windows

Recommended Posts

Alright so, seeing as I humiliated myself with my last post, I"ll make a new one. I"m just looking for a little bit of help when it comes to switching windows.

Heres what I"m trying to set up.

A script that will capture the name of the active window, switch to another program, then switch back to the active window.

But if the active window is windows media player, then i want the mouse to double click (to make the movie full screen)

Heres what I got so far.

while 1
;This is at the top of the script
$window1 = WinGetTitle("")
;Then this is the code I have to switch to the last active window (window1), and if the window name is equal to 'Windows Media Player' to double click.
if $window1 = "Windows Media Player" then

;And then after the if statement I need the while loop to continue right after the if statement.

It seems to work alright, except it doesnt double click when its WMP, but the switching to the last active window works.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...