non vorrei lavorare

ブログ名の通りです。javascript three.js mruby rust OCaml golang julialang blender

mixi中毒へのみちのり

Perlからやりたいのに!!

use Win32::OLE qw(EVENTS in);

use Win32::OLE::Const ('Microsoft Internet Controls');

use strict;

my $myMailAddr = '';

my $myPass = "opensesami";

$|=1;

my $ie = Win32::OLE->new('InternetExplorer.Application');

Win32::OLE->WithEvents($ie,"WebBrowserEvents","DWebBrowserEvents2");

$ie->{Visible} = 1;

$ie->Navigate("http://mixi.jp/logout.pl");

Win32::OLE->MessageLoop();

while($ie->ReadyState() != READYSTATE_COMPLETE){

}

$ie->Navigate("http://mixi.jp/");

Win32::OLE->MessageLoop();

while($ie->ReadyState() != READYSTATE_COMPLETE){

# sleep(2);

}

foreach my $element (in $ie->Document->all){

# print $element->name . "\n";

}

my $forms = $ie->Document->forms;

my $form = $forms->item(0);

$form->elements('email')->{value} = $myMailAddr;

$form->elements("password")->{value} = $myPass;

$form->Submit;

Win32::OLE->MessageLoop();

while($ie->ReadyState() != READYSTATE_COMPLETE){

# sleep(2);

}

#my $links = $ie->Document->{links};

#sleep(5);

foreach my $element (in $ie->Document->all){

# print $element->name . "\n";

}

foreach my $element (in $ie->Document->links){

print $element->href . "\n";

}

#$ie->quit;

package WebBrowserEvents;

sub DownloadComplete {

my ($obj,@args) = @_;

print "Download Complete\n";

}

sub NavigateComplete2 {

my ($obj,@args) = @_;

Win32::OLE->QuitMessageLoop();

}

あと、悪だくみURLリスト(なぞ

If InStr(sTmpURL,sTargetUrl) Then

If InStr(sTmpURL,"http://mixi.jp/view_album.pl") Then

Else

IF InStr(sTmpURL,"http://mixi.jp/banner.pl") Then

Else

IF InStr(sTmpURL,"http://mixi.jp/view_community.pl") Then

Else

IF InStr(sTmpURL,"http://mixi.jp/search_") Then

Else

IF InStr(sTmpURL,"http://mixi.jp/set_cookie.pl") Then

Else

IF InStr(sTmpURL,"http://mixi.jp/edit_") Then

Else

IF InStr(sTmpURL,"view_diary.pl") Then

Else

IF InStr(sTmpURL,"delete_") Then

Else