Lost help file favorites
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lost help file favorites
SmartBear's help file is not one of the easiest I've used when you are looking for information. Thankfully they have a favorites tab that you can attach particularly difficult to find topics.
That's all well and good, however, on installing the new version of TestComplete 11, my favorites list is empty. I'm assuming that because SmartBear installs new versions to separate directories, that is the reason for the loss.
It was hard enough the first time to find some of the items I saved as favorites, and I most certainly do not want to was more time doing something that I've already accomplished. I didn't see any obvious files that might contain this information that I could copy from old to new version; is anyone aware of how to get these favorites back?
Thanks
Bill
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bill,
You are correct, CHM favorites are tied to the specific CHM file name and path. Windows stores information about all CHM files ever opened on a computer in the hh.dat file here:
C:\Users\<username>\AppData\Roaming\Microsoft\HTML Help\hh.dat
It's a binary file, so there's no out-of-the-box way to transfer favorites from one CHM file to another, but there's a workaround.
You can see your favorites if you copy the TestComplete 11 help file to your previous TestComplete path, for example, to:
<your old TC 10 folder>\Help\TestComplete10.chm
and open this copy. You can then add the same favorites in the new help file. This can be automated using a TestComplete script like the one below. Before running this script, uncheck the Stop on Error option in Tools > Current Project Properties > Playback.
// JScript
function CopyFavorites() {
// The CHM file with favorites var fileName1 = "C:\\Program Files (x86)\\SmartBear\\TestComplete 10\\Help\\TestComplete10.chm"; // The CHM file to copy favorites to
var fileName2 = "C:\\Program Files (x86)\\SmartBear\\TestComplete 11\\Help\\TestComplete11.chm"; // Open the CHM file with favorites var navPane1 = OpenCHMAndGetNavPane(fileName1); var tabs1 = navPane1.Window("SysTabControl32"); tabs1.ClickTab("Favor&ites"); var favList1 = tabs1.Window("#32770").Window("SysListView32"); // Open the new CHM file var navPane2 = OpenCHMAndGetNavPane(fileName2); var tabs2 = navPane2.Window("SysTabControl32"); tabs2.ClickTab("Favor&ites"); var favList2 = tabs2.Window("#32770").Window("SysListView32"); tabs2.ClickTab("&Search"); var searchBar2 = navPane2.Window("Edit"); var btnSearch2 = navPane2.Window("Button", "&List Topics"); var searchResults2 = navPane2.Window("SysListView32", "HH FTSearch"); var btnAddFav2 = navPane2.Window("SysTabControl32").Window("#32770").Window("Button", "&Add"); // Copy favorites from one CHM to another for (var i = 0; i < favList1.wItemCount; i++) { var title = favList1.wItem(i); // Search for this topic in the new help file tabs2.ClickTab("&Search"); searchBar2.wText = title; btnSearch2.ClickButton(); // If the topic with the same title was found, add it to the target file if (searchResults2.wItem(title) != null) { searchResults2.DblClickItem(title); tabs2.ClickTab("Favor&ites"); btnAddFav2.ClickButton(); } else { Log.Warning(aqString.Format("Topic with title \"%s\" was not found.", title)); } } }
function OpenCHMAndGetNavPane(strFileName)
{
var oShell = Sys.OleObject("WScript.Shell");
oShell.Run(aqString.Quote(strFileName));
Delay(1000);
var p = Sys.FindChild("CommandLine", "*" + strFileName + "*");
var navPane = p.Window("HH Parent").Window("HH Child", "", 2);
return navPane;
}
Hope this helps!
Alternatively, you may want to use the TestComplete online help, and use the browser bookmarks to keep track of the articles of interest.
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I'll give that a try.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I tried, unsuccessfully, to convert this to vbScript. For now, I'm just living with it.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not create a temporary JScript project for this script, and delete it afterwards?
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My last post wasn't clear enough. You provided me with a JScript to copy the information over but I've never used JScript and I wasn't able to (quickly) convert it to VBScript.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @bduncan,
My unerstanding is that you need to execute Helen's script only once. So, you just can:
1. create a new JScript project in TestComplete (the procedure of created a projects is the same for all script languages)
2. copy/past the script
3. execute the script
4. make sure that the everything was copied and remove the project.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry HKosova that went right over my head at the time. It's been a hectic couple of weeks and all I could see was JScript and I've never used it before. It did not even occur to me that I don't have to know JScript to create a project using it instead of VBScript. I did and the script worked flawlessly. My most humble apology, and many, many thanks ![]()
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No problem Bill, glad it worked for you. ![]()
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.