openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Douglas Pitonyak <and...@pitonyak.org>
Subject Re: Link to oooforum
Date Wed, 03 Sep 2014 05:17:50 GMT

Well, I find the entire thing rather confusing. For example, I can 
extract the table of text as follows:

TAB T=1
URL GOTO=http://www.oooforum.org/forum/search.phtml
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:search.phtml?mode=results 
ATTR=NAME:search_author CONTENT=RobinColvin
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:search.phtml?mode=results ATTR=*

'Extract the table text.
TAG POS=7 TYPE=TABLE ATTR=TXT:* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhnnss}}.csv

If I want to extract all of the URLs in the table, well, I can't figure 
out how to do that. I am able to enumerate the first two links as follows:

TAB T=1
URL GOTO=http://www.oooforum.org/forum/search.phtml
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:search.phtml?mode=results 
ATTR=NAME:search_author CONTENT=RobinColvin
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:search.phtml?mode=results ATTR=*

TAG POS=1 TYPE=A ATTR=HREF:*&&CLASS:topictitle EXTRACT=HREF
TAG POS=2 TYPE=A ATTR=HREF:*&&CLASS:topictitle EXTRACT=HREF
SAVEAS TYPE=EXTRACT FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhnnss}}.csv

I had trouble simply extracting all of them, so, I tried to use java 
script to call iMacro, but that never returned from the first iimPlay

var spammer="RobinColvin"

window.alert("Read for '" + spammer + "'");

var search_macro;
search_macro ="CODE:";
search_macro +="URL GOTO=http://www.oooforum.org/forum/search.phtml"+"\n";
search_macro +="TAG POS=1 TYPE=INPUT:TEXT 
FORM=ACTION:search.phtml?mode=results ATTR=NAME:search_author 
CONTENT="+spammer+"\n";
search_macro +="TAG POS=1 TYPE=INPUT:SUBMIT 
FORM=ACTION:search.phtml?mode=results ATTR=*"+"\n";



var links = [];
var iLink = 1;
var iMaxLink = 100
var link = "";
var extract_link_macro;

window.alert(search_macro);

// Perform the search!
iimPlay(search_macro)

window.alert("Finished with search!");

do {
   extract_link_macro ="CODE:";
   extract_link_macro +="TAG POS="+iLink+"1 TYPE=A 
ATTR=HREF:*&&CLASS:topictitle EXTRACT=HREF"+"\n";
   iimPlay(extract_link_macro);
   link=iimGetLastExtract();
   if(link!="#EANF#") {
     links.push(link);
     iLink = iLink + 1;
   }
} while (link != "#EANF#" && iLink <= iMaxLink)

window.alert("found " + iLink + " links");


If I assume that I have already searched, then I can extract all of the 
links by using "loop execute" and then using a macro similar to:

TAG POS={{!LOOP}} TYPE=A ATTR=HREF:*&&CLASS:topictitle EXTRACT=HREF
SAVEAS TYPE=EXTRACT FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhnnss}}.csv

If I loop 50 times, it exports everything from that one page into three 
files. It seems that it does not easily support doing the entire thing 
in one shot; at least while using a loop!

At least by listing the extract command 50 times I end up with only one 
file.

this is not a simple thing and it still does not get me to my end game.

On 09/02/2014 10:23 AM, Alexandro Colorado wrote:
> On 9/2/14, Andrew Douglas Pitonyak <andrew@pitonyak.org> wrote:
>> There is very little difference between what an admin and a user sees in
>> this context.
>>
>> To find the posts, I use the regular search. The returned list is the
>> same for an admin as well as a regular user. While displaying a thread,
>> there is an admin link that allows me to remove the thread and there is
>> a link to remove each post in the thread. There is also a link on the
>> bottom of each thread to navigate to a special admin page that provides
>> some extra functions such as delete a user (but deleting the user does
>> not remove their posts).
> I did an excercise and try deleting my own posts from oooforum. I see
> what you mean (and what I was missing). There is no checkbox to mark
> all the posts like it would be on -- let say  -- the PM page where a
> checkbox is able to mass delete all links.
>
> I understand now your point on looping through non secuential links. I
> went on the iMacros forum and found some tips responding to a
> positioning loop.
> http://forum.imacros.net/viewtopic.php?f=8&p=37399
>
> Hope this helps.
>
>>
>>
>> On 09/01/2014 11:00 PM, Alexandro Colorado wrote:
>>> Unfortunately I dont admin any forum to see what you are seen, so I
>>> only have access to the forum search engine but I know that the Admin
>>> (the one able to delete the forum) is a different view.
>>>

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Mime
View raw message