Jump to content

HOW COME THIS DON"T WORK?


Guest Guidosoft
 Share

Recommended Posts

Guest Guidosoft

;Script: Log all users test
;Author: Guido Arbia
;Description: Logs the first 100 users names found on autoit forums.

;<div id="profilename">

For $User = 1 to 100
   
   InetGet("http://www.autoitscript.com/forum/index.php?showuser="&$User,"C:\User.htm")
   
   $HTMFile = FileOpen("C:\User.htm",0)
   $Log = FileOpen("C:\Windows\Desktop\Log.txt",2)
   While 1
      $Line = FileReadLine($HTMFile)
      
      If StringinStr($Line, "</HTML>") then
         ExitLoop
      EndIf
      
      If StringInStr($Line, "<div id=""profilename"">") Then
         $UserName = StringSplit($Line,"<div id=""profilename"">",3)
         $UserName = StringSplit($Line,"</div>",3)
         FileWriteLine($Log,$Username[1])
         ExitLoop
      EndIf
   WEnd
   FileClose($HTMFile)
   FileClose($Log)
Next

I am tyrying to list all the users names on the forum from 1 to 100 as an experiment so I can make an active user monitering program but appearantly the forum won't allow non-browser acesss to it.

WHY??

Edited by Guidosoft
Link to comment
Share on other sites

Try this:

For $n = 1 To 10
    InetGet("http://www.autoitscript.com/forum/index.php?showuser=" & $n, @ScriptDir & "\User.htm")
    $sData = FileRead(@ScriptDir & "\User.htm", FileGetSize(@ScriptDir & "\User.htm"))
    $i = StringInStr($sData, "<div id=""profilename"">")
    If $i > 0 Then
        $sData = StringTrimLeft($sData, $i+StringLen("<div id=""profilename"">")-1)
        $i = StringInStr($sData, "</div>")
        If $i > 0 Then
            ConsoleWrite(StringLeft($sData, $i-1) & @LF)
        EndIf
    EndIf
    Sleep(1000)
Next
Link to comment
Share on other sites

It didn't work.  :lmao:

Look at user.htm. You don't even catch the right page.  o:)

It won't return it right without a browser.

<{POST_SNAPBACK}>

Works for me...this is what I get in Scite:

>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "D:\Download\Temp\test.au3"   

Jon

devtek_it

nosmirc

markz

JonTest

Dan

Packman

jpm

steve8tch

symagsxs

>Exit code: 0    Time: 22.877

BTW, this is running on XP Professional SP2 with 3.1.0 Edited by pacman
Link to comment
Share on other sites

Guest Guidosoft

Works for me...this is what I get in Scite:

<{POST_SNAPBACK}>

So how come it won't work right for me?

I got the same exact code.

Edit: I got Window 98 does that have anything to do with it?

Edited by Guidosoft
Link to comment
Share on other sites

Guest Guidosoft

So how come it won't work right for me?

I got the same exact code.

Edit: I got Window 98 does that have anything to do with it?

<{POST_SNAPBACK}>

Oh, and I am also logged in to autoit on motzilla. Do I need to be logged in with explorer?
Link to comment
Share on other sites

So how come it won't work right for me?

I got the same exact code.

Edit: I got Window 98 does that have anything to do with it?

<{POST_SNAPBACK}>

Probably, if InetGet is not working for you.

Have you got IE 6 installed? I think you need at least IE 5 for this function to work.

Link to comment
Share on other sites

Guest Guidosoft

Probably, if InetGet is not working for you.

Have you got IE 6 installed? I think you need at least IE 5 for this function to work.

<{POST_SNAPBACK}>

Yes. I have it installed.

I GOT IT!!!

I need to be logged in in IE!!!

I did, and now it works!! YAY. I knew it. It's always about the cookies.

I changed N to 100 and got

>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "D:\AutoIt\LogAUsersTest.AU3"  
Jon
devtek_it
nosmirc
markz
JonTest
Dan
Packman
jpm
steve8tch
symagsxs
Larry
dazco
jlandes
jan
caspermurphy
jbreetz
JdeB
jerrygormley
Manus-Magnus
BlueScreen
sykes
CyberSlug
MattNis
sconley
nathan546
sl_alagappan
Randwulf
trunc.ate
w_sp8er
10100010
Guy
cmallett
james
-TS-
alrick
Valik
Leffy
k_maharaj
korp
jayp
niranjan8shh
bettereyes1
paul
3wchris
Questwind
GEOSoft
foscmgt
trids
jaehyunb
Beastmaster
Alexander
scriptkitty
bcording
Cerb
zapantis
irata
shing
roer
aphoria
brian_keene
blenn
flyingboz
chamach
jtruono
bastel123
mcherdering
RearView
eLady
dwelcher
Christian_Blackburn
MBachl
Dizzy
dmenth
jimbob4477
Nutster
GoalStopper
SerialKiller
bradvexille
selfexploiter
Insolence
sakigake
marale
Coorzman
speedi
mlazovjp
blahole
Stuttgart
>Exit code: 0   Time: 168.028
Edited by Guidosoft
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...