Runned program not visible

Get help with using AutoHotkey and its commands and hotkeys
aleksazr
Posts: 3
Joined: 13 Aug 2018, 05:12

Runned program not visible

13 Aug 2018, 05:43

Hello, thanks for a really helpful program. My first post here.

run exe with ctrl + shift
^+Media_Play_Pause::Run C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\windbg.exe

thats how I start the exe, but its window is hidden below the active app, and I have to click it in the taskbar.
edit: I see now that it is started minimized, not simply as some background window, but not always, sometimes it just doesn't have the focus.
Can I change something in the script to make it appear as expected?

Also, if the program is already running, it is not set as a foreground window, as I would expect.

If I remove the ctrl+shift (^+) then it works OK.... so, is that a bug or a feature?

BTW, It works the same with or without the standard header:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

I use version 1.1.26.01, tried downloading the current version, but chrome warned about viruses so I bailed.
aleksazr
Posts: 3
Joined: 13 Aug 2018, 05:12

Re: Runned program not visible

15 Aug 2018, 02:43

BUMP, once.
pro100andrik94
Posts: 26
Joined: 08 Aug 2018, 07:27

Re: Runned program not visible

16 Aug 2018, 06:22

Code: Select all

Run, C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\windbg.exe
WinWait, ahk_exe C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\windbg.exe , , 30
if ErrorLevel
{
    MsgBox, WinWait timed out.
    return
}
else
    WinRestore
    return
aleksazr
Posts: 3
Joined: 13 Aug 2018, 05:12

Re: Runned program not visible

17 Aug 2018, 04:20

Thanks for replying.

But why is winrestore needed only if the app is started with ctrl-shift (^+) ? Thats why I say it is a bug.
Using several media keys, I start 6 apps in total, and using that code for every app would be crowded, no?

Let me repeat:

If I remove the ctrl+shift (^+) then it works OK.

I see now that it is started minimized, not simply as some background window, but not always, sometimes it just doesn't have the focus.
Therefore, winrestore won't do anything, because it was already in restored state.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot] and 120 guests