!now and variable

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

!now and variable

by llav on Wed Jul 05, 2017 2:18 am

Hello everyone,

I would like first to thanks iMacros team, this is an amazing add-on. I am currently encoutering some difficulties with a macro. Let me explain you. I have a calendar field I want to fill. I have this line which works great

TAG POS=1 TYPE=A ATTR=TXT:5 --> put the 05/07/2017 in my field. However, I would like to make this number dynamic. That's when I thought about using the !NOW fonction.

I try to add those line

SET !VAR1 {{!NOW:dd}}
TAG POS=1 TYPE=A ATTR=TXT: !VAR1

But this doesn't work and I have no more idea right now. can you give me some input to help me.

Thanks guys !
llav
 
Posts: 2
Joined: Wed Jul 05, 2017 2:08 am

Re: !now and variable

by chivracq on Wed Jul 05, 2017 7:14 am

llav wrote:Hello everyone,

I would like first to thanks iMacros team, this is an amazing add-on. I am currently encoutering some difficulties with a macro. Let me explain you. I have a calendar field I want to fill. I have this line which works great

Code: Select all
TAG POS=1 TYPE=A ATTR=TXT:5
--> put the 05/07/2017 in my field. However, I would like to make this number dynamic. That's when I thought about using the !NOW fonction.

I try to add those line
Code: Select all
SET !VAR1 {{!NOW:dd}}
TAG POS=1 TYPE=A ATTR=TXT: !VAR1


But this doesn't work and I have no more idea right now. can you give me some input to help me.

Thanks guys !

CIM...! :mrgreen:

Your use of '!NOW' is correct but check the Wiki (or find any Example on the Forum) on how to use Variables... You don't even need '!VAR1' as a Temp Var, you could use '!NOW' directly in the 'TAG' Statement...
And you have an extra Space in the 'ATTR' Parameter...

You might encounter some "Problems" with [01-09] btw if your Site expects [1-9] (without the leading "0").
=> You will need to remove that leading "0" with 'EVAL()'...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: !now and variable

by llav on Wed Jul 05, 2017 8:07 am

Thanks !

And sorry for the CIM !

Indeed I didn't think about the fact the page wouldn't accept the leading 0 ! I found another way to enter my data using the simple fonction !Now.

You brought me on the right path !

And the Eval wiki page will give me extra help (I ll probably need to work on the day of the input), so.... thanks for that too :D
llav
 
Posts: 2
Joined: Wed Jul 05, 2017 2:08 am

Re: !now and variable

by chivracq on Wed Jul 05, 2017 8:50 am

llav wrote:Thanks !

And sorry for the CIM !

Indeed I didn't think about the fact the page wouldn't accept the leading 0 ! I found another way to enter my data using the simple fonction !Now.

You brought me on the right path !

And the Eval wiki page will give me extra help (I ll probably need to work on the day of the input), so.... thanks for that too :D

Hum, "sorry for the CIM" but you still don't mention your FCI... I won't react next time you open a Thread if you don't mention your FCI each time...
Many Commands are not implemented for all Browsers/Versions and I simply usually don't even read the Qt is that Info is not mentioned...

And hum, "I found another way...", very nice but nicer would be if you shared your Solution to make this Thread useful for other Users as well... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 9 guests

-->