HTML Executable Wiki : OpenFolder

HomePage :: Site News :: HTML Executable Homepage :: Glossary :: RecentChanges :: Login/Register

Revision [84]

The oldest known version of this page was edited on 2008-07-15 15:25:55 by GdgAdmin

How to open subfolders of a CD or a disk?



This can be made without any problem, but you need to make some changes to your HTML code. The best would be to use a HEScript script function. This function would be invoked from your HTML code: it will open the subfolder you specify with a parameter.

Just follow these steps:
procedure OpenSubFolder(FolderName: String);
var
EbookPath, MyFolder: String;
begin
EbookPath := GetGlobalVar("HEPublicationPath", "");
MyFolder := EbookPath + FolderName + "\";
OpenFile(MyFolder, "
", SW_SHOWNORMAL);
End;

source code

For instance, you have this CD structure:

ROOT
Mycompiledwebsite.exe (the compiled .exe file)
-- Folder1
-- Folder2

If you want a link that opens "Folder1", use this HTML code:
<a href="hescript://UserMain.OpenSubFolder|Folder1">Open Folder 1</a>

Just specify the name of the folder after the | character. Note that folders shouldn’t have spaces (or use the %20 characters like for URLs).

Compile your project and that's all.
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.6567 seconds