Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alt-Tab in macro not always working
#1
Hi all,

I have an issue that I really don't understand. It seems pretty easy and basic, but I can't get it to work.
I am trying to automate the installation of a program. It is basically doing Alt-N for NEXT and a few spaces to select the default options.
There is a problem in the installer and on the last window where it says that it was installed successfully, the window doesn't have the focus. There is a Finish button that can be used with either Enter or Alt-F when the window has focus. I do not have access to that program's code and cannot change this focus issue.

So, what I did to trick it was to do an Alt-Tab on the Finish window, then another Alt-Tab to get back to it. This way, it has the focus and I can finish the install.

The Alt-Tab is working perfectly when I test the macro in Quick Macro.
When I generate a EXE, the Alt-tab fails.

I have tried to increase/decrease the Pauses before and between the Alt-Tab key but it doesn't help either. I tried to run the EXE as admin or not, without any changed to this behaviour.

I am not sure if this can help, but here is my code.
Code:
Copy      Help
OnScreenDisplay "Running installer" 2 0 0 "" 0 0 1|4|128 "spla" 0 0
run    "C:\install\Program.exe"
3
'An             ;; ALT+N
2
'An           ;; ALT+N
2
'V An           ;; ESPACE ALT+N    
2
'An             ;; ALT+N
2
;Do Alt-Tab to bypass focus problem on Finish window
'AT            ;; ALT+TAB
2
'AT            ;; ALT+TAB
'Y              ;; ENTREE


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)