Page 1 of 1

custom open file

Posted: 04 Jul 2006, 13:05
by malcooning
Hi,

how can I create a custom button that will open a specific file (i.e. I have a file which is a template, layers and all, and I want to open it again and again without navigating to it every time)?

Cheers

Posted: 04 Jul 2006, 13:11
by ematecki
Create a button in custom panel (with "Add Action").

Create a "Type Script's Command" action in the "None" popup.

In the small popup window, type "tv_loadproject whereeveryourfileis".

Choose an icon for your button and there you go !

Posted: 05 Jul 2006, 11:57
by malcooning
cheers ematecki,
but it's not working for me. The command line seem not to create any response. I tried putting the full path including the name of the file, and I've tried with just the path (hoping it would bring up a file requester). but none seem to do it.

Posted: 05 Jul 2006, 12:40
by ematecki
Hi,

you must put the file name between double quotes (") if it contains spaces.
You should preferably use the full path name, with a drive letter.
While TVPA does its best to find a file without path, it can't check on the whole drive, that would take too much time, it will just check in a few directories "know to him".

Don't put quotes around the whole command.
It should read :

tv_loadproject "C:/the/path/to/the/file.tvp"

Oh, one last thing, use '/' instead of '\', that's much friendlier to scripting
languages which uses '\' to 'escape' some special characters.

EM.

Posted: 05 Jul 2006, 14:21
by malcooning
Works perfect!
Thanks for the elaborate reply, Eric.

A.