Accepting gifts on Facebook

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
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Accepting gifts on Facebook

Post by Pinksitt » Tue Oct 12, 2010 2:28 pm

Is it possible to create a script that will accept all gifts from the confirmation page in Facebook. I am an absolute beginner and have no understanding of the Macro language. I have managed to create a long winded one in FF using the click format and lots of tabs, but as the spacing tends to vary from time to time the click method is not always accurate, apart from the script being slow FF is much slower than Chrome.

Some advice or script from someone who is familiar with the confirmation page on FB would be much appreciated
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Accepting gifts on Facebook

Post by Tom, Tech Support » Tue Oct 12, 2010 4:47 pm

Hello Pinksitt,

The follow post contains a script for deleting friends on Facebook. The concept sounds similar enough to want you want to accomplish, and might help point you in the right direction.

http://forum.imacros.net/viewtopic.php?f=2&t=10619#p32093
Regards,

Tom, iMacros Support
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Re: Accepting gifts on Facebook

Post by Pinksitt » Tue Oct 12, 2010 7:14 pm

Hi Tom, sadly the link you gave me didn't help at all. It seems every gift sent has it's own identity or serial number, I have no idea how to get round that so I think I am probably going to have to stick with my recording in 'click' mode. Facebook can be such a pain as I have tons of gifts from various apps and Facebook only seems to allow accepting one at a time.

Thank you for your input though
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Accepting gifts on Facebook

Post by Tom, Tech Support » Thu Oct 14, 2010 10:46 am

Hi Pinksitt,

Keep in mind that you can always use wildcards with dynamic attributes (like an id or serial number) that are different for each element.

http://wiki.imacros.net/Form_Filling#Wildcards
Regards,

Tom, iMacros Support
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Re: Accepting gifts on Facebook

Post by Pinksitt » Mon Oct 18, 2010 5:58 pm

Thank you for the 'wild card' info Tom. I eagerly went to the link you gave me thinking yay a wild card, but when I compared it to my own tag lines I was totally confused as to where I should put the *. So here is what i get when I record accepting just 3 gifts.

URL GOTO=http://www.facebook.com/reqs.php#confirm_8630423715_0
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.facebook.com/ajax/reqs.php ATTR=NAME:actions[http://apps.facebook.com/yoville/gifts/ ... 1287369719]&&VALUE:Accept<SP>and<SP>play
TAG POS=1 TYPE=A ATTR=TXT:Accept<SP>More
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.facebook.com/ajax/reqs.php ATTR=NAME:actions[http://apps.facebook.com/yoville/gifts/ ... 1287369694]&&VALUE:Accept<SP>and<SP>play
TAG POS=1 TYPE=A ATTR=TXT:Accept<SP>More
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.facebook.com/ajax/reqs.php ATTR=NAME:actions[http://apps.facebook.com/yoville/gifts/ ... 1287369657]&&VALUE:Accept<SP>and<SP>play


As you can see it's a mess so I don't have a clue where I should use the wild card. Sorry I just copied and pasted the macro, but i don't know how to attach it properly like others do :oops:
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Accepting gifts on Facebook

Post by Tom, Tech Support » Wed Oct 20, 2010 2:19 pm

Pinksitt,

Here's all I think you need. First, navigate to the page where you accept gifts. Then, on the Play tab of the iMacros sidebar, set the Max. value to the number of gifts you want to accept. Then use the Play (Loop) button to play the following macro:

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.facebook.com/ajax/reqs.php ATTR=NAME:VALUE:Accept<SP>and<SP>play
TAG POS=1 TYPE=A ATTR=TXT:Accept<SP>More
My assumption here is that clicking the Accept More link causes the page to refresh with a new gift to accept? If this is the case, and there is only one gift shown on the page, then this should work. If there are multiple gifts on the page, then we'll have to tweak this a bit with wildcards.
Regards,

Tom, iMacros Support
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Re: Accepting gifts on Facebook

Post by Pinksitt » Wed Oct 20, 2010 6:59 pm

Tom the loop didn't work, i got an error on the first tag line... I am assuming too much info was missing. So I think the wild card is the only option.

RuntimeError: element INPUT specified by NAME:VALUE:Accept<SP>and<SP>play was not found, line: 4

When I navigate to Facebooks main gifts page I accept the gift which then takes me to the accept more page, only the gift I have accepted shows there, I click accept more and it takes me back to the main page again. It's a very slow and tedious process.

My complete lack of understanding how iMacro's works, doesn't help here :oops:
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Accepting gifts on Facebook

Post by Tom, Tech Support » Wed Oct 20, 2010 7:17 pm

Sorry, that was my editing mistake. Try this line instead:

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.facebook.com/ajax/reqs.php ATTR=VALUE:Accept<SP>and<SP>play
Regards,

Tom, iMacros Support
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Re: Accepting gifts on Facebook

Post by Pinksitt » Wed Oct 20, 2010 8:49 pm

omg Tom it works :D

I can't thank you enough, thank you so so much. I haven't tried it on Chrome yet, just on FF. I will try it later as I am on my way out now.
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Re: Accepting gifts on Facebook

Post by Pinksitt » Wed Oct 20, 2010 8:59 pm

Btw I don't want to remain a macro noob forever is there a manual anywhere that explains the imacro language. Wikpedia gives a lot of examples but I have no idea how the examples came to be. Hope that made sense
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Accepting gifts on Facebook

Post by Tom, Tech Support » Tue Oct 26, 2010 11:02 am

Hi Pinksitt,

Glad it works now! The iMacros Wiki more or less is the manual for iMacros. You might want to check out some of the tutorials and explore the sample macros that come with iMacros if you haven't done so already. But really the best way to learn with a tool like this is the approach you have taken by starting with something small and looking for similar solutions and asking questions!
Regards,

Tom, iMacros Support
Pinksitt
Posts: 20
Joined: Mon Aug 02, 2010 11:42 pm

Re: Accepting gifts on Facebook

Post by Pinksitt » Fri Oct 29, 2010 4:13 pm

Hi Tom

I think you are probably right that practical learning is better than trying to READ how it's done. And I have since being on this thread learned a few things like how to adapt and edit to make a macro work for me, so I am getting there slowly. I know you said too that asking questions is also a good way to learn, but I hate wasting people's time on silly things like a small action in a game :oops:

But I do have a new problem to solve, I am trying to automate an action in a game called Yoville on Facebook. I want the macro to automatically click on an icon called 'work'. Once clicked the icon will then disappear and I can go on to do another and different action. But when I recorded both this is what I got...needless to say it does nothing

TAB T=1
URL GOTO=http://apps.facebook.com/yoville/index. ... erior&play
FRAME F=2
TAG POS=1 TYPE=EMBED ATTR=ID:mylife
TAG POS=1 TYPE=EMBED ATTR=ID:mylife
Post Reply