Page 4 of 4 FirstFirst ... 234
Results 31 to 39 of 39

Thread: My simple editor

  1. #31
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152
    "File" --> "New", doesn't work.

    If I save a file under a different name, the file name at the top of the screen does not always update.

    A script will not execute, if it is in a folder which contains a space character in its name. I have a folder on my desktop called, "NEW THIN". Scripts in that folder will not run.

    Otherwise, it works fast.


    Dan




    Last edited by danbaron; 20-11-2010 at 08:00.
    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  2. #32
    Member zlatkoAB's Avatar
    Join Date
    Apr 2008
    Age
    55
    Posts
    287
    Rep Power
    45
    Yes Dan you are right.
    I really dont know why that heapend?
    Maby someone here can help to solve this problem...

  3. #33
    Member zlatkoAB's Avatar
    Join Date
    Apr 2008
    Age
    55
    Posts
    287
    Rep Power
    45
    Hello...
    Im still waiting for answer about file path which my editor send to
    thinbasic interpreter?
    Is someone here who can explain me what is wrong with filename
    which contain blank space like this
    C:\My program.tbasic

    Why thinBasic dont regognize this file as script?
    as i say before i use command line like this:
    "thinbasic.exe",filename

    filename string in this case is 'C:\My program.tbasic'
    So what is wrong ?

  4. #34
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736
    Hi Zlatko,

    it is common practice, that if path contains spaces, it should be surrounded by double quotes (in the string itself).

    So instead of string:
    C:\My program.tbasic
    you should send:
    "C:\My program.tbasic"
    The reason to do so is that the part after space could be confused with other program parameter. Having it all in "" makes sure it will be took as single block.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

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

    it is not thinBasic but the operating system shell.
    It is always good practice (like Petr said) to enclose file names parameter in double quote in order not to create confusion to the application expecting such data.

    When you pass source code to be executed to thinBasic it also checks for additional parameters. Official syntax is the following:

    thinBasic.exe <Script file name> [Optional parameters]

    where <Script file name> should be enclosed in double quote otherwise part of the file name will be confused with [Optional parameters]

    [Optional parameters] are parameters user can pass to the script in order to be used at runtime.

    There are other parameters you can pass to thinBasic but till now I've not released them in help file. I will add in future in order for 3rd party programmers be able to better interact with thinBasic. Real command line syntax is something like:

    thinBasic.exe [execution flags] <Script file name> [Optional parameters]

    I will let you know more about [execution flags] this evening when back at home.

    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

  6. #36
    Member zlatkoAB's Avatar
    Join Date
    Apr 2008
    Age
    55
    Posts
    287
    Rep Power
    45
    Aha i see now...
    Same problem i have with YaBasic editor to and i simply dont know
    why that heapend.
    OK ...
    I will add double quotes and try.
    Thanks again both of you!

    Yes Eros,that would be fine that you tell me how look parametars
    or like you say execution flags.

    Zlatko

  7. #37
    Member zlatkoAB's Avatar
    Join Date
    Apr 2008
    Age
    55
    Posts
    287
    Rep Power
    45
    YES...
    IT works fine now.
    Code look like this:
    filename=LTRIM$(RTRIM$(filename))
                'add double quote
                filename=chr$(34)+filename+chr$(34)
                'execute script
                SYSTEM Getstartpath+"thinBasic.exe",filename
    
    Also i will add scintilla markers with SUB/END SUB
    and with FUNCTION /ENDFUNCTION...

  8. #38
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Here the [execution flags] you can use when using

    thinBasic.exe [execution flags] <Script file name> [Optional parameters]

    where [execution flags] can be one of the following
    • @D
      Debug mode: the script will be executed in debug mode showing thinbasic debug window. Execution is retained by the debug engine until runtime error or user exiting from debugger.
    • @O
      Obfuscation mode. The script will not be executed but an obfuscated version of the original script will be created in the same directory of the original script. Obfuscated scripts have .tbasicx extension. Execution will immediately return to calling program.
    • @B
      Dependency mode. The script will be partially executed in order to analyse dependant module and include files. A file with the same file name of the original script but with extension .sdep will be created in the same directory or the original script. Execution will immediately return to calling program.
    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

  9. #39
    Member zlatkoAB's Avatar
    Join Date
    Apr 2008
    Age
    55
    Posts
    287
    Rep Power
    45
    Thanks Eros...

Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. What editor?
    By Michael Clease in forum Fixed or cleared errors in help material
    Replies: 7
    Last Post: 31-10-2007, 04:19
  2. [IDE] SED Editor
    By José Roca in forum Power Basic
    Replies: 5
    Last Post: 23-07-2007, 20:07

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
  •