mIRC Homepage

Starting scripts

Posted By: craighorn

Starting scripts - 27/07/03 11:53 PM

I want to start my own mirc script, but i don't know how to start.

wich program's will i need, and so on and so on.

appreciated.

Posted By: codemastr

Re: Starting scripts - 27/07/03 11:59 PM

You need mIRC and the /help command.

/help if-then-else
is probably a good place to start.
Posted By: ParaBrat

Re: Starting scripts - 28/07/03 05:33 AM

there are also lots of scripting tutorials that may help you. Use the search feature here, set it to All FOrums, expand the date range to a few months and use tutorial as search term to find some urls. And of course read the help file and mIRC FAQ smile
Posted By: craighorn

Re: Starting scripts - 28/07/03 10:30 AM

so all i have to do is add some aliases, and i'm of to bussiness.
but how about the pop-up-menus in the nicklist and etcetera?
Posted By: CloCkWeRX

Re: Starting scripts - 28/07/03 10:36 AM

You'll find out about them in due course; the help file will guide you through it all.

Master the Aliases section; the conquer Popups and finally Remotes; then you'll know where to go from there.

The help file *SHOULD* cover these sections well enough for you to land on your feet.
Posted By: shortcircuit43

Re: Starting scripts - 29/07/03 02:05 AM

If you are serious about scripting get a dialouge maker and a debuger addon for your mIRC it makes things go alot quicker also a bracket checker helps lord knows when first making scripts you will forget brackets no doubt about it. There is also a little addon called Scripting for dummies a good little starter info file..

Posted By: Pasmal

Re: Starting scripts - 29/07/03 02:43 AM

*plug* http://helpdesk.zaz.net/tutor/ walks you through writing scripts incl aliases, popups and remotes.
Posted By: Watchdog

Re: Starting scripts - 29/07/03 12:37 PM

If you are serious about scripting get a dialouge maker...

The best dialogue maker is the mIRC script editor.
Posted By: qwerty

Re: Starting scripts - 29/07/03 01:08 PM

Definitely. And the best text editor/web authoring tool is Notepad.
Posted By: Watchdog

Re: Starting scripts - 29/07/03 02:37 PM

Agreed. Notepad rocks.

Down with all these bloggers (Moveable Hype, etc) and coloured text editors.
Posted By: codemastr

Re: Starting scripts - 29/07/03 05:11 PM

Nah, pico beats notepad by a longshot! Notepad lacks some tools that are very useful for script/coding, such as "current line number" and "goto line number" features. Seeing as how mIRC says "....... on line 303" it is nice to be able to quickly jump to 303 without having to count. Pico rules!
Posted By: Watchdog

Re: Starting scripts - 29/07/03 05:30 PM

Notepad has GOTO line number, for some reason the popup is greyed out in Win XP, though it works in Win 2000. I've used Notepad for website coding since I ditched Frontpage and Word about three years ago. I swear by it. It's l337.
Posted By: codemastr

Re: Starting scripts - 29/07/03 05:32 PM

Hmm I haven't tested on 2k, but as you said, it doesn't work on XP. To me, thats too valuable a tool to miss out on.
Posted By: Watchdog

Re: Starting scripts - 29/07/03 05:37 PM

The odd thing is that GOTO is also in Notepad's help file - looks like M$ did a stuffup.
Posted By: Rich

Re: Starting scripts - 29/07/03 05:40 PM

I suppose you ditched Frontpage and Word after you got winXP/200 then?
Because my notepad on win98 doesn't even have shortcut keys for items in the file menu, let alone something as advanced as 'goto line number'
I used it a while for website coding as well though smile
Posted By: Watchdog

Re: Starting scripts - 29/07/03 05:46 PM

Nup, I've used Notepad on Win 98 too. I've rarely used the GOTO function as it is non-existant on 9X flavours. For the most part coding on my website rarely changes so I hardly ever run into bugs. I also keep coding extremely simple and only ever include what is absolutely necessary to make a function work, one of the reasons I did away with Word an Front Page, both those insert so much crap at the top of a page I am surprised that it doesn't crash people's browsers. Websites are the one thing that I just like to use old technology to create high-tech pages with.
Posted By: Collective

