Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Alternative IDE: PSPad

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,429
    Rep Power
    653

    Alternative IDE: PSPad

    PSPad is general purpose "programmers" text editor, which can be used for editing and running ThinBASIC scripts as well. The following text will guide you step by step to make PSPad your IDE for ThinBASIC.

    Step #1: Download and install PSPad
    PSPad comes in various language versions, I recommend the English one.
    You can download it from here:
    PSPad Download [ENGLISH]
    It is possible that after installation, PSPad will autodetect your language and "localize" itself automagically.

    Step #2: Adding syntax definition
    Use following script to generate INI file for you, move that INI to:
    \PSPad editor\Syntax\ThinBASIC.ini
    [code=thinbasic]
    ' -- Script to generate ThinBASIC.ini for PSPad
    uses "ADO","Biff","Bundle","CGI","COM","COMM","Console","Crypto","Dictionary","DT","Eval","Exe","FBGFX","File","FileLine","FTP","GDIp","Inet","INI","LAN","LL","Math","OnlineScores","OS","Oxygen","PC","RAS","Registry","SAPI","SMTP","STAT","TBASS","TBDI","TBEM","TBGL","TcpUdp","Tokenizer","UI","UIAdv","VBRegExp","WMI","XPRINT","ZLIB"

    dim iniOut as string = ";PSPad user HighLighter definition file"+ $CRLF + _
    "[Settings]"+ $CRLF + _
    "Name=THINBASIC"+ $CRLF + _
    "HTMLGroup=0"+ $CRLF + _
    "Label=0"+ $CRLF + _
    "FileType=*.tbasic"+ $CRLF + _
    "CommentString="+ $CRLF + _
    "REMComment=1"+ $CRLF + _
    "SinglQComment=1"+ $CRLF + _
    "Preprocessors=1"+ $CRLF + _
    "IndentChar="+ $CRLF + _
    "UnIndentChar="+ $CRLF + _
    "TabWidth=0"+ $CRLF + _
    "DoubleQuote=1"+ $CRLF + _
    "KeyWordChars=_$%"+ $CRLF + _
    "CodeExplorer=ftVBS"+ $CRLF + _
    "[KeyWords]"+ $CRLF + _

    DIM sKeys AS STRING
    DIM aKeys() AS STRING
    DIM nKeys AS LONG
    DIM Count AS LONG

    '---Get a string with keywords separated by $TAB
    sKeys = APP_ListKeywords

    '---Parse string into an array
    PARSE sKeys, aKeys, $TAB

    '---Creates output buffer
    nKeys = UBOUND(aKeys(1))
    FOR Count = 1 TO nKeys
    IF aKeys(Count) <> "REM" THEN
    iniOut += aKeys(Count)+"=" + $CRLF
    END IF
    NEXT

    iniOut += "[ReservedWords]"
    '---Get a string with keywords separated by $TAB
    sKeys = APP_ListEquates

    '---Parse string into an array
    PARSE sKeys, aKeys, $TAB

    '---Creates output buffer
    nKeys = UBOUND(aKeys(1))
    FOR Count = 1 TO nKeys
    iniOut += aKeys(Count)+"=" + $CRLF
    NEXT

    iniOut += "[KeyWords2]"+$CRLF+"[KeyWords3]"

    file_save("ThinBasic.ini", iniOut)
    [/code]

    Optional: Start PSPad, go to Settings/User higlighter and select this file.
    Dialog will appear, just hit "SAVE" button.

    Step #3: Adding filter
    You will find Documents/<userName>/Application Data/PSPad/PSPad.ini and append the following to it (change things in bold to match your setup):
    [THINBASIC]
    Filter=THINBASIC (*.tbasic)|*.tbasic
    HLTabWidth=2
    IndentChar=
    UnIndentChar=
    Comment=000080001FFFFFFF010
    Identifier=1FFFFFFF1FFFFFFF000
    Key=008040001FFFFFFF100
    Key words 2=004080FF1FFFFFFF100
    Key words 3=1FFFFFFF1FFFFFFF100
    Label=000000FF1FFFFFFF000
    Number=008000001FFFFFFF000
    Preprocessor=008080001FFFFFFF010
    Reserved Word=004000801FFFFFFF100
    Space=008080001FFFFFFF000
    String=000000FF1FFFFFFF000
    Symbol=1FFFFFFF1FFFFFFF000
    Compilator File=E:\util\thinBasic\thinBasic.exe
    Compilator Param=%File%
    Compilator LOG=
    Compilator Run=E:\util\thinBasic\thinBasic.exe
    Compilator Help=E:\util\thinBasic\Help\thinBasic.chm
    Compilator SaveAll=0
    Compilator ParsLog=
    Compilator Capture=1
    Compilator HideOutput=0
    Compilator DefaultDir=
    Compilator LogType=0
    Also do not forget to set value of UserHighLighterName (5th row of ini file)
    UserHighLighterName=ThinBasic
    Now you are finished. Just open tBasic files, and they will be highlighted correctly.
    Ctrl+Shift+E brings you to code explorer, which allows you to navigate through Functions and Subs.

    To run scripts, use Ctrl+F9.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	PSPAD_TB.png 
