What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Nudges, Updated.

Pages: (4): « First « 1 2 3 [ 4 ] Last »
2 votes - 2 average   Nudges, Updated.
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Nudges, Updated.
[OFF TOPIC]

quote:
Originally posted by SpunkyLoveMuff
or use a sleep command... I think it has to be called from a dll though =/
The Sleep API wont do anything good. Your messenger will still be froozen. And it will stay froozen even longer than if you didn't used the Sleep API.

The Sleep API does not give resources back to the process it started. The Sleep API just feezes the process; in other words you will not be able to do anything at all..

quote:
Originally posted by Plan-1130
or use a timer, but then again this might cause problems because you need global variables...
It wont give any problems if you program it correctly.

[OFF TOPIC]



quote:
Originally posted by orlandopunk
umm another problem ok i isnyalled it, but now when i put
/nudge <no of nudges>
for example

/nudge <10>

i get this

<10> isnt a number
"<10>" is indeed not a number, but "10" is... you don't need to enter the less than and greater than signs. Those signs are only used to indicate a description of a parameter.



This post was edited on 11-21-2006 at 12:15 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-12-2006 01:18 AM
Profile PM Find Quote Report
Plan-1130
Full Member
***

I keep askin' myself: why?

Posts: 142
73 / Male / –
Joined: Feb 2005
RE: Nudges, Updated.
[offtopic]
Technically that 10 isn't a number either, it's a (sub)string.
In the beginning I had some problems with that as that 10 was NaN (Not a Number).
Comparing the string 10 with the number 10 will result in NaN...
Still I don't know how I got many of my scripts working, as VB provides a function to parse an integer from a string, but I couldn't find any in the MSDN... (not in function, not in methods of object String).
[/offtopic]

This post was edited on 11-13-2006 at 09:19 AM by Plan-1130.
My Scripts: UltimatFlooder, Advanced PSM Chat, PlusPrivacy, PlusRemote

[Image: Plan-1130.png]
11-13-2006 09:18 AM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Nudges, Updated.
quote:
Originally posted by Plan-1130
[offtopic]
Technically that 10 isn't a number either, it's a (sub)string.
In the beginning I had some problems with that as that 10 was NaN (Not a Number).
Comparing the string 10 with the number 10 will result in NaN...
Still I don't know how I got many of my scripts working, as VB provides a function to parse an integer from a string, but I couldn't find any in the MSDN... (not in function, not in methods of object String).
[/offtopic]
For me I just do th following and it works (though I'm probably going about it the wrong way)
code:
[...]
var String = "10";
var Number = new Number(String);
[...]

I couldn't think of any other way of making it a number.  I hope this helps (assuming what I did is correct).
[Image: markee.png]
11-13-2006 09:57 AM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Nudges, Updated.
Just do varName * 1 to convert it, maybe slightly dodgy but short and simple :P
11-13-2006 11:11 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Nudges, Updated.
[OFF TOPIC]

quote:
Originally posted by Plan-1130
Comparing the string 10 with the number 10 will result in NaN...
No...

Comparing it using the Equality Operators (== or !=) or Relational Operators will result in a match.

Comparing it with the Identity Operator (=== or !==) will result in a non-match (thus not an NaN-error). You will only get the NaN-error in specific calculations.

PS: It is preferred to use the Identity Operator (===) as this notifies you of possible type casting problems. It is also faster because JScript doesn't need to convert all variables to the same type, which it otherwise will always do.

See JScript 5.6 Documentation.
quote:
The following describes how the different groups of operators behave depending on the types and values of expression1 and expression2:

Relational (<, >, <=, >=)

* Attempt to convert both expression1 and expression2 into numbers.
* If both expressions are strings, do a lexicographical string comparison.
* If either expression is NaN, return false.
* Negative zero equals Positive zero.
* Negative Infinity is less than everything including itself.
* Positive Infinity is greater than everything including itself.

Equality (==, !=)

* If the types of the two expressions are different, attempt to convert them to string, number, or Boolean.
* NaN is not equal to anything including itself.
* Negative zero equals positive zero.
* null equals both null and undefined.
* Values are considered equal if they are identical strings, numerically equivalent numbers, the same object, identical Boolean values, or (if different types) they can be coerced into one of these situations.
* Every other comparison is considered unequal.

Identity (===, !==)

These operators behave identically to the equality operators except no type conversion is done, and the types must be the same to be considered equal.


quote:
Originally posted by Plan-1130
Still I don't know how I got many of my scripts working, as VB provides a function to parse an integer from a string
JScript too: parseInt(numString, [radix]).

eg: var numTen = parseInt("10");

Also see "CookieRevised's reply to [I help them] VB2JS" for some different uses of that method.

And parseFloat(numString) is the equivalent of the Val() function used on a string in VB.

But also note that in many cases you don't need to use it at all especially because of JScript's automatical type conversion.

If you have a string (eg: "10") and you multiply this with the number 5, JScript will automatically convert the string "10" to number 10, you will not get an error!.

Compare this behaviour with Variants in Visual Basic.

That is why this method works (but also why you almost never need to do this either):
quote:
Originally posted by Eljay
Just do varName * 1 to convert it, maybe slightly dodgy but short and simple :P


quote:
Originally posted by markee
For me I just do th following and it works (though I'm probably going about it the wrong way)
code:
var String = "10";
var Number = new Number(String);
I couldn't think of any other way of making it a number.  I hope this helps (assuming what I did is correct).
It is a correct way, but a long and often useless way... See comments above.

note there is a slight difference between this variable 'var Number' and the variable 'var numTen' from above. 'var Number' is declared as an number _object_, while var numTen is a variable containing a number.

The Number object is rarely necessary and the only usefull purpose is to collect its properties into one object (eg: so you can make your own properties for a number object using protoype) and to allow numbers to be converted into strings via the toString method.


[/OFF TOPIC]

This post was edited on 11-21-2006 at 12:32 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-21-2006 12:12 AM
Profile PM Find Quote Report
Pages: (4): « First « 1 2 3 [ 4 ] 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