Hi
Have a look at the class AbtProgramStarter. If you pass the name of the HTML file to new system process, the file will open with its associated application.
Note: This is "just" for Windows. However, as you mention IE, I assume this is true.
Below is some samplecode to open the "d:\disk_s\httpRoot\index.html" file in the browser
- Code: Select all
| startUpInfo processInformation rc |
(startUpInfo := OSStartupinfo new)
dwFlags: PlatformConstants::StartfUseshowwindow;
wShowWindow: PlatformConstants::SwShownormal.
os := OSCall new .
rc := os createProcess: nil
lpszCommandLine: 'cmd /C d:\disk_s\httpRoot\index.html'
lpsaProcess: 0
lpsaThread: 0
fInheritHandles: false
fdwCreate: PlatformConstants::NormalPriorityClass
lpvEnvironment: 0
lpszCurDir: nil
lpsiStartInfo: startUpInfo
lppiProcInfo: (processInformation := OSProcessInformation new).
rc inspect.
os getLastError inspect
Don't forget to look at the error messages
--Thomas