Convert AutoHotkey Script to C # or VB6

-1

I would like to convert the following script done with AutoHokey :

DllCall("shdocvw\SetShellOfflineState", "int", False)

With this script I can "get" the Internet Explorer of the offline mode without user intervention. This is necessary because when IE is offline it causes an error in a third-party component that I'm using.

Other suggestions for running the procedure are also welcome.

    
asked by anonymous 23.02.2016 / 16:46

1 answer

2

Use AutoHotkey.Interop to work in C #.

The code looks something like this:

public class AutoHotKey
{
    private readonly AutoHotkeyEngine _ahkEgine = new AutoHotkeyEngine();
    private const string comando = @"DllCall(""shdocvw\SetShellOfflineState"", ""int"", False)"; //aqui fica o script.

    public AutoHotKey()
    {
        _ahkEngine.ExecRaw(comando);
    }
}

You also have this link , which demonstrates how to use it in WPF, and some more complete examples.

    
24.02.2016 / 13:35