What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [problem] Buttons in windows

Pages: (5): « First « 1 [ 2 ] 3 4 5 » Last »
[problem] Buttons in windows
Author: Message:
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
ok, thanks :)
[Image: waynewilson2@hotmail.com-12.png]
10-23-2007 08:55 PM
Profile E-Mail PM Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
is there any way to check if the array's string contains the string, but is not exactly alike it?? :S :S
[Image: waynewilson2@hotmail.com-12.png]
10-23-2007 09:02 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [problem] Buttons in windows
quote:
Originally posted by waynewilson2
is there any way to check if the array's string contains the string, but is not exactly alike it?? :S :S
this is close to what i used in WLMini Media Player:
code:
for(x in somearray){
if(somestring.search(somearray[x]) != -1){
Debug.Trace(somearray[x]); // prints the found stuff.
}
}

This post was edited on 10-23-2007 at 09:36 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
10-23-2007 09:36 PM
Profile PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
lol, a bit confusin, but ill figure it out, thanks roflmao
[Image: waynewilson2@hotmail.com-12.png]
10-23-2007 09:44 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: [problem] Buttons in windows
code:
for(x in somearray){ //For each array element
    if(somestring.search(somearray[x] != -1){ //search the target text for array element
        // !=-1 means the string text was found (only returns -1 when text is not found, else returns the index or position of the first character
        Debug.Trace(somearray[x]); //Print it so we know it found the text
    }
}

Just to try and explain it :p

This post was edited on 10-23-2007 at 10:13 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-23-2007 10:12 PM
Profile PM Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
umm...i tried that, and every time i try to search the array, it returns this in the debug window...
code:
Error: Expected ')' in regular expression (code: -2146823268)
       File: my pm chat.js. Line: 150.
Function OnEvent_ChatWndReceiveMessage returned an error. Code: -2147352567


help please :S

the code im using to search is like this(vars are defined)
code:
function filtaNow(ChitChatter, tehmess){
    for(x in filta0){ //For each array element
        if(tehmess.search(filta0[x]) != -1){ //This is line 150
        // !=-1 means the string text was found (only returns -1 when text is not found, else returns the index or position of the first character
            Debug.Trace(somearray[x]); //Print it so we know it found the text
        }
    }
   
}


This post was edited on 10-24-2007 at 05:16 AM by waynewilson2.
[Image: waynewilson2@hotmail.com-12.png]
10-24-2007 05:13 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: [problem] Buttons in windows
you have to Debug.Trace(filta0[x]); not somearray[x]...

As for the error... check what filta0[x] is by tracing it on line 149. It may be that it is empty or something strange

This post was edited on 10-24-2007 at 11:20 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-24-2007 11:17 AM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [problem] Buttons in windows
The problem was in spuky's post.
quote:
Originally posted by SpunkyLoveMuff
code:
for(x in somearray){ //For each array element
    if(somestring.search(somearray[x]) != -1){ //search the target text for array element
        // !=-1 means the string text was found (only returns -1 when text is not found, else returns the index or position of the first character
        Debug.Trace(somearray[x]); //Print it so we know it found the text
    }
}

Just to try and explain it :p


Edit: in relation to spunky's next post....
quote:
Originally posted by SpunkyLoveMuff

quote:
Originally posted by markee
spuky's
* spuky runs :p
Maybe I wanted to shorten it more 8-)

This post was edited on 10-24-2007 at 01:10 PM by markee.
[Image: markee.png]
10-24-2007 11:25 AM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: [problem] Buttons in windows
erm...
* Spunky runs

EDIT:

quote:
Originally posted by markee
spuky's

* spuky runs :p

This post was edited on 10-24-2007 at 12:49 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-24-2007 12:47 PM
Profile PM Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
thanks for the help, i got it to work now, but...
when it calls that for statement, it just makes a list of every string in the array...i don't see why, and when i change
code:
if(temess.search(filta0[x] != -1)){
to
code:
if(temess.search(filta0[x] != -1) == 0){
it returns nothing at all...

would it be possible to use a while statement, rather than a for statement? :S :S
[Image: waynewilson2@hotmail.com-12.png]
10-24-2007 08:19 PM
Profile E-Mail PM Find Quote Report
Pages: (5): « First « 1 [ 2 ] 3 4 5 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On