egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NASA Launch Schedule Script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Dec 28, 2006 6:26 am    Post subject: NASA Launch Schedule Script Reply with quote

This script pulls the launch data from NASA's schedule page.

# Commands typed in channel or privmsg (using the default configured command):
# .nasa - show the next launch schedule.
# .nasa 5 - show the next 5 launches.
# .nasa all - show all launches on the schedule (output goes to privmsg)
# .nasa help - show the brief helpfile.

Output format:
Next Launch: Feb. 15 6:07:37 p.m. - FL - THEMIS
URL: http://www.nasa.gov/mission_pages/themis/main/index.html
THEMIS will study the dynamic and colorful eruptions of auroras.
Vehicle Type: Delta II rocket
Launch Site : Cape Canaveral Air Force Station launch pad 17-B
--

http://members.dandy.net/~fbn/nasalaunch.tcl.txt
Back to top
View user's profile Send private message
ZEXEL
Halfop


Joined: 27 Jun 2006
Posts: 45

PostPosted: Thu Dec 28, 2006 8:58 am    Post subject: Yo! Reply with quote

Interesting and original idea..
good works...
Wink Wink Wink Wink Wink
_________________
.:[ Knowledge Is The Power ]:.
Back to top
View user's profile Send private message Visit poster's website
QQleQ
Voice


Joined: 20 Nov 2006
Posts: 14

PostPosted: Thu Dec 28, 2006 6:15 pm    Post subject: Reply with quote

Thanx!

I get an error though:

[23:44] <QQleQ> .nasa
[23:44] <Dinges> Checking NASA Launch Schedule..Please stand by...
thats it

and in the partyline it says:
[23:44] TCL error [nasacmdpub]: wrong # args: should be "lindex list index"

Sad

Im running Eggdrop 1.6.8. TCL 8.3.3.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Dec 28, 2006 8:41 pm    Post subject: Reply with quote

# When reporting bugs, PLEASE include the .set errorInfo debug info!
# Read: http://forum.egghelp.org/viewtopic.php?t=10215

I get no such errors, I suggest upgrading tcl as 8.3 is an old development version and upgrade eggdrop as 1.6.8 is ancient and no longer supported..

I also need the above set errorInfo if you expect me to know what's actually going on with your system.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Dec 28, 2006 8:55 pm    Post subject: Reply with quote

I have a suspicion that older eggdrops/tcl's didn't use a variable in the lindex command, so if you changed [lindex $text 0] to [lindex text 0] it should probably work. You'd have to remove the $ from the other [lindex] commands elsewhere, as well. I counted five of them in the script.. Try that and let me know if that works for you (otherwise, just upgrade.. Be a good idea to upgrade anyway.)

The other idea that occurs to me is that the older versions expected the variable to be a list already, which could be accomplished by using [split] or [list] on the variables in question.. That would take a bit more work, and it's just easier for me if you upgrade rather than me rework the script to work with obsolete and unsupported old versions Razz
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Dec 28, 2006 9:38 pm    Post subject: Reply with quote

[lindex $text 0] and [lindex text 0] both will work (on older tcl versions and newer) but the difference is that the first one will return the first element in the list called "text" while the second one will always return the word "text."

The error is here:
Code:
set nlmission [lindex $nlmission 2 end]

This probably should be
Code:
set nlmission [join [lrange $nlmission 2 end]]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Dec 28, 2006 10:36 pm    Post subject: Reply with quote

Thanks Sir_Fz, one of those late night coding oversights Smile

Strangely, despite the lindex/lrange thing, my copy of the script worked, even after doing a restart..Oddness.. Anyway, I'll upload a new copy of the script, but I changed the format of the output some, cos I thought the original was a bit ugly.
Back to top
View user's profile Send private message
QQleQ
Voice


Joined: 20 Nov 2006
Posts: 14

PostPosted: Fri Dec 29, 2006 9:30 am    Post subject: Reply with quote

Ah yes, it works now, thanx y'all Smile
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 29, 2006 9:52 am    Post subject: Reply with quote

Oh, you probably don't need [join] since nlmission is supposed to stay a list.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
QQleQ
Voice


Joined: 20 Nov 2006
Posts: 14

PostPosted: Wed Mar 21, 2007 9:14 am    Post subject: Reply with quote

Could someone have a look at this script, the output contains HTML Sad
Thanx Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Mar 21, 2007 10:01 am    Post subject: Reply with quote

QQleQ wrote:
Could someone have a look at this script, the output contains HTML Sad
Thanx Smile

You'd help more by pasting the output.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Mar 22, 2007 1:55 am    Post subject: Reply with quote

Fixed. Same url as above.
Back to top
View user's profile Send private message
Roger-Ca
Voice


Joined: 16 Apr 2006
Posts: 8
Location: California

PostPosted: Sun Jan 20, 2008 11:46 pm    Post subject: NASA launch script - no work Reply with quote

Hi,

Eggdrop version 1.6.18

NASA launch script version: 0.01c

I get nothing. The only thing I changed was .nasa to !nasa

thanks in advance
Back to top
View user's profile Send private message Send e-mail
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Jan 21, 2008 12:36 am    Post subject: Reply with quote

Post the results (if any) of ".set errorInfo"
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Jan 21, 2008 1:27 am    Post subject: Reply with quote

HTML changed, working on fixing (extensive.) Fix should be posted by tomorrow.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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 vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber