View Full Version : Do these functions work?
SetCurrentSelection(int)
int GetCurrentSelection
I tired them but they didnt work.
SetCurrentSelection(int)
Didnt do anything far as I can tell
int GetCurrentSelection
returned GetCurrentSelection
according to the message box
SetTab()
That gave me script error.
This scrpt Blake wrote deleted
the whole clip. The other one worked.
RazorKillRight() = {
if (GetActivePaneType()==1) {
//only do this if on the timeline
RazorEditLine() //Razor at edit line
UpdateInOutPanelSel() //update the selection
Delete() //delete the right piece
}
Is this the way it is?
Bob
Aussie
12-16-2003, 06:47 PM
G'day Bob, Answers to your email and this forum
SetCurrentSelection(int)
int GetCurrentSelection
------------------------------
These are in Edit Props in TScript doc. So your code must be put in Skins\VideoEditor\EditPanel\EditMain\User Scripts to talk to edit props, plus edit props must be open. This tells you which tab ia active in the two rows of tabs in edit props panel (actually which plug-in panel). e.g. ...
KbdPriority = 100
// Get current tab
CreateShortCut ("1", code(
Answer = GetCurrentSelection()
InfoBox(Answer)), "OrderedFocus", KbdPriority)
// Set to Advanced Audio plug in
CreateShortCut ("2", code(
SetCurrentSelection(4)), "OrderedFocus", KbdPriority)
// what does the Int stand for?
---------------------------------------
int = integer.
int GetCurrentSelection() will give you an int for the tab number
SetCurrentSelection(int) lets you set the tab (but I just noticed that the plug-in changes, but not the tab button that is highlighted)
SelectBefore()
SelectAfter()
---------------
Same as clicking in timeline and looking at context menu items...
BeforeEditLine, AfterEditLine
I'll add AboveTrackLine & BelowTrackLine too.
The timeline does not allow added context menu items at this stage,. So AddMenuItem() will not work there. You can however still add hotkeys...
CreateShortCut ("5", code(
SelectBefore()),
"CurrentPopup", KbdPriority, "Timeline_Layout .*")
CreateShortCut ("6", code(
SelectAfter()),
"CurrentPopup", KbdPriority, "Timeline_Layout .*")
SetTab(int)
-----------
Shouldnt you be passing a Tab number? yep
0 for Storyboard, 1 for Timeline, 2 for FileBin, 3 for Splines etc,
Inever used SetTab() much, Instead I needed to know which pane is active (top or bottom, left/right)
int GetTopActivePane()
SetTopActivePane( int )
int GetBottomActivePane()
SetBottomActivePane( int )
int GetActiveEditorPane( )
int GetActivePane()
int GetActivePaneType()
ToggleActivePane()
ToggleMaxActivePane() // maximizes theactive pane
(notice no parameters here)
-----------------------------------
In Tscript docs... if you see a command like this GetTab, it is actually typed in as GetTab() the parenthesis must be there.
so int GetTab() becomes answer = GetTab(). Likewise with Set commands, SetTab is actually entered as SetTab(int myNumber). Again the parenthesis must be there.
Good luck mate,
Aussie
and HAPPY HOLIDAYS to ALL
Yeah I have the script where it should go but things
are not working right.
The GetCurrentSelection does not return a number.
SetCurrentSelection in TestIt2 gives me an error.
YEOW.
CreateShortCut ("7", code( TESTIT1() ), "OrderedFocus", KbdPriority)
CreateShortCut ("8", code( TESTIT2() ), "OrderedFocus", KbdPriority)
TESTIT1() =
{
int x
x = GetCurrentSelection()
MessageBox(x)
}
TESTIT2() =
{
SetCurrentSelection(1)
}
And then there is the
SelectBefore()
SelectAfter()
I will have to play with those again.
bob
Aussie,
After giving your response another re-read I think
I finally got it. Hmm, thick head.
These calls are only availalbe at certain times.
So just becuase they exist does not make them
useable. Intresting. Forgive me for my C, when its
a function I can call it mentality. But I think I got it now.
So in the editor I only have the calls in the
Editor
section of the doc and the
Editor - Commands shared with DDR
section.
I think I got it. Limited set available.
But how do I set markers? Or select a clip. Or
some of the many things you can do via the interface?
Thanks,
Bob
I read the doc several times so I know there is a C++
example at the end of the doc that talks about
markers. I was just thinking ToasterScript would have
something like this built in. Markers and timeline
traversing is basic powerhouse timeline marco
programming..
Guess the answer is I have to combine SDK code
with ToasterScript to make this work.
So to work with markers you need C and the SDK.
Thats the way I am reading this.
Bob
PIZAZZ
12-17-2003, 01:09 PM
Hey BOb,
Glad to see you around. I am anxious to see what you are working on. Blake told me a little about it. :D
Aussie,
Thanks for coming around the forum so we can bounce things off of you.
It seems there are lots of things that take knowledge both in ToasterScript and C. I unfortunately don't have any background in C but am learning TS quickly. The more and more we dig into things the cooler VT looks. It really is a very well thought out program and we all at PIZAZZ are excited about its possibilities.
Keep Plugging away Bob I know you will get it.
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.