I will execute a set of instructions and remember 2 pieces of information.When that process completes those 2 pieces of information have changed. I will then execute the same set of instructions and put back the original 2 pieces of information.
How can I remember those 2 pieces of information from the first pass?
Place two text items in memory for later use.
Moderators: Dorian (MJT support), JRL
- CyberCitizen
- Automation Wizard
- Posts: 723
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- CyberCitizen
- Automation Wizard
- Posts: 723
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Hope this helps
What you can do is capture the text in the clipboard and assign it to a variable. This can be two different variables or if you know what text it needs to be you could do something like
Let>vStoredTXT1=Test Info 1
Let>vStoredTXT2=Test Info 2
Or something like this.
Send commands etc to copy text.
GetClipboard>vStoredTXT1
Send some more commands etc to copy text.
GetClipboard>vStoredTXT2
MDL>%vStoredTXT1% %CRLF% %vStoredTXT2%
Please note this was written by hand on a phone at 1:00 in the morning. Used as a guide or as a place to start.
Let>vStoredTXT1=Test Info 1
Let>vStoredTXT2=Test Info 2
Or something like this.
Send commands etc to copy text.
GetClipboard>vStoredTXT1
Send some more commands etc to copy text.
GetClipboard>vStoredTXT2
MDL>%vStoredTXT1% %CRLF% %vStoredTXT2%
Please note this was written by hand on a phone at 1:00 in the morning. Used as a guide or as a place to start.
FIREFIGHTER
Re: Place two text items in memory for later use.
This may go beyond what you need, but I recently discovered array variables, which I think are fantastic for storing multiple values.
I have a script that needs to store a variable number of variables depending on how it's being used. I need it to start at the top of a column in an Excel worksheet and copy a specified number of beneath it. For example, if the first value is in A1 and there are 10 values in that column, I would have it grab A1-A10
Instead of creating Variable1, Variable2... Variable10, I have a loop that looks like this:
View Snippet Page
numVariables is the number of cells I need to grab
copyMoveDown is a subroutine that copies the value of the current cell into a variable named "temp" and presses the down button to move to the next cell in Excel.
If numVariables = 10, this loop would produce the following at the end:
Steps[1] = value of A1
Steps[2] = value of A2
...
Steps[10] = value of A10
This is really helpful because I can easily reference these values in later loops by using Steps[%counter%] again.
I have a script that needs to store a variable number of variables depending on how it's being used. I need it to start at the top of a column in an Excel worksheet and copy a specified number of beneath it. For example, if the first value is in A1 and there are 10 values in that column, I would have it grab A1-A10
Instead of creating Variable1, Variable2... Variable10, I have a loop that looks like this:
View Snippet Page
numVariables is the number of cells I need to grab
copyMoveDown is a subroutine that copies the value of the current cell into a variable named "temp" and presses the down button to move to the next cell in Excel.
If numVariables = 10, this loop would produce the following at the end:
Steps[1] = value of A1
Steps[2] = value of A2
...
Steps[10] = value of A10
This is really helpful because I can easily reference these values in later loops by using Steps[%counter%] again.