Re: Starting scripts - 29/07/03 05:54 PM

Goto only works in notepad if you have wordwrap off.
Posted By: Watchdog

Re: Starting scripts - 29/07/03 06:10 PM

Quite true, I just tried it out. Seems it's not a bug after all. grin
Posted By: codemastr

Re: Starting scripts - 29/07/03 06:13 PM

I guess MS was too lazy to figure out how to count lines when word wrap is on... note how MS Word has no problems figuring it out...
Posted By: Watchdog

Re: Starting scripts - 29/07/03 06:54 PM

It would be handy to have in both modes, that's for sure.
Posted By: saxon

Re: Starting scripts - 29/07/03 07:00 PM

Am I the only person that detects sarcasm in qwerty's reply?

I have to say I agree with that sarcasm, the best way to make Dialogs is with a dialog editing tool. Why? because a dialog is a visual GUI element, it only makes sense that designing it visually will produce better results. There's no advantage to designing it in mIRC, at all. You can fine tune your dialog in a dialog editor just as easily as you can in mIRC, I mean just because you align controls with a mouse doesn't mean there is any more scope for mis-alignment (if thats your quibble), The pixels where you place these elements are displayed right there in the IDE.

Watchdog, I am suprised a user of Visual Basic regards visually designing GUI elements to be inferior to typing. If that is true then what is the advantage of VB to other language's.

Making dialogs without an Visual tool is a trivial task, albeit tedious, and isn't the hallmark of an excellent scripter. Anyone can do it. Infact that's how most of started off.
The only difference is that it's more time consuming. And this isn't one of those matter of prefernce issues, anyone who spends an hour doing what could be done in 10 minutes with an Dialog editor is a fool. It's not even a creative achievement, it's not like making a picture window GUI, very little knowledge is involved in making a dialog table!

I would disagree with the idea that to be serious about scripting you have to use a dialog editor but thats no reason to swing to the other extreme of foolishness.

Maybe im over-estimating qwerty and no sarcasm was intended, but my point still stands.
Posted By: Watchdog

Re: Starting scripts - 29/07/03 07:25 PM

If that is true then what is the advantage of VB to other language's.

Well it's the easiest and quickest way to code ASP pages for a start, and as the default server-side language for IIS, probably the most appropriate language.

Making dialogs without an Visual tool is a trivial task, albeit tedious, and isn't the hallmark of an excellent scripter. Anyone can do it. Infact that's how most of started off.

To each their own. However I cannot understand why I should be expected to use someone elses work to create my own work. Even in Microsoft Development Environment, while you can 'draw' a dialogue, you still code the functions manually in an editor.

My crack about Notepad being l337 was sarcastic. I don't consider myself to be a gun coder, I just enjoy knowing that I can do something without having to either:

1. Prove it to others for the sake of letting them know I can do it.
2. Use someone elses scripting or tool to achieve it.

The only difference is that it's more time consuming. And this isn't one of those matter of prefernce issues, anyone who spends an hour doing what could be done in 10 minutes with an Dialog editor is a fool.

I've made a dialogue with 2300 lines of scripting - it's called a channel central. Don't expect to emulate that in a dialogue maker. I would in an instant question the ability of a dialogue maker to achieve what I did manually in that respect. The feature list is simply too rich to consider anything else.

I would disagree with the idea that to be serious about scripting you have to use a dialog editor but thats no reason to swing to the other extreme of foolishness.

I didn't "swing to" anything. That is my point. I use the mIRC editor to make dialogues and won't be changing that.

Final points: Isn't it possible that a dialogue maker could still produce bugs? If so wouldn't that require some stuffing around to sort out? As for VB, well, I code that manually in Notepad because the functions I require for my website do not require the need to do the job in MS Dev.
Posted By: Hammer

