Repeating a click on webpage button
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
-
- Posts: 5
- Joined: Thu Mar 09, 2017 1:48 am
Repeating a click on webpage button
Hi
I am trying to get the following macro to play on a specific webpage to click a "book dates" button repeatedly . When played on that site, it clicks once then does not proceed to the the next clicks. I am using Chrome with version 8.44 imacro with Win 10
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
I am trying to get the following macro to play on a specific webpage to click a "book dates" button repeatedly . When played on that site, it clicks once then does not proceed to the the next clicks. I am using Chrome with version 8.44 imacro with Win 10
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
Re: Repeating a click on webpage button
Okay..., let me check..., hum found some interesting Info, but hum not enough, ask OP to read the Forum Rules...!Stevefourimacro wrote:Hi
I am trying to get the following macro to play on a specific webpage to click a "book dates" button repeatedly . When played on that site, it clicks once then does not proceed to the the next clicks. I am using Chrome with version 8.44 imacro with Win 10Code: Select all
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
=> (F)CIM...! Oops + Shocking + Shame...!
=> CR Version missing... + I didn't see any URL to have a look at the Site, pfff...!I am usingCode: Select all
Chrome with version 8.44 imacro with Win 10
(Ah-Ah-Ah...!, This must be an "Amateur", oops...! )
(We are missing the CR Version, CR56...?, and the URL for the Site, sorry but too much hassle for "generic" Advice if URL is not mentioned...)
>
Reply meant a bit as a joke, but @OP, reply "correctly" for all Qt's asked, I won't follow up otherwise...
(Your original OP is a bit useless @OP, pfffpfffppffffpfff...!)
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
-
- Posts: 5
- Joined: Thu Mar 09, 2017 1:48 am
Re: Repeating a click on webpage button
Chrome Version 56.0.2924.87 (64-bit)
Imacro 8.44
Win 10
Example of script:
VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.recreation.gov/switchBookin ... hosen=true
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
Problem: does not repeat click on button
Imacro 8.44
Win 10
Example of script:
VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.recreation.gov/switchBookin ... hosen=true
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
Problem: does not repeat click on button
Re: Repeating a click on webpage button
Stevefourimacro wrote:Example of script:Code: Select all
Chrome Version 56.0.2924.87 (64-bit) Imacro 8.44 Win 10
Problem: does not repeat click on buttonCode: Select all
VERSION BUILD=844 RECORDER=CR URL GOTO=https://www.recreation.gov/switchBookingAction.do?contractCode=NRSO&parkId=71925&siteId=81350&camparea=0&selStatus=aaaaaaa&matrixHasError=false&dateToday=09%2F09%2F2017¤tMaximumWindow=12&dateMinWindow=03%2F08%2F2017&dateMaxWindow=03%2F09%2F2018&arvdate=09%2F09%2F2017&arrivaldate=Sat+Sep+09+2017&lengthOfStay=7&dateChosen=true TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
OK, now we are "talking", posting a "fake" Post with all Info (which should have been included in OP), for me to have a look, no need to react...I am trying to get the following macro to play on a specific webpage to click a "book dates" button repeatedly . When played on that site, it clicks once then does not proceed to the the next clicks.
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Repeating a click on webpage button
Ah oops, but I guess I was or you were too late...:
=>Yes, mammy!, go for the "EXTREME DANGEROUS CLIFF CABINS"..., I don't play otherwise...! (Or I want a LOT of candy..., gniarf-gniarf...!)
Sounds kinky-kinky-dangerous, ouf-ouf...!!The date you have selected cannot be reserved at this time. Please try again later at 10:00 AM Mar 9 EST.
Find Other Cabins
MIDDLE DANGEROUS RIVER CABIN, AK
=>Yes, mammy!, go for the "EXTREME DANGEROUS CLIFF CABINS"..., I don't play otherwise...! (Or I want a LOT of candy..., gniarf-gniarf...!)
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
-
- Posts: 5
- Joined: Thu Mar 09, 2017 1:48 am
Re: Repeating a click on webpage button
No actually too early. The point is to have the macro click on the reserve button continuously until booking is availabie.
As I said, the macro does not do that. Clicks once than that is it.
Today the previous URL is not a good example. Try
https://www.recreation.gov/switchBookin ... hosen=true
See that the macro (TAGs) only clicks once, not repeatedly as I would want.
As I said, the macro does not do that. Clicks once than that is it.
Today the previous URL is not a good example. Try
https://www.recreation.gov/switchBookin ... hosen=true
See that the macro (TAGs) only clicks once, not repeatedly as I would want.
Re: Repeating a click on webpage button
Link works now indeed, but hum..., I've seen quite a few creepy Movies with such a "River Cabin", there are always ugly Monsters at night around such Cabins (and even in the water), are you sure you want to go there...!?, creepy-creepy...!Stevefourimacro wrote:No actually too early. The point is to have the macro click on the reserve button continuously until booking is availabie.
As I said, the macro does not do that. Clicks once than that is it.
Today the previous URL is not a good example. Try
https://www.recreation.gov/switchBookin ... hosen=true
See that the macro (TAGs) only clicks once, not repeatedly as I would want.
But OK, a bit more "seriously", I would think the easiest way for you is to loop your Script (with '!ERRORIGNORE'), with the 'URL GOTO' on the Page as I guess it won't refresh by itself and to "try" to click on the 'Book these Dates' Button which will only appear at some point... Is that correct...?
In order to click only once on this Button, you need to first check for its presence, then click on it and then using 'EVAL()' + 'MacroError()' to abort the Macro with stg like:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 1
TAB T=1
URL GOTO=https://www.recreation.gov/switchBookingAction.do?contractCode=NRSO&parkId=71924&siteId=81349&camparea=0&selStatus=null&matrixHasError=true&dateToday=09%2F12%2F2017¤tMaximumWindow=12&dateMinWindow=03%2F09%2F2017&dateMaxWindow=03%2F09%2F2018&arvdate=09%2F12%2F2017&arrivaldate=Tue+Sep+12+2017&lengthOfStay=1&dateChosen=true
TAG POS=1 TYPE=SPAN ATTR=ID:cgroundName
TAG POS=2 TYPE=DIV ATTR=TXT:Cabin,<SP>Loop:Y07,<SP>AREA<SP>ALSEK<SP>RIVER<SP>CABIN
'Checking if 'Book these Dates' Button is present:
SET !EXTRACT NULL
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates EXTRACT=TXT
'=> Extracted: "Book these Dates"
TAG POS=1 TYPE=BUTTON FORM=ID:booksiteform ATTR=ID:btnbookdates
SET Mini_Report <SP><SP>//<SP><SP>No<SP>Error...!!<BR><BR>
ADD Mini_Report Booking<SP>successful<SP>at<SP>{{!NOW:yyyy-mm-dd_hhhnn}}...!<BR><BR>
'Abort Macro/Looping if Button was found:
SET !ERRORIGNORE NO
SET Abort_Macro EVAL("var s='{{!EXTRACT}}'; if(s!='#EANF#'){MacroError('{{Mini_Report}}');};")
SET !ERRORIGNORE YES
WAIT SECONDS=15
The first 2 'TAG' Statements are not really needed but could be used for some extra Checking that we are on the "right" Page, + for some Relative Positioning.
The current Check/Macro Abort is done by checking if the 'Book these Dates' Button is present or not, it could be done by extracting some specific Msg appearing after a successful Booking...
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
-
- Posts: 5
- Joined: Thu Mar 09, 2017 1:48 am
Re: Repeating a click on webpage button
I'll try with your suggestions. I appreciate your help.
Re: Repeating a click on webpage button
Oh...!, you could already answer/confirm the "Is this correct...?" Assumption I made about the Button...Stevefourimacro wrote:I'll try with your suggestions. I appreciate your help.
(Because the "Mechanism" I used in the Macro is based on that Assumption, and if it is not correct, then... well..., the Macro won't exactly do what you want, ah-ah...!)
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
-
- Posts: 5
- Joined: Thu Mar 09, 2017 1:48 am
Re: Repeating a click on webpage button
Yes, you were correct. There is a very short refresh of the button. Click it is gone, and then it comes back instantly it seems.
You are not correct about the creepy cabins! You should check them out!
You are not correct about the creepy cabins! You should check them out!
Re: Repeating a click on webpage button
OK, good to hear then, I'll be interested to hear if the Script works indeed like you expect, and if you understand the "Mechanism" I used to implement it...Stevefourimacro wrote:Yes, you were correct. There is a very short refresh of the button. Click it is gone, and then it comes back instantly it seems.
You are not correct about the creepy cabins! You should check them out!
About your Cabins, ah-ah...!, a bit far for me as I live in Europe (NL), the only Cabin I like is this one...!
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...