"Add Favicon" Script for WebHelp

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

"Add Favicon" Script for WebHelp

Post by kwag_myers »

Paste this code into NotePad and Save As a .vbs file. When you generate WebHelp you can double-click this file and the favicon is added to the root directory. I use the same favicon for all my outputs, but you can put the script and favicon in the project folder (where the .flprj file resides) if you need to keep it with the project. You can also put a shortcut on your desktop and run the script from there.

Code: Select all

dim filesys

set filesys=CreateObject("Scripting.FileSystemObject")

' NOTE: Revise this directory to where your favicon.ico file resides
If filesys.FileExists("C:\Users\...\Documents\...\favicon.ico") Then 

' NOTE: The first directory is the same as above. The second is the output folder where the MadCap.css, MadCapAll.js, and MadCapBodyEnd.js files reside
filesys.CopyFile "C:\Users\...\Documents\...\favicon.ico", "C:\Users\...\Documents\Project\Output\...\WebHelp\Content\SkinSupport\"

End If

MsgBox "Completed!" & strMsg, vbInformation, "Completed!"
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: "Add Favicon" Script for WebHelp

Post by RamonS »

Or you could add the file to the project itself and it gets dragged in every time help is compiled...or am I missing something here?
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: "Add Favicon" Script for WebHelp

Post by kwag_myers »

That never worked for me. I actually got the idea from dmcleod's thread. Apparently, it didn't work for dmcleod either. This way I know it's there.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: "Add Favicon" Script for WebHelp

Post by RamonS »

So I am missing something...thanks for the link.
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: "Add Favicon" Script for WebHelp

Post by kwag_myers »

RamonS wrote:Or you could add the file to the project itself and it gets dragged in every time help is compiled...or am I missing something here?
btw, how does one add a favicon file (favicon.ico) to a project? This file extension does not appear in the Add Image dialog.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Post Reply