What happens to value stored in a variable in imacros? - imacros

I wanted to know that is value stored in a iMacros variable gets removed when loop ins started again, and if the value is removed then is there any way to store a value and use it again and again over multiple loops and updating its value.
Thanks

Here is an example with the ‘startTime’ variable which demonstrates that ‘iMacros’ stores its value and updates with every loop.
SET startLoop 1
SET !LOOP {{startLoop}}
SET startTime EVAL("('{{!LOOP}}' == '{{startLoop}}') ? '{{!NOW:yymmdd_hhnnss}}' : '{{startTime}}';")
PROMPT {{startTime}}
Or do you want to store a value between several pressing the ‘Play (Loop)’ button?

Related

How to check if EEPROM.read(0) contains a value

I would like to read a data from EEPROM.read(0); on my esp32. But before reading I would like to check if there is a value at 0 position and if not, take the default predefined one.
I did some searching, but I could not found what EEPROM.read(0); returns if there is not a value to write an if statement.

I have 2 sets of data mapped to each other. Is there a way to based on the value of another variable check that corresponding variable for its value?

So I have 64 variables called S0O through S63O. These are corresponding to the chess squares on a board. Now I have a function that walks through and marks each of these variables as TRUE(Occupied) or FALSE(Empty). Now i'm trying to take a variable(BP1 aka Black Pawn 1) which has a value 0 through 63 and I want to check if the square in front of it is empty so (BP1 - 8). I was recommended to try a unordered map which I tried but I could not find a way to take a variable value being a number and run ti though the Keys to find the output I am looking for. I am open to any ideas.
As François Andrieux pointed out if I use an array to put all these in a grid I can move about and edit specific "squares" inside of the board. So if my input is stored in variable BP1P = 48; Then I can take this value and check for it occupied with something like ([BP1P-8] == 'O').

Is there any way to get value from specified position From List variable Automation Anywhere?

I want to get a value from particular location from list variable. Right now what i see is it only uses loop to iterate over in Automation anywhere.
SO is there any way to get value from a specified location?
For now, this is your only option to get a value from a specific location/index on a list.
I hope that Automation Anywhere includes a command/option to do that in the next release(s).
Unfortunately you'll have to loop over the list, and have a counter variable to get the item on the position you want.
After that you exit the loop. Not very efficient, but I just had to do it today :(
You can directly access the list elements, you can modify and delete them directly much easier and quicker in G1ANT software, even without executing the loop.
Here is the sample code:
♥list = Adam❚Eva❚John❚Mary
♥list⟦1⟧ = Peter
dialog ♥list
♥list⟦⟧ = 200
♥list⟦5⟧ = ♥list⟦5⟧+10
dialog ♥list
Enjoy!

Passing variable from one iMacros to another?

I want to create a script, where the users inputs in the beginning something, and this variable input should be used for the rest of the loop (without asking for input again).
The best way i could come up with was to create two iMacros, one which asks for the input, and the other one who uses the input and loops it.
The major problem is, i can't save the input in Downloads/Datasource because the same iMacros should be used with other firefox instances. Which means, if the user inputs A on the first instance and on the next B then after the second loop of both all instances are using the varaible B. And i can't make multiple scripts since the user should have the ability to use unlimited times this script.
You can save easy the input in ‘Downloads/Datasource’. However make your second macro read this input only once:
SET !LOOP 1
SET !DATASOURCE inputs.csv
SET input EVAL("('{{!LOOP}}' == 1) ? '{{!COL1}}' : '{{input}}';")
' your further code here '

Comparing occurances on two observations on SAS

Hi I have a data treatment problem on SAS. I have transaction history for every customer and i have also created a Customer_Tranx_Number. In addition to this i have flagged every transaction with a 1/0 occurrence of an event flag.
Now I want to find in which observation does the event flag changes from 1 to 0 and flag the event which shows first "0" after "1". Also i have to do this flag creation for every customer separately
How can I code this on SAS?
I tried to illustrate problem on the following link, in advance thank yo very much for all your help.
http://zeybekomer.blogspot.com.tr/2015/10/blog-post_12.html
Regards
DATA NEW;
SET YOURS;
IF LAG1(CUST_ID)=CUST_ID AND LAG1(FLAG_1) != FLAG_1 THEN NEW_FLAG="FLAG=1";
RUN;
That code will check to see if the it is the same customer. Then check if current record flag is equal to the prior record flag for the "FLAG_1" variable.
You can get more specific if needed with specifying additional boolean logic such as when prior value of flag_1 is 1 and current is 0, then define ect....