mIRC Homepage
Posted By: PhireCoder /editbox -A - 12/09/07 02:46 PM
/editbox -A switch (uppercase)
Append to current text
Posted By: argv0 Re: /editbox -A - 12/09/07 11:31 PM
or simply /editbox -a $editbox($active) APPENDEDTEXT
Posted By: PhireCoder Re: /editbox -A - 13/09/07 08:09 AM
Yeah.... No.
Not the same thing
That command "re-puts" the whole line every time you use it(Really Slow). AND moves cursor to end of line...

I know you can do that I'm not stupid...

Anyways...

-S(uppercase) To Enter Selected Text would be nice too... especially in combination with -A switch ...
(AND YES CAPTAIN OBVIOUS I KNOW -b and -e)
But these would make things a Whole Lot Easier and Faster (Internally)

Example:
(In-Line Auto Completer - Event)
Code:
on *:keyup:*:*: {
  if ($keychar isalnum) {
    if ($hfind(ac,$+($gettok($editbox($active),$numtok($editbox($active),32),32),*),1,w)) {
      editbox $+(-ab,$calc($len($editbox($active)) + 1),e,$calc(($len($editbox($active)) + 1) + ($len($v1) - $len($gettok($editbox($active),$numtok($editbox($active),32),32))))) $+($editbox($active),$right($v1,$calc($len($v1) - $len($gettok($editbox($active),$numtok($editbox($active),32),32)))))
    }
  }
}


vs.

Code:
on *:keyup:*:*: {
  if ($keychar isalnum) {
    if ($hfind(ac,$+($gettok($editbox($active),$numtok($editbox($active),32),32),*),1,w)) {
      editbox -aAS $right($v1,-1)
    }
  }
}
Posted By: argv0 Re: /editbox -A - 13/09/07 04:53 PM
Faster by what? 2 ticks? Maybe Khaled should make a switch for me in /server that will join all the channels i need, acquire all the op status and nick registrations, and even start talking for me! We'll call it -woot. It will be so much faster and more efficient!

But really.. adding another switch to save a few lines of code just increases complexity unnessesarily.

Everything you suggested above can already be done is equally simple with current switches-- and I wouldn't buy "it's faster" or "more efficient" unless you've actually benchmarked the time, otherwise there's really no evidence whatsoever.

By the way, I simplified your code (and made it more efficient) by not reusing the same identifiers over and over:

Code:
on *:keyup:*:*: {
  if ($keychar isalnum) {
    var %a = $editbox($active), %la = $len(%a) + 1
    var %na = $numtok(%a, 32), %ga = $gettok(%a, %na, 32)
    var %lga = $len(%ga), %ldiff = $calc($len($v1) - %lga)
    if ($hfind(ac,$+(%ga,*),1,w)) {
      editbox $+(-ab, %la, e, $calc(%la + %ldiff) $+(%a, $right($v1, %ldiff))
    }
  }
}


Sure, you can *try* and make the comparison look ugly by making the line extremely long and not using any vars, but the truth is, your code will look more like the above, which is pretty manageable.
Posted By: PhireCoder Re: /editbox -A - 13/09/07 10:13 PM
lmfao, you've got issues bub... seek help smile
Posted By: bwuser Re: /editbox -A - 14/09/07 12:52 AM
~This post is now a stress free zone~
Posted By: PhireCoder Re: /editbox -A - 14/09/07 01:29 AM
lol that's funny...
well actually, arg is somewhat right.... i just think some of his concepts of a rational feature suggestion are very misunderstood... A suggestion doesn't have to compensate for 100's of lines of scripting to be desired, and yeah his code doesn't work, was missing a )
er...
well still doesn't work after adding that but i still get the idea...
but I didn't try to make any of my examples look more complicated than the other... if you look at them i didn't use vars in either of them... The reason was that i DID test them and found that it's faster without the vars... with that particular snip of code I was trying to extract as much speed as i could... and that was the reason for the suggestion... It wouldn't just make it "2 ticks faster" on my comp that code snip is very laggy.. which makes sense because it rewrites the line entirely, it doesn't take a genius to figure out that just appending text would be WAY faster AND work exactly as desired, which currently it doesn't, but really It's not that big a deal guys I wasn't tryin to make anyone argue on here...
But anyways bw, I don't let anything get to me, I'll still make suggestions... Prolly one's even more useless than this smile

Can't we all just get along :P
Posted By: Mentality Re: /editbox -A - 14/09/07 01:33 AM
I was going to edit bits and bobs of your post to include valid opinions, but, partly because you chose to type it entirely in caps, I ended up deciding the entire post was a long ranting flame.

I think everyone needs to read this.

Particularly relevant I think are:

Quote:
please keep posting constructive criticism. Improve on suggestions or show the poster why his suggestion just wouldn't work or make sense ("you can script it" is not a valuable response).

Remember that people come in here looking to pitch an idea to Khaled, not for other forum members to shoot ideas down.


and

Quote:

Has my idea been brought up before?
Be sure to search the forums first! Failure to search first is rude to those of us who read the forum.
Will my idea benefit lots of users?
I rarely see features added that benefit just a handful of users. You should try to stick to suggestions that would help lots of people.
Would it be easy to write a script for my idea?
If it's something that is very easy to do with scripts, chances are it won't be built into mIRC. (This isn't always the case, but should be considered when posting your idea.)


Regards,
Posted By: bwuser Re: /editbox -A - 14/09/07 02:20 AM
~ Now you're just being facetious, and if you do it again, you'll lose your posting privileges smile ~
© mIRC Discussion Forums