December 11, 2024, 09:10:41 PM

News:

IWBasic runs in Windows 11!


Fake INPUT out

Started by billhsln, December 20, 2015, 07:49:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

I have a need to put text on the screen and then allowing me to use the arrow keys to move around in that text. When I get to a certain point, I want to enter a / and have it pass that along with the original text back thru the INPUT.

Example:

5744 AnyStreet St/AnyCity, St  zipzz

Where the only character I actually enter is the /.  I am doing this to split lines on variable address's.  Some address's have suites and other info that is part of the address and not city, state and zip.  Which is why it is easier for me to fix the 3 or 4 of these that I find by hand rather than trying to figure out some way of making the program do it.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

you are saying "put text on the screen" and you are saying "text back thru the INPUT"

since you are in the console section I assume this is a console program and we're talking about the real INPUT statement?
My question is; is this some sort of utility for you to fix entries outside the regular program?
And if so, why does it need to be a console program?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

I read a tab delimited file (Amazon Orders in their weird format) and convert it to a fixed format file for input into an AS/400.  The only output I do is for counts and errors.  This is an error to me.  I have a Care Of and Address fields, which can only be 30 characters.  But some orders come thru with more than 30 chars on an address line.  So what I am doing is splitting that line between care of and address.  Since I only get a few of these, there is no reason to program for it, it is easier to just let me fix it manually.

Bill
When all else fails, get a bigger hammer.

LarryMc

I guess I just having trouble understanding how the 'error' entry gets in an INPUT statement in the first place for you to want it to be automatically be changed.

An INPUT statement won't let you do what you want to do.
You can do it with a dialog and an edit control that is sub-classed so it will only recognized the '/' key and make it so it will respond like the 'enter' key was hit after changing the fields and they automatically close the dialog.

That's the only way I can see doing it based upon what I'm understanding.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library