Simple script sample

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Simple script sample

Post by Carsten Pedersen »

Can anyone give me some simple script samples for MadCap Flare.

I was trying somethign simple like this:

document.write("Test Text");

But nothing happens?

Does scripts only work in HTML/WebHelp and not in PDF?

-cpede
You do not have the required permissions to view the files attached to this post.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Simple script sample

Post by RamonS »

PDF's use of JavaScript depends on the viewer used and the security restrictions in place. AFAIK most PDF viewers don't allow running scripts and you'd need to enable it explicitly. I think mainly for security reasons use of JavaScript in PDFs is discouraged.
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: Simple script sample

Post by Carsten Pedersen »

I'm looking for some guidelines how to use the script function.

I can get the document.write("bla bla...") to work

but something more complex like this:

Code: Select all

Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
is not working?

But then again, this works

Code: Select all

Dim oShell
Set oShell = CreateObject("Shell.Application") 
What are the rules???

-cpede
Post Reply