Home

Cardbox Talk

 

CardboxForumsCardbox Talk > "Special Field Captions"

Special Field Captions

Is there a full list of Special Captions?

Current user: [none]
Register / Log In · Help

Posted By Post

RodB

28-Dec-2010 15:38

Hello everyone and happy new year!

I've hunted everywhere I can think of, and can't find a full list of special captions.

Browsing the forum, I've found

FILE://
HTTP://
Mailto:

Are there any more? And while I'm here, I'm using the HTTP://, but it won't work if the page I want to access starts with HTTPS:// Is there a solution/workround to this?

Rod

bert

28-Dec-2010 16:33

Hi,

Entering a address type in a caption a is nice feature but (very) limited to only one address type per field followed with one address. You can enter more then one address by typing the full url or file address.

HTTP is different type then HTTPS, so that answers your question I think.

My solution is not to use a caption for this. I type the full address like "http://www.cardbox.com".
Gives the same result as using a caption: you can click on the url for visiting a page or launching a file or opening a new addressed mail. More then on address is also then possible.

B.t.w.: do not use 'FILE://' but 'FILE:'
Using two slashes gives problems. Use zero, one or three slashes, but **not** two.

A full list of captions I cannot give. I think, when such type works in Windows, it works in Cardbox.
By example: even 'Cardbox://' works (for opening a database file that is served bij a Cardbox Server).

regards
Bert

RodB

28-Dec-2010 17:09

Many thanks for your halp and advice Bert.

Best wishes

Rod

SRIW

13-Mar-2012 16:18

Hello everyone,
I create a link to a file in a text field with the command file:
does this command accept black space in the file name or in the path without using %20 ?

Best regards
Slim

bert

13-Mar-2012 18:35

A full list of this stuff you can find here: http://msdn.microsoft.com/en-us/library/aa767739%28v=vs.85%29.aspx
I did not test all captions. I think most of it will work.

It is a pity that %20 is needed in Cardbox for spaces as in "my documents".
In Word/Outlook(html) a space in a file location is recognized. In Cardbox you need %20.

Needed until... you write a simple macro. A (small) button in your screen can launch the file in stead of direct click on the file name in your record.
You also do not need the caption then. Only a path+filename, file is launched. Mailaddres: mailto:bert@provider.com. A site: Http://topsite.com.
You get more possibilities with this solution!

The macro you need:
fle = Fields("FIELD_WITH_FILENAME")
launch fle

Regards
Bert

SRIW

14-Mar-2012 10:42

I will try the macro
Many thanks for your help
Best regards

Charles Welling

14-Mar-2012 13:50

Bert's solution has a minor limitation: it allows for only a single filename in the field, which corresponds with the limitation of using a caption. The prefix of a caption is only added to the first filename in the field.

I've worked around this limitation with the macro below. It allows you to enter an unlimited number of filenames in a field. When you launch the macro the contents of the field is copied to the clipboard and a smaller window within Cardbox will display the names and allow you to pick one, which will then be launched. If the field contains only one filename, the window will not appear as there's nothing to choose from. That file will be launched immediately.

Replace "YOUR_FIELD" with the actual fieldname.

Please note that after "launch" comes "F:\My Documents\". This is used as an example and it shows how to add a path to the filename. It may be omitted, but when you use the macro to add the full path, you don't need to type it in the field, and you can move your files without having to change all your records.

IMPORTANT: this macro runs a small programme, located in the Cardbox folder, called "choosefile.exe". You don't have it, but e-mail me at c.welling@museumrotterdam.nl and I will send it to you (270 Kb). I've written it to display the filenames in a field in a separate window with an OK and a CANCEL button. OK copies the highlighted filename back to the clipboard so that Cardbox can launch it. Just put the exe in the Cardbox folder, that's all. And don't worry, all it does is display a window, nothing else!

if Fields("YOUR_FIELD").Textlength = 0 then halt

files = split(Fields("YOUR_FIELD"),CHR(10))
for each file in files
clipstr = clipstr & file & "|"
total_lines = total_lines + 1
next

if total_lines = 1 then
launch CHR(34) & Fields("YOUR_FIELD") & CHR(34)
else
ClipboardText = clipstr
run "F:\Cardbox3\choosefile.exe"

if ClipboardText = "" then
msgbox "No file chosen."
else
launch "F:\My Documents\" & ClipboardText
end if

end if

bert

14-Mar-2012 14:52

A nice solution Charles!
However, in many networks you are not allowed to add .exe files into the network. Often only system admins are allowed to!

I only give an alternative for the caption option. That also supports one address. So, my suggestion did that also.

If you want to choose one file of a number of files by a Cardbox macro, then I developed a clean Cardbox macro which lists numbered the files. You only have to enter the right number of the file you want to run.
Do'nt need to install or add an .exe file!

Regards
Bert

Charles Welling

14-Mar-2012 16:16

Thank you, Bert. But I believe anyone can use this exe. It does not need to be installed or registered. There's no setup and there are no changes to the registry, nothing at all. You can put it anywhere, even in your home directory or My Documents, just like any document. Just make the macro point to the right location and it will work. You could even rename it to "Cardbox3.exe" as long as it is not in the same folder as the real Cardbox3!

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home