jjrr007

Can't get Alt-Tab to Work

11 posts in this topic

I have tried to use send the keys command- hold down alt and press tab.   For some reason, this doesn't work

Send("!{TAB}")

However, the following works:

Send("{TAB}") - send just a tab

Send("!f")- sends alt and f

It doesn't make sense to me why alt tab wouldn't work when the 2 codes above does work.  I would greatly appreciate any help with this.

Share this post


Link to post
Share on other sites



@jjrr007 I just tested Send("!{TAB}") on both a windows 7 and a windows 10 box, and it worked fine on both with AutoIt 3.3.14.2. How about a little more information as to what OS you're on, what AutoIt version, and just what you're trying to accomplish?


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

Thank you for your responses.  

JLogan3o13,

I'm working on automating a manual data entry from a website.  I have create a couple automation projects using this software that had automated mouse clicks and keyboard entries.   I am using Windows 8.1 with SciTE-Lite   Version 3.5.4

l3ill,

I also tried the following code that didn't work  Send("{ALTDOWN} {TAB] {ALTUP}")

 

Not sure what I should do?
   

Share this post


Link to post
Share on other sites

I mistyped the last post, I tried 

Send("{ALTDOWN} {TAB} {ALTUP}")

For some reason, it didn't work.  

 

 

 

O

Share this post


Link to post
Share on other sites

Are you trying to change programs; is the web browser the only open gui program?


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

Excel and command prompt are open as well.  

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

So you are trying to cycle to a different active program?

If you are, you can use autoit it to make them active; not just alt+tab combo.

Edited by Somerset

 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

Somerset,

 

I appreciate your time and expertise. Yes, I am trying to cycle to another program to make it active.  

How do the make the windows active using autoit?

Share this post


Link to post
Share on other sites

This works for notepad, but I need one for Excel, Google Chrome and a command prompt.  I'm not sure how to do those, and would greatly appreciate any help

WinActivate("[CLASS:Notepad]")

Share this post


Link to post
Share on other sites

Somerset,

I think you just led me to the solution.  This worked!!!!

WinActivate("[TITLE:GetData]")

I just change title to the window name. Thanks!!!!

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