PDA

View Full Version : Why SetPreviewRow(n) is not working ?


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

PIZAZZ
08-04-2004, 10:02 AM
My lead programmer, Blake, just went through this. I will have him join the conversation when he gets in today.

I forget what he said he found but he was able to get this functionality to work.

ACross
08-04-2004, 02:26 PM
Votjek,

Can you email me your source code and I will take a look at it. it will be something simple.

Andrew

Originally posted by vojtek11
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

vojtek11
08-05-2004, 06:33 AM
OK. This "thing" doesn't work under 2000 and XP as well. Just checked it. In the attachement there is my source modified from original "Remote TScript".

Vojtek

Blake
08-09-2004, 05:57 PM
I ran into this problem, too. I haven't spent any time trying to get around it. It does seem like it should "just work," so I'm wondering what exactly is going wrong. Any insight would be great.

-Blake

vojtek11
08-10-2004, 03:10 AM
Still no answers. I did a few experiments and there is no way to work it around or explain. I'm guessing parenthesis and parameters are the the problem. I.e. sending "Auto", "Take", etc. is well processed by VT[3] software. But the moment I'm sending some value and parenthesis - completely ignored. That goes for digits, variables, formulas (as parameters). If I pass a text string as parameter - works OK.

This works:

MessageBox("This works");

But this is not:

MessageBox(1).

And I guess both of them should work. In the begining I blamed OS communication level, but since I'm sending plain text to a window instance (no extra formatting, no special way for passing values, variables - simplest text string) - there should be no difference for the client window what is inside - in both cases it should be processed same way.