Results 1 to 6 of 6

Thread: Run script without saving?

  1. #1

    Run script without saving?

    Hi,

    I am currently evaluating ThinBASIC and have come from other BASICs such as PureBASIC and BBC BASIC. Coming from those BASICs you are able to execute a script without having to save the actual script. I was wondering if this would or is possible in ThinBASIC? It's a very minor thing, but at at the early stage of experimenting I am creating random scripts on the fly for testing ideas, and it is a little annoying being forced to save them. Especially as those scripts are just experiments and for learning and nothing serious.

    Thanks for considering and hearing me out.

  2. #2
    i guess you mean executing the code from the IDE on the fly without saving it first like quick basic and purebasic . no it is not possible
    but if you mean executing a script from the command line it is not possible in purebasic also, there should be a file to execute it
    i don't see other than Perl which can do it like this from the command line
    perl -e print(2+2)
    output: 4

  3. #3
    Quote Originally Posted by primo View Post
    i guess you mean executing the code from the IDE on the fly without saving it first like quick basic and purebasic .
    Yep this is what I mean.

    Yesterday I did find a hidden context that does what I want. If you right click the script tab and then select "Execute script in temporary mode" it can achieve what I want. This is usefully bound to "shift + f5". My only criticism with it is that it gives a messagebox confirming you wish to proceed everytime you run, it would be nice to just have an option in the ide to say to ignore that message box and just run it.

    Was lucky I found this menu option, surprised it does not live under the main menu bar.
    Last edited by MrHiggins; 27-02-2022 at 08:58.

  4. #4
    Thanks MrHiggins
    i never know about this before. and yes disabling the messageBox is preferable

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    55
    Posts
    8,653
    Blog Entries
    2
    Rep Power
    10
    Quote Originally Posted by MrHiggins View Post
    Was lucky I found this menu option, surprised it does not live under the main menu bar.
    Yes, as you discovered ... executing a script on the fly without having to save it can be done by right click on its editor Tab.

    I will add those hidden but useful commands in main menu and in tool bar.
    There a some other also under right click in editor window,
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    thinBasic MVPs ReneMiner's Avatar
    Join Date
    Oct 2012
    Location
    Germany
    Age
    52
    Posts
    1,470
    Blog Entries
    2
    Rep Power
    163
    how about a button

    "New Experiment" a bit equal to "new Script" but the experiment has a name and a save-location predefined:

    Name "Experiment_" & Now(11) & ".tBasic"
    Location User_Scriptfolder & "Experiments\"

    and for shipped sample-scripts:

    zip these.

    Put a new tab to codetree/filebrowser :

    "Samplescripts" where the zip-content is listed and in case user opens one:

    unzip it to experiments-folder + add a date to its name

    that will secure the shipped samples remain unchanged and intact whatever the user wants to test - he gets a fresh new sample, unchanged as shipped
    Last edited by ReneMiner; 03-04-2022 at 10:30.
    running thinBasic in HP Pavillon Desktop 590 a0xxx 8GB Ram AMD A6-9225 Radeon R4 5Compute Cores 2C+3G @2.6GHz

    Windows 11 Enterprise x64 Build 22000.100 (21H2) - "native boot" from .vhdx
    (says the systeminfo. anything else says it were Windows 10 - but hey: thinbasic runs well )


Similar Threads

  1. thinAir: File saving bug adding redundant characters, confuses git
    By Petr Schreiber in forum thinAir General
    Replies: 1
    Last Post: 18-12-2019, 18:32
  2. Saving and reading binary geometry files with TBGL
    By Petr Schreiber in forum TBGL Scripts and Projects
    Replies: 5
    Last Post: 31-07-2013, 17:38
  3. ATL: a little script to think about
    By ErosOlmi in forum COM
    Replies: 5
    Last Post: 10-09-2007, 22:58

Posting Permissions

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