Re: Starting scripts - 29/07/03 07:50 PM

  1. VBScript (not Visual Basic) is the default language for IIS. VBScript is not visual, VB is.
  2. I believe he's referring to Dialog Studio. It is not used to create the entire script, merely the dialog tdefDName { portion, or at least the start of a complex one.

    I like DStudio because I can quickly and visually put the controls onto the form, size and position them so they complement each other, etc. Then I can just take the resultant table definition over to mIRC and make it active to make sure everything looks good. Then the real work begins of making each of the controls do what you have designed for them to do. I don't know of a similar integrated development environment (IDE) to VB's that allows you to double-click the control to get into the code section for that control and create the appropriate event header.

    I don't use DStudio all the time, but I do when I care if the dialog looks visually appealing and logically laid out. For a simple table definition for a sample dialog to answer a question, I don't bother firing up DStudio. size -1 -1 300 300 will work, and you can add basic (and ugly) control dimensions for a simple example because the visual appeal is immaterial.

    I do use Notepad to write most of my web pages because it does the job I need it to do, without all the bells and whistles I don't need for something I know how to do. If, however, I need to manage an entire project/site conveniently, I prefer to use UltraEdit -- which is basically just a souped-up Notepad with some nifty features, most of which are non-intrusive to my standard operating procedures.
  3. Again, something like DStudio is not a full IDE, just a visual table definition maker.
  4. DStudio create bugs? No. You will probably still want to do some tweaking. I prefer to use my own ID numbering system (i.e., listboxes/combos are in the 100s, edits/texts are in the 200s, etc.). I frequently adjust the order of controls to modify the z-index (tab order).

    You do not code Visual Basic manually; as noted above, you code VBScript in Notepad (as do I).
Posted By: starbucks_mafia

Re: Starting scripts - 29/07/03 07:53 PM

Dialog makers merely produce the visual aspect of the dialog - the actual table layout. There is no 'feature set' which they can't replicate because it is not the job of a dialog maker to create the feature set. And for creating the table layout, a visual interface is many times faster and more intuitive than hand-typing them.
Posted By: qwerty

Re: Starting scripts - 30/07/03 12:03 AM

You got it right, it was sarcasm. What you said are exactly my views on the dialog creation subject. Just as Dialog Studio is a million times more practical and specialized for creating dialogs, Wordpad/Word etc are far more practical and specialized for (non-elementary) text editing. That doesn't mean I underestimate Notepad, just as I don't underestimate the mirc Editor of course: apart from dialog editing, I script solely in the mirc Editor. Also, I do 90% of my everyday text-related tasks in Notepad. But I believe that there are tools that do a specific job (or a bunch of jobs) far more efficiently. And it just doesn't feel right not to use them.
Posted By: Watchdog

Re: Starting scripts - 30/07/03 01:47 AM

That's the thing though, if one is powering through work then a Visual tool would come in handy, it's no different to a web developer using Dreamweaver instead of Notepad. There's a big difference between me and someone that makes websites for a living though. As there is a big difference between myself, a casual (if that much) script writer these days. I only make scripts for myself at the moment and I rarely use dialogues for them as I think they are over-used and over-rated in scripts. I am still happy powering many functions with popups where appropriate. blush

You are right about VB and VBScript, please excuse my slight oversight there. I have a habit of calling the lot VB but that is because I am lazy. :tongue:

Perhaps the mIRC script editor and Visual dialogue makers both have their place, coding manually is just my preference though. grin
Posted By: saxon

Re: Starting scripts - 30/07/03 08:31 AM

Quote:
To each their own. However I cannot understand why I should be expected to use someone elses work to create my own work.


Well that's an odd way to look at it. It's like an artist refusing to use a Paint brush or a canvas that someone else has made, Or a builder refusing to use a hammer or drill because he didnt make it himself. In the end, the tools you use aren't as important as the quality of the finished work. In the extra time wasted by hand coding dialog tables, you could be improving other features / eliminating bugs.

Unless ofcourse you actually enjoy making dialog tables by hand, but the reason you gave was that you don't like using someone else's work (dialog editor).
Posted By: Watchdog

Re: Starting scripts - 30/07/03 09:47 AM

It's not really, as indicated above the dialogue editors don't add the functionality, just the dialogue itself. If I was to make my channel central again the dialogue editor would do about 10% of the required work as the other 90% is the 'functionality', not the dialogue itself. I'm just saying that in my case it's not worth the effort. Making the dialogue itself is the easiest part.



It's all a matter of personal preference but I think this is well laid out. Making this visually wouldn't, in my view, do a better job. Quicker maybe, better probably not.
Posted By: starbucks_mafia

Re: Starting scripts - 30/07/03 10:52 AM

No, probably not better, but what's wrong with it just being quicker? When you were making that layout how many dozen times did you have to set positions, apply the changes, load the dialog, then close it and repeat the process because some text was being obscured by another control or things weren't aligned just right? From your previous misunderstanding of what most mIRC dialog creators do, it's clear you haven't used one before. It puzzles me why someone would outright refuse to use something, claiming they preferred their way, without even trying the method which is used and preferred by somewhere around 90% of all scripters (at a complete guess).
Posted By: Watchdog

Re: Starting scripts - 30/07/03 04:03 PM

I did try one once. It wasn't Dialogue Studio, but something else, though I froget the name as it was some years ago now. At the time I just believed it to be a gimmick more than a fairdinkum tool. It worked reasonably well but didn't do anything that I couldn't do myself. I dpn't dispute that speed can be an important factor for those that have to have it done right now but that issue isn't important to me.

I dispute your claim about 90% of scripters using a visual dialogue editor though. While such things may be popular I doubt they have such a commanding peneration of the 'market'. I know several scripters personally and they do not use such things. In relation to websites their attitude is the same, they use either Notepad or something like U-Edit or Edit Plus.

I am in the middle of replacing my website and I am hand-coding the lot using Notepad, one of the reasons why I don't write mIRC scripts at the moment. I'm in no hurry as I want everything perfect. At the end I will have a site that works in ALL current browser versions on Windows, Unix and Apple and it will also comply with XHTML 1.1 + CSS (Strictly) - something I could not achieve with Dreamweaver and other leading web-dev software.

There is no doubt at all that visual creation is quicker, infact far quicker, but that can come at a cost at times.
Posted By: starbucks_mafia

Re: Starting scripts - 30/07/03 04:18 PM

I too hand-code websites. For a couple of years solid I've been using Textpad to write my sites to various W3C recommendations/standards (HTML4, CSS1/CSS-P, CSS2, XHTML), simply because the code produced by website design tools is non-standard, incompatible, inefficient, and just plain ugly. That's not an issue for dialog creation though, there are no interpretation or compatability issues, the code is either right or wrong. The popular dialog creation tools will invariably get things right.

As for my 90% estimate, maybe it's wrong. But I can tell you that I know the coding habits of around 30 or so mIRC scripters, and I can't think of a single one who I know that hand-writes their dialog tables. In fact I was probably the last of them to 'convert'.
Posted By: Watchdog

Re: Starting scripts - 30/07/03 04:29 PM

...because the code produced by website design tools is non-standard, incompatible, inefficient, and just plain ugly.

That is largely because the myriad of browsers out there are authored by consortiums that cannot agree on how to render pages. IE does one thing, NS does another Opera does another and then all Apple browsers including the Apple version of IE does something else again.
Posted By: KingTomato

Re: Starting scripts - 30/07/03 09:07 PM

Yes, but im not sure how NS or Opera display webpages, but IE i know uses the ActiveX control.. So you really cant blame the software at an application level.. >:D

Also as for the notepad discussion..
Notepad (XP Home/Pro) come with a status bar that displays line/column as well as a goto line (ctrl+g). laugh
Posted By: codemastr

Re: Starting scripts - 30/07/03 09:10 PM

Except, again for reasons that boggle my mind, the status bar can't be displayed if you enable word wrap.
Posted By: KingTomato

Re: Starting scripts - 30/07/03 09:11 PM

hmm.. ur right... I dont use wordwrap anyways so no biggie for me.. but kind of interesting >:D
Posted By: Hammer

Re: Starting scripts - 30/07/03 11:22 PM

I have been know to script. I use Dialog Studio occasionally, when I want to get a well-designed dialog up, quickly and easily. Then I tweak the resultant dialog table manually in mIRC's editor.

