On Jan 18, 2007, at 8:32 AM, Tim Jones wrote:

Hi Emile,

Here's my two routines. Call the methods with the path as a ShellPath (i.e.: /Applications/iCal.app )

Forgot that the Path is also modified on the return, so the Sub should have been:

        Sub IsApp(ByRef Path As String)
and
        Sub IsPkg(ByRef Path As String)

Sorry - I was typing rather than using cut-and-paste.

Tim
--
Tim Jones
[EMAIL PROTECTED]


Sub IsApp(Path as String)
  // Expects the ShellPath...
  if Right(Path, 4) = ".app" Then
    // Update Path to drop the .app
    Path = Left(Path, Path.Len - 4)
    return true
  else
    return false
  End If
End Sub

Sub IsPkg(Path as String)
  // Expects the ShellPath...
  if Right(Path, 4) = ".pkg" Then
    // Update Path to drop the .pkg
    Path = Left(Path, Path.Len - 4)
    return true
  else
    return false
  End If
End Sub

HTH,

Tim
--
Tim Jones
[EMAIL PROTECTED]

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to