Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: enter character recognized as character  (Read 5473 times)

0 Members and 1 Guest are viewing this topic.

mibushk

    Topic Starter


    Greenhorn

    enter character recognized as character
    « on: January 23, 2012, 12:54:24 AM »
    Hello,

    I am making a vba project in which I take info from the vba form put it together in a command line and pass it in a dos command, this line creates an item in another tool.

    I have an issue with a text field, in which you may enter data in a text format with enter and another line and enter, when I pass this into a dos command the enter sign will not be recognized as a character but as the command it self an enter which runs the dos command to early

    I am now stuck, how can I modify the text what type of escape character should I introduce that will be seen in fact as an enter sign

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: enter character recognized as character
    « Reply #1 on: January 23, 2012, 01:30:16 AM »
    Show some code.  The enter key is supposed to finish a user input.

    mibushk

      Topic Starter


      Greenhorn

      Re: enter character recognized as character
      « Reply #2 on: January 23, 2012, 03:47:58 AM »
      well

      Execute DOS Command: im createissue --hostname=mks-psad-test --port=8002 --user=blabla --password=xxxxxx --type=issue --field=Summary="Summarize your requestdd" --field=Description="Describe your request
      new
      line
      again one"
       --field="Issue Type=Change Request" --field="Project=/Tool_Support" --field="System Element"=89462 --field="Stakeholder Reference"=blabla

      this is the dos command which after the first enter it deploys the dos and that enter is from the text field, is not an actual enter, how can I transform the text
      Describe your request
      new
      line
      again one

      so that the enters are read as special character and not as an enter command?

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: enter character recognized as character
      « Reply #3 on: January 23, 2012, 02:02:56 PM »
      mibushk, I think we need to go over some basics.  I can't follw what you are doing.
      We can deal with non-visible chars in a special way in low-level programs.  The end of line is done in perhaps four different ways on computer systems. But you normally do not have to remove or add it to any text you are nursing.

      At the DOS command line {actually the Windows command line} items are separated by spaces. Different programs have different command line options.  When a program reprieves a  command line options it is not really the command interpreter that is doing the work. The command interpreter just gives it to the program. Of course, the command has to be on one line with no end of line until the end of line.

      In VBA and other versions of MS basic there is a specific way to write a line of text without en-of-line markers until the last item in the line. This is true of all modern computer languages. You do not have to remove or transform end-of-line chars. They are not sent unless you specified them in you write statement. But you do have to indicate how items are exasperated, unless the program does not require separation or delimiting of items.

      Please, I am not trying to talk down to you. But it seems like you want to write code at a low-level when you don't have to.

      Without knowing what program you use with VBA I have to just guess.
      To write one line with a number of fields and then finish with a end of line, hound would do it like this:

      Code: [Select]
      Write request$,  option$, daytime$, send$
      WrinteLN
      That is not real code, it shows items separated from northeaster and then an end of line given. In this dialectic the $ means i not a number, but a string. The commas may generate tabs or spaces. Again, that depends on the dialect. 

      I hope this is of some help. Pardon my grammer.

      Raven19528



        Hopeful
      • Thanked: 30
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 7
        Re: enter character recognized as character
        « Reply #4 on: January 24, 2012, 11:07:49 AM »
        Pardon my grammer.
        Yeah, it was getting rough near the end there.

        Again, we don't know for sure the language, which makes it difficult to tailor the response to help you specifically. In VBScript, if you are wanting one line of code to display multiple lines of output, you can use the carriage return to do so:
        Code: [Select]
        wscript.echo "This is how" & VBCRLF & "you can get" & VBCRLF & "multiple lines of text" & VBCRLF & "with one line of code" which would display
        Code: [Select]
        This is how
        you can get
        multiple lines of text
        with one line of code

        Running this strictly from the command line though, I recommend trying this, though I have no idea whether or not it will work.
        Code: [Select]
        im createissue --hostname=mks-psad-test --port=8002 --user=blabla --password=xxxxxx --type=issue --field=Summary="Summarize your requestdd" --field=Description="Describe your request" & VBCRLF & "new" & VBCRLF & "line" & VBCRLF & "again one" --field="Issue Type=Change Request" --field="Project=/Tool_Support" --field="System Element"=89462 --field="Stakeholder Reference"=blabla
        "All things that are
        Are with more spirit chased than enjoy'd" -Shakespeare

        Squashman



          Specialist
        • Thanked: 134
        • Experience: Experienced
        • OS: Other
        Re: enter character recognized as character
        « Reply #5 on: January 24, 2012, 12:20:40 PM »
        I hope this is of some help. Pardon my grammer.

        I will pardon your grammar but I refuse to pardon your spelling of grammar.  :D

        Salmon Trout

        • Guest
        Re: enter character recognized as character
        « Reply #6 on: January 24, 2012, 01:13:40 PM »
        im createissue --hostname=mks-psad-test --port=8002 --user=blabla --password=xxxxxx --type=issue --field=Summary="Summarize your requestdd" --field=Description="Describe your request

        This looks like MKS Integrity Manager which...

        Quote
        [...] provides a command line interface (CLI) to manage users, groups, and permissions; and issues. Unlike Source Integrity Enterprise Edition, the Integrity Manager CLI does not yet provide the same functionality as the graphical user interface (GUI) or Web interface, and only a few command line interface commands support GUI interaction. At this time, the command line interface provides basic Integrity Manager functionality. For complete functionality, use the graphical user interface or Web interface.

        Quote
        im createissue [--addAttachment=value] [--addRelationships=value]
        [--type=value] [--field=value] [--hostname=server] [--port=number]
        [--password=password] [--user=name] [(-?|--usage)]
        [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]adorn]
        [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]]

        Really you need to consult the MKS Integrity documentation and see if the app even supports embedded newlines in the relevant parameter string. If this is your job, to write front ends for MKS Integrity, how come you do not have access to all the relevant documentation?

        Unless the Integrity app supports some kind of embeeded newline indicator, e.g. \n I can't see how you are going to do this.








        « Last Edit: January 24, 2012, 02:18:16 PM by Salmon Trout »

        Salmon Trout

        • Guest
        Re: enter character recognized as character
        « Reply #7 on: January 24, 2012, 02:03:52 PM »
        But you do have to indicate how items are exasperated

        I have seldom read such profoundly wise advice.

        Salmon Trout

        • Guest
        Re: enter character recognized as character
        « Reply #8 on: January 24, 2012, 02:29:02 PM »
        some kind of embeeded newline indicator

        some kind of embedded newline indicator