ExecBinding problem

MstrGareth

Active Member
I am trying to use the key binding to move forward, then release it after a specified time. The scripting works with "moveforward,release" but I can't seem to get the .net app to stop moving forward.

Since others have movement working in thier .net apps, I imagine I am missing something :)

Suggestions welcomed.

Code:
        public void test()
        {
            LavishVMAPI.Frame.Lock();
            VGE.VG().ExecBinding("MoveForward");
            DebugOut("Starting forward");
            LavishVMAPI.Frame.Unlock();

            Wait(1000);

            LavishVMAPI.Frame.Lock();
            VGE.VG().ExecBinding("MoveForward,Release");
            DebugOut("Stopping forward");
            LavishVMAPI.Frame.Unlock();
        }
 

Fahrice

Active Member
The ExecBinding() method for .Net accepts a bool value for "Release" instead of a string as it does in scripting. The method has 2 overloads with the following signatures:

ExecBinding(string Action, bool Release)
ExecBinding(string Action)

So, here's how you use it (I believe - I haven't actually done it)......

Start moving forward:

VGE.VG().ExecBinding("MoveForward");

Stop moving forward:

VGE.VG().ExecBinding("MoveForward", true);


This should work, in theory at least. Hope it helps. ;)
 
Top Bottom