hh:mm:ss

Discussions and Tech Support related to the iMacros Google Chrome extension.

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.

hh:mm:ss

by eladiv on Sun Dec 04, 2016 5:39 am

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 ?
eladiv
 
Posts: 3
Joined: Sun Dec 04, 2016 5:34 am

Re: hh:mm:ss

by chivracq on Sun Dec 04, 2016 1: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)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: 6304
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: hh:mm:ss

by eladiv on Thu Dec 08, 2016 5:44 am

So how can i make that line lunch at, let say 18:32:12
eladiv
 
Posts: 3
Joined: Sun Dec 04, 2016 5:34 am

Re: hh:mm:ss

by chivracq on Thu Dec 08, 2016 9:43 am

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)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: 6304
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: hh:mm:ss

by eladiv on Thu Dec 08, 2016 11:09 pm

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
eladiv
 
Posts: 3
Joined: Sun Dec 04, 2016 5:34 am

Re: hh:mm:ss

by iimfun on Mon Dec 12, 2016 1: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.
iimfun
 
Posts: 225
Joined: Tue Jul 19, 2016 6:06 am

Re: hh:mm:ss

by chivracq on Mon Dec 12, 2016 6:52 pm

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)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: 6304
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: hh:mm:ss

by DavidinUSA on Wed Dec 28, 2016 7:58 am

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 7:28 am

Re: hh:mm:ss

by DavidinUSA on Wed Dec 28, 2016 8:33 am

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 7:28 am

Re: hh:mm:ss

by DavidinUSA on Wed Dec 28, 2016 8:52 pm

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
DavidinUSA
 
Posts: 3
Joined: Wed Dec 28, 2016 7:28 am


Return to iMacros for Chrome

Who is online

Users browsing this forum: No registered users and 2 guests

-->