What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » script command error - "Command Requiers Parameter"

Pages: (2): « First « 1 [ 2 ] Last »
script command error - "Command Requiers Parameter"
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: script command error - "Command Requiers Parameter"
quote:
Originally posted by billboy1001
the nick variable is global
please take the time to read my post properly:
quote:
Originally posted by CookieRevised
first, as a sidenote, note that the above fixed scripts all made the nick variable local. Since you use a timer to restore the nickname, that variable should be global (as you did it in your original script) and not local as in the fixed snippets.

quote:
Originally posted by billboy1001
who in the world would have the time to read all that CRAP you just posted? this is why i did not quote you.
thank you for calling hours of work crap...

quote:
Originally posted by billboy1001
The new chat wnd send message funciton you proposed works perfectly, thanks
you're welcome...

This post was edited on 10-23-2006 at 08:38 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-23-2006 08:36 PM
Profile PM Find Quote Report
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
O.P. RE: script command error - "Command Requiers Parameter"
actually now that i did take the time to read, and with a few modifications my script is working perfectly now.

EDIT: how can i make a regular expression to split "hello world, hi" into "hello" and "world, hi" will
code:
RegExp(/^\s+(\S+)\s+(.+)$/i).exec(sMessage)
do it?

This post was edited on 10-23-2006 at 09:12 PM by Baggins.
10-23-2006 09:00 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: script command error - "Command Requiers Parameter"
Make a quicktext with the command and/or perform many custom actions quickly after eachother, you'll see it will screw up.

This is because events are fired before the actual event occurs, not afterwards..., using timers is always tricky and errors could always happen because of timers triggering too soon or too late..., and you can't catch a message being interpreted (the /me command being processed on screen and "« I" being replaced by your nickname) with scripting...

So, you can't make something fail-proof for this, unless you revert to making a proxy and sending your own messages directly via the protocol.

In other words: your script might work, but it will not work perfectly

;)
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-23-2006 09:14 PM
Profile PM Find Quote Report
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
O.P. RE: RE: script command error - "Command Requiers Parameter"
quote:
Originally posted by CookieRevised
Make a quicktext with the command and/or perform many custom actions quickly after eachother, you'll see it will screw up.

This is because events are fired before the actual event occurs, not afterwards..., using timers is always tricky and errors could always happen because of timers triggering too soon or too late..., and you can't catch a message being interpreted (the /me command being processed on screen and "« I" being replaced by your nickname) with scripting...

So, you can't make something fail-proof for this, unless you revert to making a proxy and sending your own messages directly via the protocol.

In other words: your script might work, but it will not work perfectly

;)

but how do i write a regex to split at the first space without the /act
10-23-2006 09:21 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: script command error - "Command Requiers Parameter"
quote:
Originally posted by billboy1001
actually now that i did take the time to read, and with a few modifications my script is working perfectly now.

EDIT: how can i make a regular expression to split "hello world, hi" into "hello" and "world, hi" will
code:
RegExp(/^\s+(\S+)\s+(.+)$/i).exec(sMessage)
do it?


teaching regular expressions via a post here is way to difficult. I suggest you read up on some tutorials. And start by learning the syntax of regular expressions as used in JScript:
* MSDN: Regular Expression Syntax
* MSDN: Regular Expression Object
* some unofficial tutorial (this tutorial is specifically for JavaScript, not JScipt. There are differences!
* etc...

The proper code for what you want could be something like:
code:
RegExp(/^(\S+)\s+(.+)$/i).exec(sMessage)
RegExp.$1 will be "hello"
RegExp.$2 will be "world, hi"

Note that for the above regular expression the sMessage variable _must_ be in the form of "something<at least 1 spacing character>something" or it will not work.

See my long previous post, it includes two pieces of code which split a string into "something" and "all the rest".

This post was edited on 10-23-2006 at 09:30 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-23-2006 09:24 PM
Profile PM Find Quote Report
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
O.P. RE: RE: RE: script command error - "Command Requiers Parameter"
quote:
Originally posted by CookieRevised
quote:
Originally posted by billboy1001
actually now that i did take the time to read, and with a few modifications my script is working perfectly now.

EDIT: how can i make a regular expression to split "hello world, hi" into "hello" and "world, hi" will
code:
RegExp(/^\s+(\S+)\s+(.+)$/i).exec(sMessage)
do it?


teaching regular expressions via a post here is way to difficult. I suggest you read up on some tutorials. And start by learning the syntax of regular expressions as used in JScript:
* MSDN: Regular Expression Syntax
* MSDN: Regular Expression Object
* some unofficial tutorial
* etc...

The proper code for what you want could be something like:
code:
RegExp(/^(\S+)\s+(.+)$/i).exec(sMessage)
RegExp.$1 will be "hello"
RegExp.$2 will be "world, hi"

sweet, thank you
sorry bout the crap thing
10-23-2006 09:26 PM
Profile E-Mail PM Web 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