Madhur,

StarBASIC has the function GETGUITYPE that returns a value for the OS.

The OOo API has the struct com.sun.star.util.URL that can be used with the
object com.sun.star.util.URLTransformer to get parts of one URL (see code):

'-----------------------------------------------------
Sub exemploURL
Dim umURL As New com.sun.star.util.URL
umURL.Complete = "http://www.sitio.com.br:2006/docs/manual.html#cap1";
oURLT = CreateUnoService("com.sun.star.util.URLTransformer")
' parse
oURLT.parseStrict(umURL)
' get fields
msg = "Mark....: " & umURL.Mark & Chr$(10) & _
"Name....: " & umURL.Name & Chr$(10) & _
"Path....: " & umURL.Path & Chr$(10) & _
"Port....: " & umURL.Port & Chr$(10) & _
"Server..: " & umURL.Server & Chr$(10) & _
"Protocol: " & umURL.Protocol & Chr$(10)
msgBox msg, 176, "Exemplo de campos de URL:"
msgBox umURL.Main, 176, "Campo Main de URL:"
End Sub
'---------------------------------------------------------------------------------

HTH
--
Noelson

2010/3/23 Madhur Kashyap <[email protected]>

> Mathias and Irne
>
> Thanks for your responses. The home folder concept is useful for setting a
> current working directory (linux).
>
> Although my purpose was little different. I found that help in Andrew
> Pitonyak's quick reference.
>
> OO Basic supports an API getPathSeparator() which returns "/" or "\"
> depending upon what OS is used. So, my purpose has been temporarily solved.
>
> so to construct a path I am writing
>
> sFilePath = sRootDir & getPathSeparator() & leakage_win.exe
>
> I was looking for built in or user written APIs for something like
>
> sFilePath = fileJoin(sRootDir leakage_win.exe)
>
> There are other path related functions which are required quite often.
> Please follow the link below
>
> http://wiki.tcl.tk/1041
>
> Thanks,
> Madhur
>
> On Tue, Mar 23, 2010 at 1:36 PM, Irné Barnard <[email protected]
> >wrote:
>
> > As Mathais explained you need to use the home folder location. Even on
> > windows this location may differ depending on version. E.g. XP is
> > C:\Documents & Settings\UserName\,
> > while in Vista it's C:\Users\UserName\
> >
> > I'm not sure if there's other folder locations available through OOo's
> API,
> > but generally you'd also want such folders as the install path, common
> > settings, shared libraries, etc. Most other programs creating install
> > executables have similar "smart"-folder locations.
> >
> > --
> > Regards Irné Barnard
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
> --
> Regards
> Madhur Kashyap
>

Reply via email to