Hi Aaron, Honestly I haven't spent a whole lot of time with this for a few weeks now since I kind of got busy with other things and I was at somewhat of a loss as to where to go next. I think if I get back into it I'll figure out what's wrong but I haven't yet.
--Cory -----Original Message----- From: Aaron Smith [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2008 11:39 AM To: [email protected] Subject: Re: debugging AIM scripts Cory, Did you ever get these issues resolved? Aaron Cory Samaha wrote: > Hi Aaron, > > Ahh, yes you're right. I did send what I had to Jared as he seemed somewhat > interested in it. I didn't want to send the whole thing to the list because > it is a bit lengthy but I will include the parts I THINK are relevant to the > errors I'm getting (see below). This is not the entire script but hopefully > it's enough to get the idea. The only thing this attempts to do at the > moment is watch for any new conversation windows that are launched and then > automatically speak the incoming messages much the way Window-Eyes already > does with Windows Live Messenger. Thanks! > > ' Begin Script > Option Explicit > Dim AIMWindows : Set AIMWindows = Windows.FilterByClassAndModule("Internet > Explorer_Server", "MSHTML") > Dim AIMWindowObj > Dim ConvoHistory() > Dim accObj > Dim intHistoryCount() > Dim intConvoWindowCount : intConvoWindowCount = 0 > > ' The OnChildCreat event attempts to watch for any new conversation windows > that may be ' launched and monitor these windows. > > ConnectEvent DesktopWindow, "OnChildCreate", "CheckAIMWindows" > > Sub CheckAIMWindows(WinObj) > If WinObj.ClassName = "Internet Explorer_Server" And WinObj.ModuleName = > "MSHTML" Then > Set AIMWindows = Windows.FilterByClassAndModule("Internet Explorer_Server", > "MSHTML") > ReDim Preserve ConvoHistory(AIMWindows.Count), > intHistoryCount(AIMWindows.Count) > If WinObj.Accessible.Children.Count > 0 Then > If WinObj.Accessible.Children(1).Name = "Conversation history:" Then > For Each accObj In WinObj.Accessible.Children(1).Children > If accObj.Children.Count = 1 Then > If accObj.Children(1).Children.Count >= 1 Then > Set ConvoHistory(intConvoWindowCount) = accObj.Children(1) > intHistoryCount(intConvoWindowCount) = > ConvoHistory(intConvoWindowCount).Children.Count > intConvoWindowCount = intConvoWindowCount + 1 > End If > End If > Next > End If > End If > End If > End Sub > > ' The OnObjectReorder event is associated with a sub that will actually > speak the incoming IM(S) as they are received. > ConnectEvent MSAAEventSource, "OnObjectReorder", "SpeakIncomingMessage" > Sub SpeakIncomingMessage(ConvoWindow) > Dim x, y > If Not ConvoWindow.Window.Overlap Is Nothing Then > If ConvoWindow.Window.Overlap.Classname = "__oxFrame.class__" And > ConvoWindow.Window.Overlap.ModuleName = "AIM6" Then > Sleep(200) > For x = 0 To intConvoWindowCount - 1 > If intHistoryCount(x) <> ConvoHistory(x).Children.Count Then > y = intHistoryCount(x) + 1 > For y = intHistoryCount(x) + 1 To ConvoWindow.Children.Count > Speak ConvoWindow.Children(y).Name > Next > intHistoryCount(x) = ConvoHistory(x).Children.Count > End If > Next > End If > End If > End Sub > > -----Original Message----- > From: Aaron Smith [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 21, 2008 4:53 PM > To: [email protected] > Subject: Re: debugging AIM scripts > > Cory, > > If you can provide some examples of what you're trying to do, you'll get > a lot more help. > > Aaron > > Cory Samaha wrote: >> Hi Everyone, >> >> I'm in the early stages of writing scripts for AOL Instant Messenger, but >> I'm running into a few problems. First, when trying to test the script, I >> sometimes get an error saying that this array is fixed or temporarily >> locked. Yes, I declared it as a dynamic array, and I'm getting the error > on >> a line where I'm trying to resize the array. This does not happen all of >> the time consistently which leads me to believe that it is a timing issue. >> My theory is that multiple events are firing in my script at once and when >> they fire at just the right time I'm getting this error, but I'm not > certain >> of this due to my lack of experience. I was wondering if there is a way > to >> have the script execute more nicely, like wait till the first event's code >> is done executing, then deal with the second event and so on. I looked at >> the script queue method, but this seems to deal more with calling a > specific >> function rather than putting the events into some kind of queue, or maybe >> I'm just misunderstanding. I'm also getting an unspecified error which I >> haven't even begun to address. Is there a way to do what I'm wanting with >> the array issue? >> >> On a similar note, if there are any AIM users who also happen to be >> proficient at VB Script and want to help to see where I might be going > wrong >> I'll be glad to send you what I have so far. Right now I have it where > the >> incoming messages automatically speak at least most of the time. Like I >> said it's not much and I'm in the very early stages, but I'm hesitant to > go >> on before I get some of these early issues ironed out. Thanks much >> everyone! >> >> --Cory >> >> >> __________ Information from ESET NOD32 Antivirus, version of virus > signature >> database 3373 (20080821) __________ >> >> The message was checked by ESET NOD32 Antivirus. >> >> http://www.eset.com >> >> > -- To insure that you receive proper support, please include all past correspondence (where applicable), and any relevant information pertinent to your situation when submitting a problem report to the GW Micro Technical Support Team. Aaron Smith GW Micro Phone: 260/489-3671 Fax: 260/489-2608 WWW: http://www.gwmicro.com FTP: ftp://ftp.gwmicro.com Technical Support & Web Development __________ Information from ESET NOD32 Antivirus, version of virus signature database 3419 (20080905) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
