How to do next thing immediately without waiting loading ?

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
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
newmember
Posts: 20
Joined: Mon Mar 17, 2014 7:01 am

How to do next thing immediately without waiting loading ?

Post by newmember » Thu Dec 11, 2014 10:57 am

0 down vote favorite


I have imacros code like this:

VERSION BUILD=8871104 RECORDER=FX
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 0
SET !TIMEOUT 0
TAB T=1
URL GOTO=https://www.youtube.com/watch?v=Qg-nIAnUZwE
TAB OPEN
TAB T=2
URL GOTO=https://www.youtube.com/watch?v=BXVeHWN9Xuw
TAB OPEN
TAB T=3
URL GOTO=https://www.youtube.com/watch?v=cZPYWcAg86Q
TAB OPEN
TAB T=4
URL GOTO=https://www.youtube.com/watch?v=kABkuIF7zWg

The above code work but it is slow because it had to wait to load page before do next tab. So, there is any way to do next tab IMMEDIATELY without waiting load page ? I use timeout but it doesn't work. I am use latest firefox and imacros. Thank you very much !
chivracq
Posts: 9378
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to do next thing immediately without waiting loading

Post by chivracq » Thu Dec 11, 2014 6:10 pm

newmember wrote:0 down vote favorite

I have imacros code like this:

Code: Select all

VERSION BUILD=8871104 RECORDER=FX
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 0
SET !TIMEOUT 0
TAB T=1
URL GOTO=https://www.youtube.com/watch?v=Qg-nIAnUZwE
TAB OPEN
TAB T=2
URL GOTO=https://www.youtube.com/watch?v=BXVeHWN9Xuw
TAB OPEN
TAB T=3
URL GOTO=https://www.youtube.com/watch?v=cZPYWcAg86Q
TAB OPEN
TAB T=4
URL GOTO=https://www.youtube.com/watch?v=kABkuIF7zWg
The above code work but it is slow because it had to wait to load page before do next tab. So, there is any way to do next tab IMMEDIATELY without waiting load page ? I use timeout but it doesn't work. I am use latest firefox and imacros. Thank you very much !
FCIM...! :mrgreen: ("I (am...?) use latest firefox and imacros." is always very vague and won't mean anything especially for sbd reading your Thread in a few weeks/months/years...)

Using '!TIMEOUT_PAGE' is correct I would think but its Value cannot be set to "0" I think (it defaults then back to the Default Value, I think I tested/noticed once...), it needs to be at least "1"...
- (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...
additional001
Posts: 175
Joined: Sun Jul 06, 2008 3:24 am

Re: How to do next thing immediately without waiting loading

Post by additional001 » Thu Dec 11, 2014 7:03 pm

I think what you are looking for is here http://wiki.imacros.net/!TIMEOUT_STEP

Tweaking !TIMEOUT_PAGE is also a good idea. I like a value of about 30 (60 is default). If you just change !TIMEOUT_PAGE you will also change your !TIMEOUT_STEP as it is by default 1/10 of the timeout page variable. IE the defaults give you 60 sec page time out with a 6 second wait on each step.

I may be wrong here but in my experience !TIMEOUT_PAGE seems to stay persistent throughout the whole of a script while the step variable only persists for one step.

Setting !TIMEOUT_STEP 1 makes a step execute very fast. I use them for EXTRACT lines.

Small snippet of .js code to show how I use it

Code: Select all

SBHome = "CODE:" 
SBHome += "SET !ERRORIGNORE YES" + nL
SBHome += "TAB T=1" + nL
SBHome += "URL GOTO=www.swagbucks.com" + nL
SBHome += "SET !TIMEOUT_STEP 1" + nL
SBHome += "TAG POS=1 TYPE=A ATTR=HREF:/p/login&&ID:sbGlobalNavLoginBtn EXTRACT=HREF" + nL
SBHome += "SET !TIMEOUT_STEP 1" + nL
SBHome += "TAG POS=1 TYPE=SPAN ATTR=TXT:Daily<SP>Goal EXTRACT=TXT"

iimPlay(SBHome)
chivracq
Posts: 9378
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to do next thing immediately without waiting loading

Post by chivracq » Thu Dec 11, 2014 7:13 pm

chivracq wrote:Using '!TIMEOUT_PAGE' is correct I would think but its Value cannot be set to "0" I think (it defaults then back to the Default Value, I think I tested/noticed once...), it needs to be at least "1"...
Hum, after seeing 'Additional001''s Post, yep, I read the original Script too quickly with the 2 '!TIMEOUT*' Statements, I took for granted that the second one was '!TIMEOUT_STEP' (which could be set to 0 or 1) as '!TIMEOUT_PAGE' and '!TIMEOUT' are the same Command and it's useless to have the same Command twice in a row...
- (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...
newmember
Posts: 20
Joined: Mon Mar 17, 2014 7:01 am

Re: How to do next thing immediately without waiting loading

Post by newmember » Fri Dec 12, 2014 2:57 am

Thank you for helping me, chivracq and additional001 !
Post Reply