MrR wrote: ↑Mon Apr 01, 2019 7:38 am
Hi everyone,
I expose the easy part of the macro i want to create:
1. I need a macro that refresh a webpage and then submit a login form (already got it).
2. Once the webpage is refreshed click a span ( sadly that action is not recorded for IMacros... the span have an ID and a jsFunction onClick, if i can trigger it this will be ok as well )
The hard part:
1. The easy part needs to be in somekind of a loop, this action needs to be triggered everyday in a exact hour/datetime.
Extra. Some kind of random like from 0 to 10, to put it in the minutes of the hour/datetime.
What i have right now:
Code: Select all
VERSION BUILD=1005 RECORDER=CR
URL GOTO=http://website/
FRAME F=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:intro ATTR=ID:user CONTENT=USERNAME
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:intro ATTR=ID:clau CONTENT=PASSWORD
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:intro ATTR=*
Thanks for reading

Hope you can help me.
FCIM...!

(Read my Sig...)
=> iMacros for CR v10.0.5, 'Free'/'PE'...?, CR73...?, OS...?
Your Thread has supposedly nothing specific to the 'iMacros for CR' Sub-Forum, especially if you don't mention your FCI...

, try to select the/a "correct" Sub-Forum when you open a Thread... (=> Would have been the 'General' Sub-Forum for this current Thread... No need to duplicate now...)
1- About the 'SPAN' Element generated from some JS Script, not visible from your Script, no URL posted, then I can't have a look, but I would say try using the 'EVENT' Mode to see if that Mode is able to record that Action...
2- About the "... triggered everyday in a exact hour/datetime." + :
This is(/was) "usually/normally" achieved using the 'Command Line Syntax' (imacros://run/?m=) and launching your Macro from a '.BAT' File from your OS Task Scheduler, + if you are on Win_x32/_x64 as OS, the Delayed Random Minutes is also standard Functionality from the Win Task Scheduler, at least on Win10_x64 that I use now, but I think it was also already the case on Win7_x64.
BUT...!, and there is a big "BUT"...!, that 'Command Line Syntax' is "now" (currently) not supported anymore in iMacros for CR and FF v10.0.x. There is some kind of a "cumbersome"
Workaround where the Macro already needs to be embedded into some local HTML Page..., but that will still work with the scheduled part from the OS Task Scheduler.
Another "BUT" is that you mention that your Script will also need to loop. That 'Looping' Functionality has always been "incompatible" with the 'Command Line Interface' (CLI) and Scripts launched from a '.BAT' File, even if there is some Workaround (hum, 2 actually..., oh...! 3 actually, ah-ah...!, and the 3rd one might work for you...!), the 1st Workaround is a Trick that relies on a Bug and that I don't want to "advertize" too much but that can be found if you search the Forum a bit, but I'm not sure if it (still) works in your v10.0.5 for CR Version, and I'm actually not even sure if it has ever worked on CR, as I don't use this Browser myself...
One Workaround that would work (for the Looping part), would be if you can launch your Macro "manually" everyday (in Loop Mode) from the iMacros Side Panel, where for '!LOOP'=1, you would have included a Conditional 'WAIT' until your specific Time of the Day that you want your Macro to "really" start to work. (Several Threads about "conditional+wait" if you search the Forum...)
Same Method can also be used for your extra few Random Minutes.
About the 2 (other) Workarounds I mentioned in my "Another BUT..." previous Paragraph, it's possible to have a Macro call itself (indefinitely) using the same 'imacros://run/?m=' Syntax from the CLI, this time from the 'URL GOTO' Command, even if that Syntax was never "officially" supported in any Version, but it works/worked...

BUT it doesn't work anymore in v10.0.x for CR+FF, ah-ah...!
But what would work I think

(and that's the 3rd Workaround), would be that your embedded Macro launched from some local HTML Page could very well simply call and reload this very same local HTML Page at the end of the Macro, and I would then expect your Macro to go looping indefinitely, and that could also be "interesting" for Users using the 'Free' Version, as Looping is limited to 100 Loops in that Version.
OK..., I hope you "understand" the many Options I mentioned, none is very straightforward, the easiest one I would think is the manual Launch of your Macro in Loop Mode with a Conditional ''WAIT' for the 1st Loop. Good luck and post your Final Implementation/Script once you've got it to work...

- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...