Views:	182 
Size:	45.1 KB 
ID:	6046  
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    47
    Posts
    7,584
    Blog Entries
    2
    Rep Power
    10

    Re: Alternative IDE: PSPad

    Thanks a lot Petr.
    I have PSPad installed since many year and I can say it does its job.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Age
    42
    Posts
    241
    Rep Power
    30

    Re: Alternative IDE: PSPad

    Thanks a lot Petr, i just installed it and it looks good.

    But I have 2 problems:
    -I can't run my Thinbasic scripts, although the path is correct in the .INI file
    -I don't like that vertical line at ruler position 80, is there a way to delete this line?

    Still I hope that ThinAir problems will be solved soon, as I fall a little in love with this tiny editor. And I really hope that a scrollbar will be added in the Functions-combobox.

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    47
    Posts
    7,584
    Blog Entries
    2
    Rep Power
    10

    Re: Alternative IDE: PSPad

    -I can't run my Thinbasic scripts, although the path is correct in the .INI file
    Be sure to have "Compilator Param=%File%" setup. See red line below.
    Also check full path to thinBasic.exe executable. It must be where you have installed thinBasic, usually c:\thiBasic\thinBasic.exe


    [THINBASIC]
    Filter=THINBASIC (*.tbasic)|*.tbasic
    HLTabWidth=2
    IndentChar=
    UnIndentChar=
    Comment=000080001FFFFFFF010
    Identifier=1FFFFFFF1FFFFFFF000
    Key=008040001FFFFFFF100
    Key words 2=004080FF1FFFFFFF100
    Key words 3=1FFFFFFF1FFFFFFF100
    Label=000000FF1FFFFFFF000
    Number=008000001FFFFFFF000
    Preprocessor=008080001FFFFFFF010
    Reserved Word=004000801FFFFFFF100
    Space=008080001FFFFFFF000
    String=000000FF1FFFFFFF000
    Symbol=1FFFFFFF1FFFFFFF000
    Compilator File=E:\util\thinBasic\thinBasic.exe
    Compilator Param=%File%
    Compilator LOG=
    Compilator Run=
    Compilator Help=E:\util\thinBasic\Help\thinBasic.chm
    Compilator SaveAll=0
    Compilator ParsLog=
    Compilator Capture=1
    Compilator HideOutput=0
    Compilator DefaultDir=
    Compilator LogType=0
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,429
    Rep Power
    653

    Re: Alternative IDE: PSPad

    Hi Martin,

    that is weird. Does the syntax highlighting work ok for you at least?
    What is the path of your ThinBASIC, does it contain spaces?


    Petr

    P.S. I also hope Roberto will become enthusiastic again.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,429
    Rep Power
    653

    Re: Alternative IDE: PSPad

    Removing vertical line at position 80 is ~easy:

    - From menu choose "Settings / Program Settings"
    - Choose "Editor (part 2)"
    - Change number in "Position of Right Edge" to 1024
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  7. #7

    Re: Alternative IDE: PSPad

    Petr:

    I also am having the same problem as Martin with PSpad.

    Everything seems to be set up correctly according to your instructions, however, I am unable to get CTRL+F9 to start a run.

    Don
    XPS 1710

  8. #8
    Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Age
    42
    Posts
    241
    Rep Power
    30

    Re: Alternative IDE: PSPad

    Quote Originally Posted by Petr Schreiber
    that is weird. Does the syntax highlighting work ok for you at least?
    What is the path of your ThinBASIC, does it contain spaces?
    Hi Petr,

    I am 100% sure that I spelled the corred path (no spaces in it). The syntax highlighting didn't work after copying the INI files. I configured everything via the menu.

    I will take a look again today to see what's wrong

    Martin

  9. #9
    Super Moderator Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Leverkusen, Germany
    Age
    48
    Posts
    3,151
    Blog Entries
    2
    Rep Power
    324

    Re: Alternative IDE: PSPad

    Maybe the Ini file is in the wrong location.

  10. #10
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,429
    Rep Power
    653

    Re: Alternative IDE: PSPad

    Don, Martin,

    when you select File/Open, can you see THINBASIC (*.tBasic) as an option (last) in the file types box? If not, check if your [THINBASIC] section is still in the PSPad.ini.

    In case you edited it while PSPad was running, it is possible it got deleted on the exit of program.

    Could you post your PSPad.ini file here?

    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

Page 1 of 2 12 LastLast

Similar Threads

  1. Alternative IDE: thinSED
    By Josť Roca in forum Alternative IDEs
    Replies: 31
    Last Post: 13-08-2011, 18:38
  2. Alternative IDEs
    By ErosOlmi in forum Alternative IDEs
    Replies: 2
    Last Post: 28-08-2009, 14:37
  3. ThinBasic... an alternative?
    By Polarwolf in forum Shout Box Area
    Replies: 12
    Last Post: 14-08-2008, 20:03

Bookmarks

Posting Permissions

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