GLBasic forum

Main forum => Beta Tests => Topic started by: StuC_Ovine on 2009-Sep-04

Title: Beautify Your Code - Via Hotkey
Post by: StuC_Ovine on 2009-Sep-04
Little app I use internally - thought others might like it. (win32)

It beautifys your code on the press of a defined hotkey. ( Auto indents your code )

It works by using your clipboard to take a copy of your source (from a valid text box / IDE  etc),  processes it then pastes it back.  

It will autosense (hopefully) what codebase you are using (as it works with VB, blitz3d, Blitzmax and now GLbasic).

(http://baa.ovine.net/code.jpg)

Grab the file from http://baa.ovine.net/codeformat.zip (http://baa.ovine.net/codeformat.zip)


/Stu
www.ovine.net

Title: Re: Beautify Your Code - Via Hotkey
Post by: D2O on 2009-Sep-04
Cool  :good: und ein wirklich gut zu gebrauchendes program.

Scheint recht gut zu laufen.
Danke.


Jetzt muss nur noch ein Makro her um es aus der IDE zu starten.
;---------------------------------------------
Cool: good: and one really per-grief well to be used.

Seem to run properly well.
Thanks.

Now must to only start therefore a macro from the IDE.
Title: Re: Beautify Your Code - Via Hotkey
Post by: Marmor on 2011-Jan-30
hat das noch jemand ?
Title: Re: Beautify Your Code - Via Hotkey
Post by: Albert on 2011-Apr-01
Dead link :(
Title: Re: Beautify Your Code - Via Hotkey
Post by: D2O on 2011-May-15
Ich habe StuC mal eine Mail geschickt.
Vieleicht setzt er einen neuen Link.

Ich gebe bescheid falls eine Antwort kommt.

Title: Re: Beautify Your Code - Via Hotkey
Post by: felix330 on 2011-May-15
Found it! The codeformat.exe still seems to be on the server. http://ovine.net/download.php?dl=codeformat (http://ovine.net/download.php?dl=codeformat) .
Edit:works great :)
Title: Re: Beautify Your Code - Via Hotkey
Post by: D2O on 2011-May-15
Thanks :good:
Title: Re: Beautify Your Code - Via Hotkey
Post by: Albert on 2011-May-16
Thank you!  :nw:
Title: Re: Beautify Your Code - Via Hotkey
Post by: Albert on 2011-May-16
It's not working very well for me, it can't detect the ENDFUNCTION.

Code (glbasic) Select

// get map width (tiles)
FUNCTION MapWidth: map
RETURN LAYERS[map].getWidth()
ENDFUNCTION

// get map height (tiles)
FUNCTION MapHeight: map
RETURN LAYERS[map].getHeight()
ENDFUNCTION

// get tile width (pixels)
FUNCTION TileWidth: map
RETURN LAYERS[map].TWidth
ENDFUNCTION
Title: Re: Beautify Your Code - Via Hotkey
Post by: Moru on 2011-May-16
Try my beautifier. Not as nice as the Ovine one but might work still? :-)
http://gamecorner.110mb.com/index.php?page=beautify
Title: Re: Beautify Your Code - Via Hotkey
Post by: bigsofty on 2011-May-16
Id like to know how he gets in/out GLBasic. He copies all the code into the pastes buffer, changes it in an external app and then pastes it back in? All seamlessly

I'll maybe contact STU at Ovine and ask him to opensource this old util.
Title: Re: Beautify Your Code - Via Hotkey
Post by: Albert on 2011-May-16
More: I've already tried your beautifier, but I wanted to try this also. Now I will stick with your script.