vojtek11
08-04-2004, 04:15 AM
I was trying to launch VT-Script commands via simple C++ application. It is based on "Remote TScript" from SDK. Actually I just added one singleline to the existing source: "SetPreviewRow(1)".
So the source looks like that:
CToasterConnection MainApp;
MainApp.SendCommand(
" if(!IsPluginRunning(\"Switcher2\"))"
" Launch(\"Switcher2\",\"Switcher\")"
);
CToasterConnection Switcher(__T2_SWITCHER);
Switcher.SendCommand(
" SetPreviewRow(1)" //THIS IS MY EXTRA LINE
" Auto"
);
It seems that my line is completely ignored. "Auto" works great. I was trying also this combination:
Switcher.SendCommand("SetPreviewRow(1)");
Sleep(5000);
Switcher.SendCommand("Auto");
Doesn't work. Single command:
Switcher.SendCommand("SetProgramRow(1)");
Doesn't work.
And I must admit - my own, normal script (text file) that looks like that:
SetPreviewRow(1)
Auto
Works perfectly after dragging it on a switcher. Why this command doesn't work via remote call of TScript from C++ source ??
The question is serious, because whole mechanism of remote call TScript commands is pretty easy. It doesn't require any special libraries, it's just simplest sending text to a window (like manual drag-and-drop of a TXT file). So it should work! But it isn't.
Vojtek
So the source looks like that:
CToasterConnection MainApp;
MainApp.SendCommand(
" if(!IsPluginRunning(\"Switcher2\"))"
" Launch(\"Switcher2\",\"Switcher\")"
);
CToasterConnection Switcher(__T2_SWITCHER);
Switcher.SendCommand(
" SetPreviewRow(1)" //THIS IS MY EXTRA LINE
" Auto"
);
It seems that my line is completely ignored. "Auto" works great. I was trying also this combination:
Switcher.SendCommand("SetPreviewRow(1)");
Sleep(5000);
Switcher.SendCommand("Auto");
Doesn't work. Single command:
Switcher.SendCommand("SetProgramRow(1)");
Doesn't work.
And I must admit - my own, normal script (text file) that looks like that:
SetPreviewRow(1)
Auto
Works perfectly after dragging it on a switcher. Why this command doesn't work via remote call of TScript from C++ source ??
The question is serious, because whole mechanism of remote call TScript commands is pretty easy. It doesn't require any special libraries, it's just simplest sending text to a window (like manual drag-and-drop of a TXT file). So it should work! But it isn't.
Vojtek