Results 1 to 4 of 4

Thread: Do you know: How to detect if a script is bundled

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    55
    Posts
    1,554
    Rep Power
    174

    Do you know: How to detect if a script is bundled

    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
    
    Last edited by ReneMiner; 05-09-2015 at 12:48.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. UI: How to detect minimizing of Dialog?
    By ReneMiner in forum UI (User Interface)
    Replies: 7
    Last Post: 23-08-2013, 12:16
  2. Help me: test this bundled Exe
    By ErosOlmi in forum thinBasic vaporware
    Replies: 4
    Last Post: 09-06-2013, 23:36
  3. How to detect if dialog is maximized and set maximized at runtime?
    By Michael Hartlef in forum UI (User Interface)
    Replies: 2
    Last Post: 03-10-2008, 17:25
  4. DIR_GetCurrent behaves different with a bundled EXE
    By Michael Hartlef in forum File
    Replies: 13
    Last Post: 19-05-2008, 10:36

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •