Thursday, May 5, 2011

Text Field disabling in NetBeans

I want to ask if there is a way to make the text field active and inactive according to the radio button.

For example, the textfield will be inactive and when the user click on the radio button, the textfield will be active.

I am using Java language and NetBeans program

From stackoverflow
  • You could have two radio buttons for representing the active/inactive state. Add an action listener to each and when the 'active' one is pressed you call setEditable(true) on the JTextField and when the 'inactive' JRadioButton is called you call setEditable(false).

    JTextField textField = new JTextField();
    JRadioButton activeButton = new JRadioButton("Active");
    JRadioButton inactiveButton = new JRadioButton("Inactive");
    activeButton.addActionListener(new ActionListener()
    {
        public void actionPerformed(ActionEvent e)
        {
            textField.setEditable(true);
        }
    });
    inactiveButton.addActionListener(new ActionListener()
    {
        public void actionPerformed(ActionEvent e)
        {
            textField.setEditable(false);
        }
    });
    
    3yoon af : It is work .. Thank you for help ..
    willcodejavaforfood : No problems mate :)
  • neceito que cuando le oprima al boton....toda la informacion digitada en unos text.... sea cojida para hacer unas operaciones..podria ayudarme?

Writing AVI files in OpenCV

There example on the net and code given in Learn OpenCv,Orielly.

After many attempts the out.avi file is written with 0 bytes. I wonder where i went wrong.

The following are the code i used...

int main(int argc, char* argv[]) {
    CvCapture* input = cvCaptureFromFile(argv[1]);
    IplImage* image = cvRetrieveFrame(input);

    if (!image) {
        printf("Unable to read input");
        return 0;
    }


    CvSize imgSize;
    imgSize.width = image->width;
    imgSize.height = image->height;



    double fps = cvGetCaptureProperty(
            input,
            CV_CAP_PROP_FPS
            );

    CvVideoWriter *writer = cvCreateVideoWriter(
            "out.avi",
            CV_FOURCC('M', 'J', 'P', 'G'),
            fps,
            imgSize
            );


    IplImage* colourImage;
    //Keep processing frames...
    for (;;) {

        //Get a frame from the input video.
        colourImage = cvQueryFrame(input);
        cvWriteFrame(writer, colourImage);

    }

    cvReleaseVideoWriter(&writer);
    cvReleaseCapture(&input);

}
From stackoverflow
  • Maybe you could try inserting a printf("Frame found\n") inside the for(;;) to see if it is actually capturing frames. Or even better:

    if(colourImage == NULL) {
        printf("Warning - got NULL colourImage\n");
        continue;
    }
    cvNamedWindow( "test", 1);
    cvShowImage( "test", colourImage );
    cvWaitKey( 0 );
    cvDestroyWindow( "test" );
    

    Then see if you get any windows, and if they contain the right contents.

  • My bet is that cvCreateVideoWriter returns NULL. Just step through it to see if it's true. In that case, the problem is probably with CV_FOURCC(..) which doesnt find the codec and force a return 0;

    you can try using -1 instead of CV_FOURCC. There is gonna be a prompt during runtime for you to chose the appropriate codec

    : Thanks Eric you are right
  • I've a problem under MacOs 10.4. When I try to execute this row

    CvVideoWriter *writer = cvCreateVideoWriter(
                "out.avi",
                CV_FOURCC('M', 'J', 'P', 'G'),
                fps,
                imgSize
                );
    

    i've this problem:

    OpenCV ERROR: Internal error (Cannot create data reference from file name) in function icvCreateVideoWriter, cvcap_qt.cpp(1291) Terminating the application...

    any idea?

    Eric : if you have another problem please make a separate question
  • When i google this problem i meet an answer: "OpenCV on mac os x don`t support avi write until it will be compiled with a ffmpeg"

    For me seem to wrok this solution http://article.gmane.org/gmane.comp.lib.opencv/16005

    You need to provide the full path to the file with the movie in cvCreateVideoWriter. I don't know whether it's only an Mac OS X port issue, but might be, since QTNewDataReferenceFromFullPathCFString from the QT backend is used.

  • Friends I faced the same problem; the methods suggested by Eric does work. The problem, i think lies with the availability of the codecs. Thanks to all of you....

  • Hi ,

    I have the following code , and NONE of the functions are returning NULL, so I guess everything is proper.

    But still the file size of the test.avi file is 0 bytes

            CvCapture *pCapturedImage = cvCreateCameraCapture(0); // get the default camera, for me it is a webcam
    

    // Get the avi file name CString strFileName = objFileDlg.GetPathName()+".avi"; // test.avi

            int isColor = 1;
            int fps     = 25;  // or 30
            int frameW  = 640; // 744 for firewire cameras
            int frameH  = 480; // 480 for firewire cameras
            CvVideoWriter *pVideoWriter = cvCreateVideoWriter(strFileName.GetBuffer(),
    

    -1, // I am choosing the uncompressed format** fps,cvSize(frameW,frameH),isColor);

    // pVideoWriter does not return NULL , that means its succesful

            cvNamedWindow("mainWin",CV_WINDOW_AUTOSIZE);
            IplImage *pImage = 0;
    
            int nFrames = 50;
            for(int i=0;i<nFrames;i++)
            {
                  cvGrabFrame(pCapturedImage);          // capture a frame
                  pImage=cvRetrieveFrame(pCapturedImage);  // retrieve the captured frame
                  cvWriteFrame(pVideoWriter,pImage);      // add the frame to the file
    
                  cvShowImage("mainWin",pImage);     // NO IMAGE SHOWS UP
                  cvWaitKey(20);
    
            }
    
            cvDestroyWindow("mainWin");
            cvReleaseVideoWriter(&pVideoWriter);
    

    Please let me know what am I missing out.

    Thanks, Sujay

  • hey This code works in DevC++ try it:

      #include<cv.h>
      #include<highgui.h>
      #include<cvaux.h>
      #include<cvcam.h>
      #include<cxcore.h>
    
      int main()
      {
      CvVideoWriter *writer = 0;
      int isColor = 1;
      int fps     = 5;  // or 30
      int frameW  = 1600; //640; // 744 for firewire cameras
      int frameH  = 1200; //480; // 480 for firewire cameras
      //writer=cvCreateVideoWriter("out.avi",CV_FOURCC('P','I','M','1'),
      //                           fps,cvSize(frameW,frameH),isColor);
      writer=cvCreateVideoWriter("out.avi",-1,
                           fps,cvSize(frameW,frameH),isColor);
      IplImage* img = 0; 
    
      img=cvLoadImage("CapturedFrame_0.jpg");
      cvWriteFrame(writer,img);      // add the frame to the file
      img=cvLoadImage("CapturedFrame_1.jpg");
      cvWriteFrame(writer,img);
      img=cvLoadImage("CapturedFrame_2.jpg");
      cvWriteFrame(writer,img);
      img=cvLoadImage("CapturedFrame_3.jpg");
      cvWriteFrame(writer,img);
      img=cvLoadImage("CapturedFrame_4.jpg");
      cvWriteFrame(writer,img);
      img=cvLoadImage("CapturedFrame_5.jpg");
      cvWriteFrame(writer,img);
    
      cvReleaseVideoWriter(&writer);
      return 0;
      }
    

    I compiled it and ran it, works fine. (I did not see above whether you got your answer or not .. but for this particular thing I worked very hard earlier and suddenly I just did it, from some code snippets.)

  • This code worked fine:

    cv.h highgui.h cvaux.h cvcam.h cxcore.h

    int main(){

    CvVideoWriter *writer = 0;
    int isColor = 1;
    int fps     = 5;  // or 30
    IplImage* img = 0; 
    img=cvLoadImage("animTest_1.bmp");
    int frameW  = img->width; //640; // 744 for firewire cameras
    int frameH  = img->height; //480; // 480 for firewire cameras
    
    writer=cvCreateVideoWriter("out.avi",-1,
     fps,cvSize(frameW,frameH),1);
    
    cvWriteFrame(writer, img);      // add the frame to the file
    
    char *FirstFile,fF[20]="",*fileNoStr,fns[4]="";
    fileNoStr=fns;
    for(int fileNo;fileNo<100;fileNo++){
     FirstFile=fF;   
     itoa(fileNo,fileNoStr,10);
     FirstFile=strcat ( FirstFile,"animTest_");
     FirstFile=strcat ( FirstFile,fileNoStr);
     FirstFile=strcat ( FirstFile,".bmp");
    
     printf(" \n%s .",FirstFile);
     img=cvLoadImage(FirstFile);
    
     cvWriteFrame(writer, img);
    
    }
    cvReleaseVideoWriter(&writer);
    
    return 0;
    

    }

  • I think the problem you're encountering is that your "for" loop never ends; therefore, "cvReleaseVideoWriter(&writer);" and "cvReleaseCapture(&input);" never get called. Try something like "for(int i=0; i<200; i++)" and see if you end up with a working video.

    Often video is written to a temporary files before being finalized on disk. If your file isn't finalized, there won't be anything to see.

    Hope that helps.

Relational Database Options that work with .Net framework aside SQL (Possibly using Linq)?

Exactly what the title says...........any thoughts on other good options for relational database implementation aside from SQL Server DB's.

It's necessary for the .Net Framework to be able to communicate with it also.

From stackoverflow
  • Oracle, Postgres, MySql... the list goes on...

    .NET has native libraries for communicating with SqlServer but you can connect to any DB that has ODBC/OLEDB Support under windows.

  • Depending on what you need it to do, you could use Oracle, Firebird SQL, SQLite, MySQL, BerkeleyDB or a good few others.

  • Plenty of those: Firebird, PostgreSQL, SQLite, MySQL to name a few.

    Don't know about LINQ support over there, though.

methods with the same soapaction

Hi,

I'm doing contract-first development of a SOAP server. The wsdl declares the same soapAction for several methods. Now svcutil produces code that declares the same value for the OperationContractAttribute.Action property of several methods. This causes a runtime error which says that every operation must have a unique action value.

How can I solve this? When I change the value of the Action property my server no longer accepts requests from clients.

Update
It turns out that the soapaction has to be unique if the routingstyle is set to soapaction, which is the default. So I tried setting it to RequestElement. Unfortunately, this causes the server to no longer recognize the client's messages. I had hoped that the Routingstyle would only change the server's internal behavior.

Any tips would be highly appreciated.

Thanks, regards, Miel.

From stackoverflow
  • There is no solution for this in WCF.

    Trying to change the routingstyle as I did, applies to ASMX, not WCF.

    A workaround may be possible, but there's no standard solution.

How can i use ' when - between ' statement in sql?

This query gives me syntax error in when-between line. how can i solve them?

alter FUNCTION [dbo].[fn_GetActivityLogsArranger]
(
@time AS nvarchar(max)
)

RETURNS  nvarchar(max)
AS
BEGIN
declare @Return varchar(30)

select @Return = case @time
when between '15:00' and '15:30' then '15:00-15:30'
when between '15:30' and '16:00' then '15:30-16:00'
when between '16:00' and '16:30' then '16:00-16:30'
when between '16:00' and '16:30' then '16:00-16:30' 
when between '16:30' and '17:00' then '16:30-17:00' 
when between '17:00' and '17:30' then '17:00-17:30' 
when between '17:30' and '18:00' then '17:30-18:00'
else 'Unknown'
 Return @Return
end
From stackoverflow
  • You can't use that format of the case syntax. You will have to do a case which does checks:

    select @Return = case 
    when @time between '15:00' and '15:30' then '15:00-15:30'
    when @time between '15:30' and '16:00' then '15:30-16:00'
    when @time between '16:00' and '16:30' then '16:00-16:30'
    when @time between '16:00' and '16:30' then '16:00-16:30' 
    when @time between '16:30' and '17:00' then '16:30-17:00' 
    when @time between '17:00' and '17:30' then '17:00-17:30' 
    when @time between '17:30' and '18:00' then '17:30-18:00'
    else 'Unknown' END
    
    Return @Return
    

    Also, you were missing an END at the end of your case statement (see END in uppercase above).

  • Well for starters you need to pass your @variable in each when statement

    select @Return = case 
    when @time between ('15:00' and '15:30') then '15:00-15:30'
    when @time between ('15:30' and '16:00') then '15:30-16:00'
    when @time between ('16:00' and '16:30') then '16:00-16:30'
    when @time between ('16:00' and '16:30') then '16:00-16:30' 
    when @time between ('16:30' and '17:00') then '16:30-17:00' 
    when @time between ('17:00' and '17:30') then '17:00-17:30' 
    when @time between ('17:30' and '18:00') then '17:30-18:00'
    else 'Unknown'
    
  • alter FUNCTION [dbo].[fn_GetActivityLogsArranger]
    (
        @time AS varchar(30)
    )
    RETURNS  
    varchar(30)AS
    BEGIN
    declare @Return varchar(30)
    select @Return = case 
    when @time between '15:00' and '15:30' then '15:00-15:30'
    when @time between '15:30' and '16:00' then '15:30-16:00'
    when @time between '16:00' and '16:30' then '16:00-16:30'
    when @time between '16:00' and '16:30' then '16:00-16:30' 
    when @time between '16:30' and '17:00' then '16:30-17:00' 
    when @time between '17:00' and '17:30' then '17:00-17:30'
    when @time between '17:30' and '18:00' then '17:30-18:00'
    else 'Unknown' 
    end
    Return @Return
    end
    
    Mitch Wheat : would downvoter mind leaving a comment please. Thanks
    Phsika : Thank alot. you are correct. Look please another ques.http://stackoverflow.com/questions/829089/how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by
  • You need to have the variable in each WHEN clause eg.

    case 
        when @time between '15:00' and '15:30' then '15:00-15:30'
        when @time between '15:30' and '16:00' then '15:30-16:00'
    
  • case syntax : CASE WHEN Boolean_expression THEN result_expression [ ...n ] [ ELSE else_result_expression ] END

  • You should not use this function, you should have a table or table valued function of time buckets so you can do a pure join against it. See my other post for an example. The join will outperform by far the approach of calling your function on a row set.

How to refactor these 2 similar methods into one?

Hello,

I've seen some samples of using 'T' to make a method reuseable for generic collections of different classes, but I've never really gotten into it or understood the samples.

I wonder if it would be possible to put the 2 methods below into one and what the downsides of doing this would be (performance-wise).

Anyone?

        [NonAction]
        public List<SelectListItem> ToSelectList(IEnumerable<Department> departments, string defaultOption)
        {
            var items = departments.Select(d => new SelectListItem() { Text = d.Code + " - " + d.Description, Value = d.Id.ToString() }).ToList();
            items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" });
            return items;
        }

        [NonAction]
        public List<SelectListItem> ToSelectList(IEnumerable<Function> functions, string defaultOption)
        {
            var items = functions.Select(f => new SelectListItem() { Text = f.Description, Value = f.Id.ToString() }).ToList();
            items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" });
            return items;
        }


SOLUTION

The solution that I used:

usage

var departmentItems = departments.ToSelectList(d => d.Code + " - " + d.Description, d => d.Id.ToString(), " - ");
var functionItems = customerFunctions.ToSelectList(f => f.Description, f => f.Id.ToString(), " - ");

with

 public static class MCVExtentions
    {
        public static List<SelectListItem> ToSelectList<T>(this IEnumerable<T> enumerable, Func<T, string> text, Func<T, string> value, string defaultOption)
        {
            var items = enumerable.Select(f => new SelectListItem() { Text = text(f), Value = value(f) }).ToList();
            items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" });
            return items;
        }
    }
From stackoverflow
  • The old school way would be to create a common interface for both Department and Function:

    interface A
    {
    int ID{get;}
    string Description{get;}
    }
    

    You implement Description on Department to return d.Code + " - " + d.Description. and write the function to use this interface instead of concrete classes:

    [NonAction]
        public List<SelectListItem> ToSelectList(IEnumerable<A> as, string defaultOption)
        {
            var items = as.Select(a => new SelectListItem() { Text = a.Description, Value = a.Id.ToString() }).ToList();
            items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" });
            return items;
        }
    

    EDIT: Regarding using generics, its not going to help much in this case, because

    • the objects you are passing needs to implement Id and Description
    • you are not returning these objects, so in this respect you don't have to care about type safety of generics
    Thomas Stock : Ofcourse! Thanks. I was too stuck thinking about those samples with 'T' that I didn't realize an interface was all I needed. Thanks a lot.
    Svish : I would say using generics and functions would be a better thing to do in this case. Then you don't have to force a bunch of classes into implementing an interface. You might want to use that ToSelectList function on a class that does not have an ID or Description, and where adding it would be not very logical (or for example the Description property should really be called something else).
    Thomas Stock : Thanks Svish. Good point.
  • In fact you can do it with a combination of generics and functions, something along the lines of this (untested may not even compile).

    [NonAction]
    public List<SelectListItem> ToSelectList<T>(IEnumerable<T> en, 
                                                Function<string, T> text, 
                                                Function<string, T> value, 
                                                string defaultOption)
    {
        var items = en.Select(x => new SelectListItem() { Text = text(x) , Value = value(x) }).ToList();
        items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" });
        return items;
    }
    

    Then you can dispatch to it with the appropriate lambda functions (or call directly).

    [NonAction]
    public List<SelectListItem> ToSelectList(IEnumerable<Department> departments, 
                                             string defaultOption)
    {
        return ToSelectList<Department>(departments, d =>  d.Code + '-' + d.Description, d => d.Id.ToString(), defaultOption);
    
    }
    
  • Without implementiong a common interface like @Grzenio suggested, you could use a generic method like this:

        public List<SelectListItem> ToSelectList<T>(IEnumerable<T> enumerable, Func<T, string> text, Func<T, string> value, string defaultOption)
        {
            var items = enumerable.Select(f => new SelectListItem() { Text = text(f), Value = value(f) }).ToList();
            items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" });
            return items;
        }
    
        // use like
    
        t.ToSelectList(departments, d => d.Code + " - " + d.Description, d => d.Id.ToString(), "default");
        t.ToSelectList(functions, f => f.Description, f => f.Id.ToString(), "default");
    
    Thomas Stock : Thanks! This was what I was looking for in the first place. I'll try to implement yours and see if I like working with it
    Motti : Hey my answer is identical and posted three minutes before this answer yet this answer gets 3 votes and mine zero! OK I'll up-vote it anyway, if only for having the generic parameters for Function in the right order...
    idursun : ToSelectList can also be made an extension method.
    Thomas Stock : I'm sorry Motti, but I found your answer to be less clear. I immediatly understood bruno's post because of the usage examples. Will upvote yours now.
    Thomas Stock : I implemented this with an extension method and it looks and feels great! thanks for the help, everybody.

Email to IM gateway, and other ways to send Instant Messages programmatically.

It's very easy to send an email programmatically. For example, in Perl you can do this:

open(MAIL, "|/usr/sbin/sendmail -oi -t") or die;
print MAIL "From: ...\n";
print MAIL "To: ...\n";
print MAIL "Subject: ...\n";
print MAIL "\n";
print Mail "... body ...";
close(MAIL);

I'd like to collect simple, self-contained snippets of code for programmatically sending an instant message (IM) in various languages (especially Perl) and for various protocols (especially jabber/gmail and AIM and Yahoo). See this question for a failed attempt in Perl for gchat: http://stackoverflow.com/questions/799648/error-using-perl-jabber

Or of course if there were an email-to-IM (instant message) gateway then sending an IM would be as easy as email. Perhaps no such thing exists but if anyone makes one, this would be a good place to point to it!

(Keywords to make this question more searchable: email, IM, instant messaging, jabber, xmpp, AIM, yahoo messenger, gmail, gchat, msn.)

PS: It's been over a year now and I suspect these answers are a little stale. Is there a better way to encourage updated answers besides re-asking the question?

From stackoverflow
  • You would need to have an account on the various IM networks, then find an API that can use the account and send messages on that network programmaticly.

    One multi-network library is libpurple (its used by the AdiumX and Pidgin IM clients), there appears to be a couple language bindings to the library:

    A quick search on Google gave me the impression of the availability of bindings for Python and Perl also.

  • Instant Messaging and Email are two different modalities, so you would need to have a custom gateway. This is how I would imagine it would work:

    1. You would create a bot using an API for a particular network: http://dev.aol.com/aim/bots for AOL.
    2. The bot would run as a service and be signed in and would receive emails.
    3. The bot would then create an Instant Messaging conversation with the target and send the message off.
    dreeves : Thanks; smart. I'm holding out hope that I can get something off the shelf to do this. Snippets of code for sending IMs in various protocols would also suffice for me.
  • I think your best bet is to take a look at an open source project and use their code! It saves you the trouble of having to code up each IM provider independently and you know you're getting a tested code base. Win Win!

    Take a look at pidgin it's an open source IM that supports AIM, Google Talk, IRC, MSN, ICQ, Yahoo! and others. And here's their source code information, I believe it is written in C, so you should have no problems interfacing it with Perl.

    dreeves : Has anyone used the libpurple code to make a command line utility to send IMs? That would solve my problem.
  • There is http://sendxmpp.platon.sk/ -- something like sendmail, but for xmpp. Then, from xmpp, you can set up transports for other IM networks.

    I guess this is the simplest method here. However if your program is more like a daemon, sendxmpp will be very slow -- and you'll benefit more from using a proper xmpp library.

  • Or of course if there were an email-to-IM (instant message) gateway then sending an IM would be as easy as email. Perhaps no such thing exists but if anyone makes one, this would be a good place to point to it!

    I'd turn this around - you don't need an email-to-IM gateway as much as you need an interface which sends 'a message' to 'an endpoint' where the endpoint would encode both the user's address and the means (possibly several, with fallbacks) of delivery. Thus, you'd be wrapping up several sending mechanisms (in Perl, pre-existing CPAN modules) with an interface that decides which mechanism to use. Thus all your snippets would end up brought together in a single CPAN module and other people would use it directly.

    While an email-to-IM gateway does solve the problem, who administrates it? If it's on the net somewhere, it's an independent point of failure (and one that sounds ripe for spam forwarding, so it wouldn't be around for long); if it's you, it's a separate component, and one that you'd probably find annoying when you got to the stage of testing your applications.

    dreeves : Excellent points; thanks! Love the meta-CPAN-module idea. Anyone?
    1. I know of a stealth mode startup working on an appliance that does exactly what you seek. It will sell in the $30K range.

    2. You will need an account for each of the IM networks.

    3. The appliance will have the additional capability of receiving IM replies and forwarding back via email.

    Unknown : Are you serious? Amazingly I have code to do this. If I can really sell it for $30k, I guess I should just keep it to myself instead of posting the answer here.
    dreeves : I'll give you 550 reputation points for it. :) I suppose I'd throw in some actual money too, but not thousands of dollars.
  • I know that ColdFusion's latest (and upcoming) version include a SMS Gateway for doing what you seek, but not in the languages that you are looking for. I'll see if I can find out more information for you and try to point you in the right direction. Cheers!

    Kevin Bomberry : Ah, I just remembered that I think I have a bit of code somewhere that has all of the telecom's SMS total length and email to SMS filters. Using this you can trim your message to the length, then send an email to the phone-number/email address and it gets delivered as an SMS (EX. 18005551212@mycinglarwireless.com). If you 'd like I can look for the file or find a posting for you on line and send you a link. Cheers!
    dreeves : As you noted, I was asking about IM rather than SMS. But that sounds extremely useful as well; I'd love to see that.
    Kevin Bomberry : @dreeves: Here's a short list for you: Carrier/Max-chars/email Alltel/300/10-digit-number@message.alltel.com AT&T Wireless/160/10-digit-number@mmode.com Boost Mobile/500/10-digit-number@myboostmobile.com Cingular/150/10-digit-number@mobile.mycingular.com OR 10-digit-number@cingularme.com Metrocall/80-200 depending on plan/10-digit-number@page.metrocall.com Nextel/140/10-digit-number@messaging.nextel.com Sprint PCS/160/10-digit-number@messaging.sprintpcs.com T-Mobile/140/10-digit-number@tmomail.net Verizon/160/10-digit-number@vtext.com Virgin Mobile USA/160/10-digit-number@vmobl.com
  • Here's CPAN modules for all the networks you requested.

    XMPP/Jabber/Google Talk:

    AOL Instant Messanger:

    MSN Messenger:

    Yahoo Messenger:

    dreeves : Thanks! This is the best answer so far. I had tried Jabber::SimpleSend to no avail. I'll try these.
    fiXedd : Thanks, I don't have a lot of experience with these, so I don't have a lot of code examples to offer. Hopefully their docs will prove useful.
  • I was going to add a comment onto fiXedd, but here's some actual sample Perl NET:AIM code from about 10 years ago.

    http://pedram.redhive.com/code/pedbot/