HELP - Searching for "7"? - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: HELP - Searching for "7"? (/showthread.php?tid=89447) HELP - Searching for "7"? by whiz on 03-01-2009 at 10:23 AM
js code: js code: If I type "!search google test page", the term is from parameter 2 onwards ("test page"), and the search engine is parameter 1 ("google"). However, typing this in results in a Google results page for the term "7". Similarly, replace "google" with "yahoo", and the term, no matter what is entered, is set to "6". I've also tried using variables to store the engine/term, but the same happens. Why? RE: HELP - Searching for "7"? by Matti on 03-01-2009 at 10:37 AM
quote:Do you even read what you're highlighting? js code:Look what you're sending as your first parameter. What is the result of executing "Parameter[1].length + 1", you think? ...A string? I don't think so. You're taking the length of Parameter[1] ("google" or "yahoo", so 6 or 5) and add 1 to it, resulting in either 7 or 6 - just like you found out. My guess is that you wanted to get the substring starting at that position, since that's where your search terms start. So, basically, you replace the first two highlighted lines with: js code: These are the kind of things a script developer should be able to debug and find the problem by himself... RE: HELP - Searching for "7"? by whiz on 03-01-2009 at 10:41 AM ...oh, I get it now. Thanks. |