Register
It is currently Tue Oct 21, 2014 9:11 am

Need some Help Just started scripting a little bit!!


All times are UTC - 6 hours


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 PostPosted: Wed Nov 19, 2008 1:01 am   

Joined: Sun Oct 19, 2008 5:02 am
Posts: 3
I have a script I use to play a sound when someone posts in my forum, I would like it to instead of making a sound I would like it also to post my response in as a reply to there post. Is this possible and can I get some help with it. This is the script that plays the sound when someone posts.

while : ; do
if lynx -dump http://myforum/ |grep "\]0 [0-9]$" ; then
mplay32.exe /play /close "C:\WINDOWS\Media\ding.wav" &
fi
sleep 2s
done

Any help would be highly appreciated. Thanks guys.

vipervma


Top
 Profile YIM  
 PostPosted: Wed Nov 19, 2008 6:06 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
Hi,
Forum software varies significantly. The first thing you'll need to know is the exact call required to post a response. For some forums this is a multistep process, quite possibly requiring cookies, which somewhat increases the complexity. One generally cannot write the script without this info.

DW


Top
 Profile  
 PostPosted: Wed Nov 19, 2008 6:14 am   

Joined: Sun Oct 19, 2008 5:02 am
Posts: 3
I am using cygwin and have it set to accept all cookies and the script does alert me to a new post and sounds a wav file. I am really new so I just wasn't sure how or if it could be done but I am sure one of my members is doing it somehow but swears he isn't. Thanks for the info.


Top
 Profile YIM  
 PostPosted: Thu Nov 20, 2008 6:29 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
Grabbing info from a forum is much easier than submitting it however it's certainly not that difficult to do once the steps required are worked out.


Top
 Profile  
 PostPosted: Thu Nov 20, 2008 6:38 am   

Joined: Mon Nov 17, 2008 7:25 am
Posts: 221
One thing you can do is to curl the information.
Curl supports posting in forms, not sure this will work with cygwin because i don't think curl is apart of it.
Anyway, what you need to figure out is what the <form>'s <input> field for reply is and then run curl to post.

I can't really help you more then that since I'm not sure how curl's posting function works.

Best regards
Fredrik Eriksson


Top
 Profile  
 PostPosted: Thu Nov 20, 2008 7:02 am   

Joined: Sun Oct 19, 2008 5:02 am
Posts: 3
DarthWavy wrote:
Grabbing info from a forum is much easier than submitting it however it's certainly not that difficult to do once the steps required are worked out.


What steps are required. The post I want to input is just a graphic file from another website. What I need is when the script alerts me of a new post, I need to open the new post and somehow trigger the reply then post the graphic file once in the reply window. I am not even sure what command will work to post. If you can help or show me a script that will work I would make it worth your while.


Top
 Profile YIM  
 PostPosted: Thu Nov 20, 2008 7:16 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
If you cannot determine the steps required then you'll need to tell someone what the forum software is at least and you might have to actually tell them which forum it is specifically and give them a login to work out the steps with.

Quote:
If you can help or show me a script that will work I would make it worth your while.


I'm unlikely to have the time for that kind of investigation, i just come here for a little fun while working, however I know someone with the skills to do this whom would be happy to do it for some cash. They live in UK though.
If you would like me to ask them send me a private message with an email address and I'll put you in contact.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP