What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » DLL function detection (?) + weird error

Pages: (2): « First « 1 [ 2 ] Last »
DLL function detection (?) + weird error
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: DLL function detection (?) + weird error
quote:
Originally posted by SmokingCookie
Hey, I'm a serious n00b with the for() statement :P (it just doesn't make any sense to me :S )

Well, I think I have some things to experiment with for tonight :P
It's quite simple in fact. :P
  • The first bit (before your first semi-colon ";") is the initial statement. This is what will be executed at the beginning of your loop, and will only be run once. In most cases, you'll want to declare variables used for looping through arrays, enumerators,...
    In our case, we define an Enumerator and a numeric variable to keep track of the counting.
  • The second bit (between your semi-colons) is the conditional statement. Here, you have to put one condition (of course you can use && or || operators) which has to be checked after each loop, including the first one. If this is true, the loop will continue. If not, the loop will end.
    In our case, we make sure that we don't go past the end of the enumerator.
  • The last bit (after the second semi-colon) is the incremental statement. This will be executed after each loop, before the conditional statement is checked again for the next loop. It is normally used to increase the indexes, but in theory you can put anything here.
    In our case, we move the Enumerator to the next item and increase the numeric index by one.
Play around with it, you'll get the hang of it quite fast. In 90% of the cases, it's always the same type you'll use:
code:
for(var i = 0; i < MAX_INDEX; i++) { ... }
where MAX_INDEX can be "SomeArray.length" for arrays, "PlusWnd.LstView_GetCount('SomeListView')" for window list-view controls,... it all depends of the particular case you're dealing with. :P
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
04-14-2008 04:40 PM
Profile E-Mail PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
29 / Male / Flag
Joined: Jul 2007
O.P. RE: DLL function detection (?) + weird error
Well, I came for 2 answers, I got 3, thanks :P

Your explanation looks clearer to me, than the one at MSDN :P

I assume I owe you one? :P
04-14-2008 04:47 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] 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