Powershell replace text with user's input - automation

sorry for this question but i pretty new to all this (All i know searching in the web how to do it).
I want to automate a process that i do all the time in my work, i wanted to create a script that prompt multiples input boxes to the user and with put those inputs in some part of a text. Could you please help me? I'm not figuring out how to do it.
Here is an example of the text:
Hello my name is VALUE1, I'm from VALUE2 and i worked in VALUE3.
I want the user to be prompted to input those values and after that values be added to the text (I will send that text by email with another code i already did).
Is there a way to do that?
Thanks for all!

Related

VB.net - Search the whole registry for a value only?

So I'm trying to make a programm that searches the WHOLE registry for one specific value WITHOUT declaring the location of the key. It should just search for the value and print it in a msg box but the only way I found was to declare the location and search for the key then. The code should also take the value of a text box and search for this specific value. I don't really know what I could possible do next so I'm trying to get some help from you guys. If you have snippets, articels or smth like that pls send it 2 me :)

vb.net or PS script to past value to a program form...

I have an older program I think was developed/complied using C++ that tracks sellable items we have. We enabled an option in the programs preferences that allows us to use an alternate sort field for reporting and inquiries. This field can contain any alpha/numeric value, but cannot be 'Blank' NULL.
However, when we enabled this feature, and we realize now we can’t un-enable it. Each item records (14,000+) now contain a "blank" NULL value for this field. At this point none of our reports will run and we get an error indicating: "Alternate Sort value can't not be NULL" So it looks like I will need to manually enter a value in the 'blank' NULL field.
I have a text file with the values for each record in the same order as they are displayed on the entry grid in the program. The database is propitiatory and there are no db tools provided to us that will allow us to import the values directly.
Does anyone know of a way to use vb.net or a PS script to basically read a value from a text file and then paste it where the cursor is on the screen and then send an {ENTER Key}, and then repeat the process?
Thanks

How do I fill out fillable PDF Form fields using 4gl?

I have a PDF form that I'm filling out with data using progress-4gl. To date, I've been only filling in text fields using the following syntax:
put stream stream1 unform
"^global CHX_SINGLE_CE_PLAN3" skip(0)
"X" skip
CHX_SINGLE_CE_PLAN3 is the field name...
This code works when dealing with text fields but I'm trying to check a box instead of fill in a text field. I cannot find any documentation on this. Is checking a box on a fillable pdf form even possible with 4gl?
As far as I remember PDF Include has support for filling fillable forms. Whilst it's probably a bit over the top in terms of what you want to achieve, it's an open source project and so you may well find the answer to your question within the code itself.
Here's a link to the project page: http://www.oehive.org/pdfinclude
I discovered the answer, which I thought I had already tried before asking this question. The answer is you need to pass the value "Yes" (with capital "Y") in order to check the checkbox. The correct code in this instance is:
put stream stream1 unform
"^global CHX_SINGLE_CE_PLAN3" skip(0)
"Yes" skip
I believe this is the case no matter which language you're using

Creating a self test program with save/import functions (images, description inside)

I'm basically trying to create a program that will allow me to use textboxes to input questions and associated answers to test myself. Mostly, I just want to practice some things I've been learning for vb.net while taking an extra step forward.
Here's a mockup:
Any tips on how to do this? What I'm especially not sure about is how to have the textfile save/import work with adding back into comboboxes and making sure the correct questions and answers are associated with one another. I was thinking also that I could have some sort of check when I import a save file that shows me which questions and answers refer to one another
Update on form design:
Some things I'm trying to practice:
Using arrays
Saving/Opening files (text files in this)- in order to import into program
importing into program
Using the progress bar
Having a way to undo entries
Randomizing sort order in the combo box
Maintaining references between variables (like which answer
corresponds with which question) regardless of sort order or using
the undo function
Some posts in stackoverflow I'm thinking of using as reference:
Compare String with Strings in array
Best way to associate two strings of text in VB.NET
Array to combo box?
Update: Trying to be more specific on my question. Basically, I'm trying to use a list to account for all the inputted questions and answers, however I've only used really basic arrays before, like:
val(1) = "test"
val(2) = "this"
val(3) = "string"
Or the kind where you use a For x to z loop. Based on some stackoverflow posts I've gotten to the point where the code works in that (I think?) the list is updated and the combobox for questions and answers reflect what is on the list. However, I can't connect the two so that I can select things in the comboboxes and check if they are correct.
In terms of saving as a text file. I figured it would be simpler. Basically, have it output sort of like
"question goes here" ; "answer goes here"
"next question goes here" ; "answer goes here"
and so on. Then I can use the semicolon as reference in the code when importing. I've never done it before, but it's generally what I do for Microsoft Access or Excel text imports so I figured it was possible.
Code that I have so far (reddit post link): http://redd.it/2716tw

Excel Stored Procedure with Excel

I have stored proc Im pulling in to excel but to get it to Run I have to enter my text exec roc 'Name' I need it to be able to have someone else thats running it be able to enter a name as they refresh the data. I dont know VBA at all and am looking for help.
I don't completely understand your question but if my assumption is correct... you want to have a cell where someone can enter some sort of name, where you can then use their input to do some other operations.
To start, you would want to grab a string variable (by grab I mean create)
Example:
Dim strName As String
Then you would want to be able to read a specific cell.... In the next example the cell will be A2
Example:
strName = Range("Sheet1!A2").Value
If you named the first sheet something different use that name. If the user inputs a name into that cell you can then use it later to do calculations or anything you want.
If you are not using VBA code then what are you using?
If using MS Query, try changing the SQL text to
{CALL roc(?)}
and IIRC this should prompt the user to enter text for the parameter value.