Results 1 to 8 of 8

Thread: Console not the same when bundled

  1. #1

    Console not the same when bundled

    If I take the SampleScripts\Console\Console_Info.tbasic program and run it from within thinAir, it works just like I would expect - it outputs all of it's text to the cmd windows that is brought up when run.

    If I run it from the command line like so:

    C:\thinBasic\SampleScripts\Console>thinbasicc Console_Info.tbasic

    it also runs exactly as I expect - it uses the existing command shell console to output it's text to.

    But when I bundle it and run it from the command line, it opens up it's own console rather than using the existing command shell console.

    To me this doesn't match what I understand about .tbasic vs .tbasicc files.

    If this file were a .tbasicc file and it were run from a bundle, I would expect it to open up it's own console. But it is not - it's just a .tbasic file. Shouldn't it use the existing console?

    (This is with 1.9.15.0)

    *Brian

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Well,

    you are finding all current limitations
    Current bundling process is able to just creates GUI executable regardless of thinBasic extensions (.tBasic, tBasicc).

    GUI executable is not recognized by the operating system as Console application and for this reason are not executed inside the command prompt from which it is executed.
    Even if the GUI application is able to use and write into a Console ... the operating system does not use the current console but opens a new one.

    I do not exclude that in future versions of thinBundle I will be able to differentiate the two kind of executable.
    I have to check how to do.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    Eros,

    Sorry! :-) It's not that big a deal to me for this application, but I can see this being a problem if somebody wanted to make a true 'command line' program that operated just like another DOS command.

    In any case, thanks so much for being so responsive to all of my silly little requests. I'm really enjoying learning ThinBasic and absolutely love the language for quick little PC apps. It's so much fun to program in TB!

    *Brian

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    I think I've done this new option.
    Next version will have the possibility to create GUI or Console Bundled executable.

    It will be determined into two possible modes:
    1. if script extension will be .tbasic a GUI bundled application will be created
      if script extension will be .tbasicc a Console bundled application will be created
    2. second option is to force inside the script using something like:
      #BUNDLE Type Console
      #BUNDLE Type Gui


    Ciao
    Eros
    Attached Images Attached Images
    Last edited by ErosOlmi; 23-09-2015 at 23:21.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5
    Sounds great Eros! Thanks,

    *Brian

  6. #6
    Eros - so I'm now running 1.9.16.17, and I bundled a simple .tbasicc program, and I _still_ can't stop it from opening its own command prompt when I call the resulting .exe file from the command line.

    Do you have a simple example that demonstrates using console output, which, when bundled to a .exe and run from the command line re-uses the CMD command window rather than opening it's own?

    Thanks so much-

    *Brian

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Hi Brian,

    with recent version I added new #BUNDLE ... commands and one of those commands is #BUNDLE TYPE CONSOLE
    This instruct Bundle to create a real console application instead of a GUI application opening a concole window
    See help at http://www.thinbasic.com/public/prod...undle_type.htm

    When you bundle your script it will intercept #BUNDLE TYPE CONSOLE command.

    Example:
    #BUNDLE Type Console
    
    
    uses "console"
    
    
    printl "Hi there"
    waitkey
    
    Let me know if it works
    Eros
    Last edited by ErosOlmi; 07-09-2016 at 23:51.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #8
    Yes! That was the magic! Thank you so much Eros - my bundled app is now staying within the original windows cmd console.

    *Brian

Similar Threads

  1. Do you know: How to detect if a script is bundled
    By ReneMiner in forum Do you know ...
    Replies: 3
    Last Post: 15-09-2015, 17:08
  2. Help me: test this bundled Exe
    By ErosOlmi in forum thinBasic vaporware
    Replies: 4
    Last Post: 09-06-2013, 23:36
  3. DIR_GetCurrent behaves different with a bundled EXE
    By Michael Hartlef in forum File
    Replies: 13
    Last Post: 19-05-2008, 10:36
  4. Bundled exe and command line
    By ErosOlmi in forum thinBundle suggest new features
    Replies: 5
    Last Post: 21-02-2007, 14:04
  5. Directory where to create bundled exe
    By ErosOlmi in forum thinBundle suggest new features
    Replies: 0
    Last Post: 21-02-2007, 00:43

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
  •