Windows 8 acts different on the ALT+TAB

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Windows 8 acts different on the ALT+TAB

Post by Djek » Thu Jul 10, 2014 8:19 am

hi all,
if i have to grab some text from a website or a document, i startup a script with

Code: Select all

    PutClipBoard>
    press ALT
    press TAB
    Release ALT
    wait>0.2 
    press CTRL
    wait>0.1
    send>c
    wait>0.1
    Release CTRL
    wait>0.1
    GetClipBoard>sl,0
this switches the focus of Windows to the previous opened window, press ctrl-c and returns the selected text in the var sl.
Well, so far it worked on xp and win7, but somehow Microsoft decided that this had to alter.
Now in Windows 8 it does not work any more.
Strange, because a physical press on the keyboard with alt tab still does the trick.
But what has changed?

I allready tried (suggestions from Google)
-to disable the windows keys > no solution
-put the exe in program files (as to have Adminstrative rights) > no solution
-tried different timings > no solution
-run Window Switcher and manipulate it > no solution
-disabled the graphic layout from the alt-tab viewer > no solution

there not much to find on the internet about this problem. So is there anyone out there who knows something to get this working again?
Thanks in advance,
Djek

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Windows 8 acts different on the ALT+TAB

Post by Marcus Tettmar » Thu Jul 10, 2014 8:44 am

From what I can gather Microsoft have blocked simulated ALT-TABs in Windows 8 party because they want to stop apps from automatically switching away from Metro apps. Seems a bit odd to me.

However, ALT-ESC still works - this does pretty much the same thing but bypasses the thumbnail preview. No idea why this should be enabled but ALT-TAB isn't.

Anyway this little test script successfully switches focus back to Notepad after starting Calc:

Code: Select all

Let>STEP_DELAY=20
Run>Notepad.exe
Wait>1
Run>Calc.exe
Wait>2
Press ALT
Press Esc
Release ALT
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Re: Windows 8 acts different on the ALT+TAB

Post by Djek » Thu Jul 10, 2014 10:22 am

Thanks Marcus,

your alternative method works for me, :lol:

let's not spread the word around, because there is a chance that Microsoft forgot to block the ALT-ESC
But i hope not :?

Kind regards,
Djek

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts