addline

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • SeDneY
    Forum Member
    • Nov 2009
    • 37

    addline

    I have a question.
    Is there a method addline() in input ?
    And is it possible to do this?
  • jassing
    Indigo Rose Customer
    • Jan 2001
    • 3124

    #2
    you can always add a cr/lf pair &then some more text to anything you want... it showing up properly may be another thing..

    Comment

    • Sakuya
      No longer a forum member
      • Oct 2009
      • 682

      #3
      Enable multi-line in the Input box properties dialog.

      A new line for use in strings is "\r\n".

      Comment

      • reteset
        Indigo Rose Customer
        • May 2006
        • 1692

        #4
        Originally posted by SeDneY View Post
        I have a question.
        Is there a method addline() in input ?
        And is it possible to do this?
        there is no addline method
        you need to get existing text and append new line by concatenating old part with new line

        Code:
        oldtext = gettext()
        newtext =  oldtext.."\r\n".."this a new line"
        settext(newtext)
        amsplugins.com Is Closed.

        Facebook Page

        Comment

        • Imagine Programming
          Indigo Rose Customer
          • Apr 2007
          • 4252

          #5
          My Object Action Plugin contains a method for adding lines,
          install the plugin and tick it in the plugin dialog, create a multiline
          input object on the page and the next code allows you to
          add lines on each call.

          On Show
          Code:
          hInput1 = Object.Create("Input1");
          hInput1:SetAppendDelimiter("\r\n"); -- Default is an empty string.
          On the event where you want to append text
          Code:
          hInput1:Append("The text you'd like to see in a new rule.");
          hInput1:Append(""); -- Add a empty line.
          But you wouldn't have to use my plugin just for that hehe :yes
          Bas Groothedde
          Imagine Programming :: Blog

          AMS8 Plugins
          IMXLH Compiler

          Comment

          • boku
            Indigo Rose Customer
            • Mar 2009
            • 283

            #6
            PHP Code:
            function Addline(StringToAddToStringToAddMethod)

                --
            Newline
                
            if Method == 0 then
                    
            return StringToAddTo .. "\r\n" .. StringToAdd;
                --
            Inline
                
            elseif Method == 1 then
                    
            return StringToAddTo .. " " .. StringToAdd;
                else
                    return 
            "An error has occured";
                
            end
                
            end 
            I have no idea what so ever whether or not this will work, not tested ... enjoy
            - BoKu -

            Comment

            Working...
            X