Results 1 to 2 of 2

Thread: Differrent behaviour between interpreted and bundled script

  1. #1
    Member
    Join Date
    Jan 2018
    Location
    France
    Age
    71
    Posts
    69
    Rep Power
    13

    Unhappy Differrent behaviour between interpreted and bundled script

    Hello,
    Still this French bother.

    I encounter a curious behavior. A script run directly from ThinAir and the same "bundled".

    I created a directory with spaces, underlines, minus signs. A real headache for a "parser".

    The comptarg2.tbasic script in this directory behaves correctly.
    The OS_command (1) only counts for one line: OK. See "screen_1"

    The same "bundled" executable breaks this line by applying the separators.
    See "screen2".

    In "screen3", the same ".exe" is invoked by dragging and dropping two files from the directory on the bundled_exe. Their full pathes are not cut because, I think that "windows explorer" surrounds them with double quotes.
    Don't you think that argument (1) should be treated as if it were surrounded by double quotes?

    Best regards,

    Dany

    ===================================================================
    '---Load needed modules
    Uses "Console"
    Uses "OS"
    
    Dim NumberOfCommands As Long
    Dim Count            As Long
    
    
    Console_SetScreenBufferSize(132, 32)         
    Console_ShowWindow(%CONSOLE_SW_MAXIMIZE)  
    
    '---Some header
    
    Console_Write("The following are the passed parameters (param 1 is always script name):" & $CRLF)
    Console_Write(Repeat$(79, "-") & $CRLF)
    
    
    '---Returns the number of commands specified
    NumberOfCommands = OS_GetCommands 
         
    PrintL "OS_getcommands returned : " &  NumberOfCommands
    PrintL  "separateurs par defaut : " &   OS_CommandsGetSep  
    
    '---Show all parameters
    
    For Count = 0 To NumberOfCommands
    
      Console_Write( Format$(Count, "00") & " " & OS_GetCommand(Count) & $CRLF)
    
    Next
    
    Console_Write(Repeat$(79, "-") & $CRLF)
    
    
    OS_CommandsSetSep ($DQ & "=-")  ' No more [space] as separator
    PrintL  "separateurs modifies : " &   OS_CommandsGetSep  
    
    
    For Count = 0 To NumberOfCommands
    
      Console_Write( Format$(Count, "00") & " " & OS_GetCommand(Count) & $CRLF)
    
    Next
    
    WaitKey (30)
    
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Thanks for reporting.
    Command line arguments parsing differences between script and bundled exe has been my headache since ... a lot of time
    grrrr
    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

Similar Threads

  1. Behaviour of TBGL_GetAsyncKeyState?
    By Michael Hartlef in forum TBGL General
    Replies: 2
    Last Post: 07-01-2017, 17:47
  2. 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
  3. Debugger behaviour
    By RobertoBianchi in forum thinBasic General
    Replies: 0
    Last Post: 26-09-2004, 14:40

Members who have read this thread: 1

Posting Permissions

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