This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Find part of a word/url

Help for those learning Tcl or writing their own scripts.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, I just copied and pasted that code, and it works just fine. Check that there's no accidental newlines in the pasted code...
NML_375
J
JKM
Voice
Posts: 30
Joined: Sat Dec 06, 2008 11:14 pm

Post by JKM »

Oh, sorry about that.

Code: Select all

set data_lines [grab_http_data 2  http://mysite.com/spotInfo.php?uri=${track} "" ""]
returns:

[20:10] Tcl error [SpotInfo_proc]: Unsupported URL: http://mysite.com/spotify.php?uri=4SwVc ... xIiUDLc5?=
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

That error originates from the http-package... Most likely due to the second ? in the URI...
Try using this instead then:

Code: Select all

set data_lines [grap_http_data 2 "http://mysite.com/spotInfo.php" "uri" $track]
That should build the url http://mysite.com/spotify.php?uri=4SwVc ... nexIiUDLc5
NML_375
J
JKM
Voice
Posts: 30
Joined: Sat Dec 06, 2008 11:14 pm

Post by JKM »

Yeah, I tried hundreds of ways, but it turned out that it was the puthelp line (I replaced it with putquick "PRIVMSG $chan :$line").

Thanks for your help! :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Ehhm?
puthelp vs putquick should'nt matter, most certainly not cause an error like that. Happy you got it sorted in the end though...
NML_375
J
JKM
Voice
Posts: 30
Joined: Sat Dec 06, 2008 11:14 pm

Post by JKM »

Ah, I used '"http://mysite.com/spotInfo.php" "uri" $track' and putquick. I tried '"http://mysite.com/spotInfo.php" "uri" $track' a lot of times before you wrote it, but it didn't return any message or errors.
Post Reply