hh:mm:ss

Discussions and Tech Support specific to the iMacros for Chrome extension.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
eladiv
Posts: 3
Joined: Sun Dec 04, 2016 12:34 pm

hh:mm:ss

Post by eladiv » Sun Dec 04, 2016 12:39 pm

I have this line :TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:command-data-form ATTR=ID:troop_confirm_go , can i make it wait until a specific time before execute it ?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: hh:mm:ss

Post by chivracq » Sun Dec 04, 2016 8:27 pm

eladiv wrote:I have this line :

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:command-data-form ATTR=ID:troop_confirm_go
, can i make it wait until a specific time before execute it ?
CIM...! :mrgreen: (Read my Sig...)
Hum, and you post in the 'iMacros for CR' Sub-Forum though I don't think your Qt will have anything specific to (only) CR, maybe to your OS once you'll have mentioned your FCI..., but OK, no need to duplicate your Thread, it will be moved if needed, but try to select the correct Sub-Forum when you open a Thread...

For your Qt, yep, use a Conditional 'WAIT' based on '!NOW'...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
eladiv
Posts: 3
Joined: Sun Dec 04, 2016 12:34 pm

Re: hh:mm:ss

Post by eladiv » Thu Dec 08, 2016 12:44 pm

So how can i make that line lunch at, let say 18:32:12
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: hh:mm:ss

Post by chivracq » Thu Dec 08, 2016 4:43 pm

eladiv wrote:So how can i make that line lunch at, let say 18:32:12
Hum..., you write freaky greedy Scripts, scary...!! :shock:

But OK, never mind, you didn't read/understand my previous Reply... :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
eladiv
Posts: 3
Joined: Sun Dec 04, 2016 12:34 pm

Re: hh:mm:ss

Post by eladiv » Fri Dec 09, 2016 6:09 am

I read it and i was trying to solve my issue,but i failed,
WAIT is not doing precisely what i want, !NOW is variable that holds the curent date and time, i dont know how to use it
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: hh:mm:ss

Post by iimfun » Mon Dec 12, 2016 8:17 am

I feel some doubts as to " a Conditional 'WAIT' based on '!NOW' ". My suggestion is something like the following macro

Code: Select all

SET exeTime "18:32:12"

SET exePos EVAL("var t = Date().toString().match(/\d+:\d+:\d+/); (t >= '{{exeTime}}') ? '1' : '0';")
SET !ERRORIGNORE YES
TAG POS={{exePos}} TYPE=INPUT:SUBMIT FORM=ID:command-data-form ATTR=ID:troop_confirm_go
SET !ERRORIGNORE NO

SET error EVAL("{{exePos}} ? MacroError('Launched! ' + Date()) : '';")
WAIT SECONDS=1
Try to play it in "infinite" loop mode.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: hh:mm:ss

Post by chivracq » Tue Dec 13, 2016 1:52 am

iimfun wrote:I feel some doubts as to " a Conditional 'WAIT' based on '!NOW' ". My suggestion is something like the following macro

Code: Select all

SET exeTime "18:32:12"

SET exePos EVAL("var t = Date().toString().match(/\d+:\d+:\d+/); (t >= '{{exeTime}}') ? '1' : '0';")
SET !ERRORIGNORE YES
TAG POS={{exePos}} TYPE=INPUT:SUBMIT FORM=ID:command-data-form ATTR=ID:troop_confirm_go
SET !ERRORIGNORE NO

SET error EVAL("{{exePos}} ? MacroError('Launched! ' + Date()) : '';")
WAIT SECONDS=1
Try to play it in "infinite" loop mode.
Ah-ah...!, don't worry, my "Conditional 'WAIT' based on '!NOW'" works fine, I use it myself, and it only needs 1 Run or 2-3 or max 5 Loops for "recalibration" depending on how long from before it was launched and won't be clogging 50% CPU through the Browser after 1h running like your Solution, ah-ah...!) but I won't elaborate on it as OP didn't answer my Qt's and is not using the Forum correctly according to the Forum Rules and my "Criteria"... :roll:

Even if hum..., your Solution (that OP probably won't understand at all I guess, ah-ah...!) has stg interesting, even for me as I've often been struggling with Dates and Times, hum, "23:59:59" will be problematic I reckon, but I already have a Workaround for that...
Hum..., and you could have mentioned tuning '!TIMEOUT_STEP', otherwise the 'WAIT' Statement has little use and "23:59:53" becomes already problematic... :idea:

>>>

But nice to see you back anyway @iimfun, some (more) "Interesting" Thread that took place in the 2 weeks that you were away (from the Forum) and that could use your "Expertise" (for some 'REGEXP' Expression, "beurk, notmypieceofcake" like I said...!) is this one, even if I provided some other Solution and the User disappointingly is not following up at all, but it would still be interesting for the Forum Community to have both Solutions, I think... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
DavidinUSA
Posts: 3
Joined: Wed Dec 28, 2016 2:28 pm

Re: hh:mm:ss

Post by DavidinUSA » Wed Dec 28, 2016 2:58 pm

Hi Everyone,

I am facing the same issue. I want the macro to pause until a certain clock time occurs, then proceed.
I am using Windows 10 Home Version 1607 Build 14393.576. I am using iMacros for Firefox VERSION BUILD=9030808. I am using Firefox version 50.1.0. This is the only post I could find on this topic. I am also a Newb...sorry.

I was thinking something this:

1) SET exeTime = 02:16:30.3 |create a variable to set my execution time in whatever would be the correct syntax
2) delayvariable = exeTime - !NOW |creates variable that sets the delay in seconds. I really dont know how to make this part work.
3) WAIT SECONDS = delayvariable |executes the wait command in seconds based on the delayvariable. can the wait command use variables?

Am I on the right track with this? Can anyone verify that this logic will work these commands and help me with the command syntax?

thanks!
DavidinUSA
Posts: 3
Joined: Wed Dec 28, 2016 2:28 pm

Re: hh:mm:ss

Post by DavidinUSA » Wed Dec 28, 2016 3:33 pm

One other point on this for context.

I would likely use this macro for about 5-20 minutes maximum. I dont see a scenario where this would run for 24 hours or anything like that. I might also use this macro in 5 firefox windows that are running at the same time on the same PC.

thanks for any help!
DavidinUSA
Posts: 3
Joined: Wed Dec 28, 2016 2:28 pm

Re: hh:mm:ss

Post by DavidinUSA » Thu Dec 29, 2016 3:52 am

Sorry to mess up the forums but I was able to find my own answer now thanks to a previous post I found from Chivracq. Chivracq is the man!!
I was able to use a !TIMEOUT_STEP as the page I am working with had a time clock on it to reference. This worked fantastic for me. Thanks Chivracq for your work on here.
The post i am referring to is here for anyone else. I found it through google search actually and not iMacros forum search.
http://forum.imacros.net/viewtopic.php?f=11&t=25756
Post Reply