Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
AlSk

Hscript Beautifier

Hi everyone,

I am searching for a solution to style a hscript expression. I am looking for something like, http://jsbeautifier.org/ just for hscript. In dont't think there is something out there particularly for Hscript, but maybe someone knows a tool where i can set rules to format my code. In fact it would only need 3 rules:

1. after every ( do a line break + tab
2. ahead every ) do a line break + shiftTab
3. after every , do a line break

So for example you get from this:
 

length(dopoption($DOPNET, $OBJID, "PointPosition", "velx"),dopoption($DOPNET, $OBJID, "PointPosition", "vely"), dopoption($DOPNET, $OBJID, "PointPosition", "velz")) - length(dopoption($DOPNET, $OBJID, "PointPosition", "oldvelx"), dopoption($DOPNET, $OBJID, "PointPosition", "oldvely"), dopoption($DOPNET, $OBJID, "PointPosition", "oldvelz"))


something like that:
 

length(
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "velx"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "vely"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "velz"
    )
) - length(
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "oldvelx"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "oldvely"
    ),
    dopoption(
        $DOPNET,
        $OBJID,
        "PointPosition",
        "oldvelz"
    )
)
Edited by AlSk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0