Imacros for facebook like - imacros

Just started to learn Imacros, recorder macros for Facebook to like page, but when i play macros it gives me this kind of error
RuntimeError: element BUTTON specified by
TYPE:submit&&ID:u_0_1c&&DATA-OWNERID:u_0_1b&&DATA-PROFILEID:106053553060414&&CLASS:_42ft_4jy0PageLikeButton_4jy4_517h_9c6&&VALUE:1
was not found, line 6 (Error code: -921)

You problem is,
"submit&&ID:u_0_1c&&DATA-OWNERID:u_0_1b&&DATA-PROFILEID:106053553060414&&CLASS:_42ft_4jy0PageLikeButton_4jy4_517h_9c6&&VALUE:1 "
points to a spesific a specific button, I assume you want to click any like button from whatever page you are on you should choose a more general selector. On the record in imacros you can choose multiple methods of recording choose a different one.

Related

Allow to check only one checkbox in Oracle apex

I created classic report with check boxes using apex_item.checkbox .I want to know how to allow to check only checkbox.That is if i click more than checkbox alert message should display.Please help me out
Thanks in advance.
If you want to do this via dynamic actions then you will want do a dynamic action on event Change, Selection Type jQuery Selector and the jQuery Selector being input[name = "something"]
This something you can figure out by running the page as is, and if you click F12 on your keyboard, the console will open. Then select the element that is your checkbox and find its name and this should be your "something". Play around with this to make it work(set the DA to run an alert or something to see when its triggered).
Then perhaps have a page item that is filled when this DA runs, and then if the page item is already filled and the DA runs, throw up an error saying you cant do this.
Or if you want to clear the previously checked box, you could save the name of currently checked box in the page item. And have the DA do a javascript function that clears the value in the field in the page item.
Basically have the DA get the name of the checked box from the item where you store it, and do some dynamic javascript. When I needed to do something similair I created a var in javascript that was formed like $s(" + checked_box + ", ""); assembling this with concat. And then do an eval(this_concacted_instruction).
I hope my ramblings guide you to a solution. I remember the first time I was working with this stuff I took a week to get one page sorted(although it was a bit more difficult than your problem), but it felt sooo good when I got it done. So keep on trying.
GLHF

django form add new rows upon changing to edit

Here's my use case:
I'd like to display the information about something first using django_tables2, with a button on the top right corner called "Edit", once a user hits "Edit", at the bottom of the table, display a button called "Add New Record", and once the user clicks that button, a bunch of input fields pop up to let users enter values for each field, also the user could continue to click "Add new Record" to keep adding new.
How can I achieve this in Django?
I've read a lot of examples on stackoverflow but didn't find anything tailored to this particular case.
Thanks a lot.
Let's dive right into listing out what you want to do and the requirements you'll need to do so.
You basically want to toggle hiding and showing some functionality for this web page. This is easily accomplished by including the "Edit" button, "Add New Record" button, and popup (most likely in its own <div> somewhere in the page). So the "Edit" button will have the display set to something, be it inline, block, etc., while the "Add New Record" and popup would have a display of "none" or however it is you wish to hide it.
You've got the stuff set up and ready to go but now you need to show it when you click the "Edit" button. This is generally accomplished through Javascript. Just find the "Add New Record" button and switch the visibility.
When you click on the "Add" button you want to display a popup. This can be done in a variety of ways with different libraries. One of my personal favorites is using jquery's blockUI. Why? It doesn't allow the user to click anywhere except in the popup so it's a quick way to handle users trying to reach outside the scope of the popup.
So you've got all the new rows added and you are done editing. Maybe you have a "Save" button or something like that where you can click. When you do, you'll want to push all those new rows you just added to the database. Django handles this well and you could do something like include the new rows in part of the POST request or however you care to implement this solution.
So there's a bit of work ahead of you to get this page up and running with the exact functionality you need but hopefully this starts steering you in the right direction of where you need to go.

How to display a confirmation message like "Deleted"

I would like to display a confirmation message after a choice in the menu.
For example if you want to delete an image in the Timeline, you tap on the glass to open the menu, you select "Delete", you have a progression bar to cancel if you want, when the progressbar is complete a kind of toast appear to say "Deleted" and disappear.
I would like to reproduce only the "Deleted" part but I've searched everywhere and cannot find a way to do it. Is there an API or should I manually implement it with a layout containing the text wanted and display it for 3 seconds... ?
Thanks
There is no API for this to work you will need to build a layout and then set it as the current view using setContentView for a specific amount of time and then return to your main view.

Send app request to friend from page tab without pop up..!

Sound like tricky to me..
Sending app request in a popup is a common scenario..
I am trying it to be something static , NO POP UP, USERs should be visible just like any other media on page, with check boxes allowing selection with a send button.
MY guess is something like this.
I need to get the list of the friends and display it with check boxes.
After user selects some particular check boxes, and clicks the send button.
I need to get the list of the friends to generate the dialogue with those ids and send the request..
But even then, As far code is concerned, I am not able to achieve this, little hints would do i guess.
here is the example I want to achieve..
https://www.facebook.com/mittromney/app_159952444141722

property sheet data validation

When the user clicks the OK or APPLY button on a property sheet and the program determines data on some page is invalid, how can I cause the page containing the error to be displayed along with a message box describing the error?
Currently the procedure doing the validation does the following while processing the PSN_APPLY notification.
MessageBox (hDlg, "Data must be positive!", "Error", MB_OK);
SetWindowLong (hDlg, DWL_MSGRESULT, PSNRET_INVALID);
This works ok if the page doing the validation (A) is currently displayed but if some other page (B) is being displayed, the message box appears with that page (B) being displayed, then when the message box is answered, the page with the validation error (A) is displayed. I thought about setting some flag so that when that page (A) gets the PSN_SETACTIVE notification it displays the message box but that seems kind of hokey.
Win32 API in c++, no MFC, no NET, nothing fancy.
I think the problem is in the design of your validation and it's presentation.
Am I right in thinking that you iterate through your property sheets, validate them and display a message box if something is awry? Because of course, what you have witnessed will happen, if I am on property page 3 and I wrote crap in to a field on property page 1.
The easiest solution is, when validating, note which property page the field in question is, and set that one active if the user has written crap in to one of your fields. This seems the fastest way possible.
Also, rather than spring up an annoying message box, reserve some room beneath the property pages to display a textual (red or otherwise) warning as to why, and then change to the appropriate property page, and highlight the offending control. Your validation routine can do this nice and easily as it loops through.
Even better, don't stop at the first error. One thing I HATE is correcting one field that I think is the only issue, only to be told every time I hit "OK" or "SUBMIT" that there's something else I missed.
I seriously think you should consider going the extra mile here... loop through ALL controls, and add all invalid ones to a list. Then change each offending control's background colour, tab colour etc... Then the user can work through and correct, no matter how many errors he or she made.