Search code examples
user-interfacevisual-c++pluginsautohotkeyskype-for-business

Call plugin for Skype for Business


I am trying to:

  1. Use a program written in Visual C++ as a plugin in Skype for Business

or

  1. Make the program window follow (attach itself to) the bottom of the Skype for Business user interface, using some type of tracker.

Any advice, or help on where to start?

I found the below links which would use Windows scripting tools such as AutoIt or AutoHotkey. I am not sure if this is the right approach.

https://www.reddit.com/r/AutoHotkey/comments/3ck7ak/tie_a_gui_to_a_window_ideas/ https://www.autoitscript.com/forum/topic/120474-attaching-a-gui-to-another-window/

If it is the correct approach, then, where do I start? If it is not the correct approach, what else can I do?

This question might seem as a duplicate to this link. Yet, the question was discarded.


Solution

  • This AutoHotkey script allows you to attach a notepad window to an explorer window:

    #Persistent
    SetTimer, attach_window, 200 
    Return 
    
        attach_window: 
    IfWinNotExist ahk_class CabinetWClass ; explorer
        return ; do nothing
    IfWinNotExist ahk_class Notepad
        return
    ; otherwise:
    ; retrieve the position and size of the explorer window:
    WinGetPos, X, Y, Width, Height, ahk_class CabinetWClass
    ; attach the notepad window to the right side of the explorer window:
    WinMove, ahk_class Notepad,, X+Width, Y
    ; To make the notepad window attach itself to the bottom of the explorer window use:
    ; WinMove, ahk_class Notepad,, X, Y+Height
    Return
    

    https://autohotkey.com/docs/commands/SetTimer.htm

    https://autohotkey.com/docs/commands/WinGetPos.htm

    https://autohotkey.com/docs/commands/WinMove.htm

    Use the included Window Spy utility to get various information about the windows you want use.