running a script whenever a page changes?
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
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
running a script whenever a page changes?
I made a script that works fine, but I want it to run whenever a certain part of one page changes to something specific.
Like having an infinite loop that checks the page for something and then runs another script?
If so, I'd love to know how to do this.
Thanks in advance.
Like having an infinite loop that checks the page for something and then runs another script?
If so, I'd love to know how to do this.
Thanks in advance.
Last edited by zwollner on Mon Jul 09, 2007 6:23 pm, edited 1 time in total.
- Tech Support
- Posts: 4948
- Joined: Tue Sep 20, 2005 7:25 pm
- Contact:
You can create a TAG command that clicks on the link that comes up when the game appears. Then you run this macro (basically only a macro with one line!) inside a loop until the TAG command finds the link. iimPlay will return a negative value until the link appears. Then you can start the second macro (that plays the game).
Thanks for the reply, but I tried that (I think i did it right) but when I run it, I get "Error# 801 in line:0, TAG not found" and then the loop i have running just stops. I need it to keep looping and checking for that TAG.
This is the main macro that I have looping:
and this is the "outwit-check"
This is the main macro that I have looping:
Code: Select all
i = iimPlay("check",60);
if (i >= 0) {
iimPlay("player",60);
};
and this is the "outwit-check"
Code: Select all
TAG POS=1 TYPE=A ATTR=ID:imInToggle
Last edited by zwollner on Mon Jul 09, 2007 6:24 pm, edited 1 time in total.
- Tech Support
- Posts: 4948
- Joined: Tue Sep 20, 2005 7:25 pm
- Contact:
You can use a huge timeout value (e. g. 60000 seconds) so the TAG command does not time out until the item appears. You can use SET !TIMEOUT 60000 for this.
Or you create a javascript that calls the TAG command in a loop and checks for the return value of the iimPlay command. If it is > 0 then the TAG command found the text => you can start the next macro.
Or you create a javascript that calls the TAG command in a loop and checks for the return value of the iimPlay command. If it is > 0 then the TAG command found the text => you can start the next macro.
- Tech Support
- Posts: 4948
- Joined: Tue Sep 20, 2005 7:25 pm
- Contact:
We knowSo no one know how to keep this from not erroring out when this TAG is not found:
Please see http://wiki.imacros.net/%21ERRORIGNORE