Sign in to follow this  
Followers 0
tradertt

Problem with Filereadline -URGENT

11 posts in this topic

Hi

I have a problem with Filereadline

When I try to post in a forum, and I run a $oIE=_IECreate (FileReadLine($Links,$i),1), the script does not auto post in the Title and the description

but when I use $oIE = _IECreate ("http://discuz.ezup.biz/post.php?action=newthread&fid=15&extra=page%3D1" , 1), it does.

Is anyone able to tell me why?

I am calling out the links from a txt file and I put 2 links in 2 different lines so that it will loop.

#include<IE.au3>
#include <File.au3>
$Links="C:\Users\User\Documents\links.txt"
$Subject="惊人的叫春声!!!"
$Post="惊人的叫春声!!! http://www.sdsd.com/0610b44d9b9fed0ff954.video?%E6%83%8A%E4%BA%BA%E7%9A%84%E5%8F%AB%E6%98%A5%E5%A3%B0%EF%BC%81%EF%BC%81%EF%BC%81"
_IELoadWaitTimeout(15000)
_IEErrorHandlerRegister()
For $i=1 to _FileCountLines($Links)
    $oIE=_IECreate (FileReadLine($Links,$i),1)
;$oIE = _IECreate ("http://discuz.ezup.biz/post.php?action=newthread&fid=15&extra=page%3D1" , 1)

$oForm = _IEFormGetObjByName($oIE, "postform")
$oText = _IEFormElementGetObjByName ($oForm, "subject")
_IEFormElementSetValue ($oText, $Subject)

$oObj = _IEGetObjById($oIE,"bbcodemode")
_IEAction($oObj,"click")

$oOptions=_IEGetObjById($oIE,"typeid")
_IEFormElementOptionselect($oOptions,"日本",1,"byText")

$oForm1 = _IEFormGetObjByName($oIE, "postform")
$oText1 = _IEFormElementGetObjByName ($oForm1, "message")
_IEFormElementSetValue ($oText1, $Post)


  ; $oSubmit=_IEGetObjById($oIE,"postsubmit")
   ;_IEAction($oSubmit,"click")
    _IELoadWait($oIE,5000)
    _IEQuit($oIE)
Next

Share this post


Link to post
Share on other sites



Maybe your FileReadLine is picking up the carriage return at the end of the line?

Share this post


Link to post
Share on other sites

Did you try a ConsoleWrite(FileReadLine($Links,$i) & @CRLF) to make sure the link is correct?

Share this post


Link to post
Share on other sites

Just above $oIE=_IECreate (FileReadLine($Links,$i),1)

This will debug that line to your SciTE console.

Share this post


Link to post
Share on other sites

If it is indeed a linefeed problem you should see an empty space between each line written to the console.

Share this post


Link to post
Share on other sites

I think I have found out the problem. I am running on Vista and apparantly there are a lot of problems with Vista ....

thanks

Well that goes without saying! Understatement of the year!

Share this post


Link to post
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
Sign in to follow this  
Followers 0