1.

Solve : enter character recognized as character?

Answer»

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 signShow some code.  The enter key is supposed to finish a user input.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?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$
WrinteLNThat 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. Quote from: Geek-9pm on January 23, 2012, 02:02:56 PM

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 Quote from: Geek-9pm on January 23, 2012, 02:02:56 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.  Quote from: mibushk on January 23, 2012, 03:47:58 AM
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.








Quote from: Geek-9pm on January 23, 2012, 02:02:56 PM
But you do have to indicate how items are exasperated

I have seldom read such profoundly wise advice.
Quote from: Salmon Trout on January 24, 2012, 01:13:40 PM
some kind of embeeded newline indicator

some kind of embedded newline indicator



Discussion

No Comment Found