Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is a Community Wiki based on a question that was deleted right before I was able to post a solution. The user's AutoHotkey script had a few mistakes in it, so I wrote one that fixes them. The problem they were facing was that a new Console2 process was started every time, instead of activating a process that was set to the background. My solution is below...

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Are you running Console2 as an administrator? If so, certain AutoHotkey commands performed on or in Console2's window may be ignored. You can get around this by running the AHK script as an administrator, too.

One important thing to realize: you had a hotkey mapped more than once, so AHK would run through each method in order, from top to bottom. I fixed your logic and changed a couple of things. This should work! :)

Note: This script can easily be adapted for other programs. Just change the IfWinExist, WinMove, and Run commands.

#c::
    DetectHiddenWindows, On

    IfWinExist, ahk_class Console_2_Main
    {
        IfWinActive
        {
            WinMinimize
            WinHide
        }
        else
        {
            WinShow
            WinActivate
            WinMove, 100, 50
        }
    }
    else
    {
        Run, "%UserProfile%\Console2\Console.exe"
    }

    return
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.