Currently I have only one solution to find out from within code if it runs as tBasic-Script or bundled standalone-executeable:
In case it's an executeable, thinCore-function App_Scriptname / App_Sourcename will return an empty string.
' ----------------------------------------------------------
Function App_IsBundledExe() As Boolean
' returns TRUE if this program is an .exe
Function = ( APP_ScriptName = "" )
End Function
' ----------------------------------------------------------
Function App_Title() As String
' returns the name of this program
Function = IIf$( APP_ScriptName = "" , APP_Name, APP_ScriptName )
End Function
' ----------------------------------------------------------
'test:
If App_IsBundledExe Then
MsgBox(0, "this is bundled version running " & $CRLF & APP_Title )
Else
MsgBox(0, "this is script-version running " & $CRLF & APP_Title )
EndIf
Bookmarks