Menu

How to switch whether to perform a global auto-type when start KeePass?

Help
wideweide
2014-03-05
2014-03-06
  • wideweide

    wideweide - 2014-03-05

    I found : The -auto-type command line argument makes other already opened KeePass instances perform a global auto-type.
    ----But -auto-type is not work when start KeePass

    If use triggers,I can't start KeePass without a global auto-type

    Is there some way to switch whether to perform a global auto-type when start KeePass?

     
  • Dominik Reichl

    Dominik Reichl - 2014-03-05

    You can use a trigger for this (event 'Opened database file' or 'Application started and ready', and one of the auto-type actions).

    An environment variable could be used to test from where KeePass was started. For example, create a batch file (and a shortcut to it) with 'SET FromBatch=1' before starting KeePass, then the trigger can detect this using the condition 'Environment variable' (testing FromBatch for being 1).

    Best regards,
    Dominik

     
  • wideweide

    wideweide - 2014-03-06

    An enviroment is useful,Thanks.

    But I don't like trigger,and use command line option -auto-type when start keepass is more convenient.So pleas consider Add -auto-type support when start keepass:if use -auto-type,then just perform a global auto type,do not show the keepass gui

    Now I archieve this with autohotkey,when press ctrl+p,perform a global auto type whether keepass is opened:
    ^p::
    If not WinExist("ahk_exe KeePass.exe")
    {
    WinGetClass, class, A

        run,S:\App\KeePass\KeePass.exe S:\info\kpdata\scd
    
        WinWait ,scd - KeePass ahk_class WindowsForms10.Window.8.app.0.33c0d9d,,9
    
        if ErrorLevel
            return
    
        winhide,ahk_class WindowsForms10.Window.8.app.0.33c0d9d
        WinActivate,ahk_class %class%
    }
    
    run,S:\App\KeePass\KeePass.exe -auto-type
    

    If there is more simple way,please share.

     

Log in to post a comment.