This is the way every decent scripter I know personally works as well (that I've discussed it with). I know a few scripters *wink*. Notice the use of the word "every"; I don't know anyone who doesn't use it that scripts dialogs -- not anyone. Therefore, based on my own experience, I would say that 90% is quite low.

Dialog Studio CAN do what I cannot...allow me to add controls, size them, move them, etc. visually until I have them where I feel they work best. That would take hours to do by changing the x y w h values by hand (and yes, I and every scripter I know has done that before too -- frequently).

Deciding not to use a tool like Dialog Studio is your choice, but it is based on "old skool" attitude or pure cussedness -- also your choice.

As for the design of your dialog, I think it's entirely too cramped...it desparately needs whitespace around most of the controls. Not much, perhaps, but definitely more than what's there. In Dialog Studio, making those changes would be trivial. Using solely mIRC's editor, it would take you much longer, even if you worked out the changes mathematically...and then tweaked them to what finally looked good.
Posted By: Watchdog

Re: Starting scripts - 31/07/03 12:56 AM

Nah, if I was 'old school', I'd be using Unix. laugh
Posted By: codemastr

Re: Starting scripts - 31/07/03 02:38 AM

Unix has IDEs available as well wink
Posted By: Watchdog

Re: Starting scripts - 31/07/03 04:42 AM

True though I am only referring to the fact that Unix has been around longer.
Posted By: LocutusofBorg

Re: Starting scripts - 31/07/03 07:58 AM

Sorry to break the dream Hammer, but not every scripter you know that does dialogs uses DialogStudio. Give you one guess who doesn't smile
Posted By: feud

Re: Starting scripts - 31/07/03 01:33 PM

Deciding not to use a tool like Dialog Studio is your choice, but it is based on "old skool" attitude or pure cussedness -- also your choice.

while it's true that it is my choice, but i don't hand code all of my dialogs because of an "'old skool' attitude". hell, i wasn't even around for this so-called 'old skool'. i code all my dialogs by hand because i can do the arithmetic to properly align my controls in my head. it's pretty trivial, isn't it?

anyway, the point of this post wasn't to pat myself on the back for being one of the few (though i doubt this) that still hand code dialogs (though i think i did that too), i just wanted to be a voice for the few.
Posted By: sparta

Re: Starting scripts - 11/08/03 12:34 AM

hmm.. been reading all ur posts about dialogs.. its more fun to create/edit ur dialog true mirc editor.. i have seen som Dialog Creators.. they work ok, but when your done you have to edit them true mirc anyway.. i cant say i ever have seen any dialog created by "Dialog Studio" or tools like that look as good as "hand made" dialogs.. bether to do them ur self.. laugh thats half the fun smirk wink
Posted By: Watchdog

Re: Starting scripts - 11/08/03 11:54 AM

I'm glad that someone thinks like me on this subject hehe.
Posted By: sparta

Re: Starting scripts - 11/08/03 03:52 PM

crazy
Posted By: KingTomato

Re: Starting scripts - 11/08/03 07:11 PM

half the fun, and twice the time (if not greater).

Also, hasnd made dialogs tend to be boxy, as you relate one if off of another.. "Well this one is 5 over, and spans 25 pixels, this wonw will start at 30 pixed, and end at dialog.width-10 pixels
Posted By: Watchdog

Re: Starting scripts - 11/08/03 08:55 PM

Using a dialogue editor is synthetic. Admittedly it takes longer than double the time to make one by hand, though it is more enjoyable though I realise this is a matter of personal choice. One would get more satisfaction through knowing they did it by themselves though. blush
Posted By: sparta

Re: Starting scripts - 11/08/03 08:57 PM

yes, agree, it feels like "i did that" not a stupid program wink smirk
Posted By: Hammer

Re: Starting scripts - 11/08/03 09:30 PM

I did not mean to imply that using DStudio (or any such tool) is perfect. There are no (zero) dialogs that I have created in DStudio that don't need a bit of tweaking to finally end up pleasing me; I almost always have to change the ID order to match my own personal ID numbering scheme, and there are usually pixel changes I have to make, again, to please my exacting standards for "production dialogs" (I use Magnifier to see the actual pixels and get everything lined up exactly as I want it). Then again, I use only one scripted dialog regularly in "my collection of scripts" (rather than "my script"): my MP3 player.

However, DStudio "gets me in the ballpark" far faster than coding the entire dialog table from scratch. Then it's just a matter of tweaking after that (which is where the real fun lies - not in getting them close enough to tweak!).
© 2022 mIRC Discussion Forums