FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Call Notifier checking Outlook Contacts - Done
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
shosa
Newbie


Joined: 10 Mar 2008
Posts: 6

PostPosted: Mon Mar 10, 2008 7:04 pm    Post subject: Call Notifier checking Outlook Contacts - Done Reply with quote

Hello,

after some toying around I programmed a solution to check incoming calls against your Outlook contacts - I just need to integrate the VB Script I made into the Call Notifier Java Script.

If anyone can give me a hand here since I'm an absolute idiot when it comes to Java Script, I'd be grateful.

Here is what I made in VB. The 'searchString' variable must be the 'thePhoneNumber' from the Call Notifier script.

[code:1]
On Error Resume Next

Const olFolderContacts = 10
Dim arrContacts (1000)
Dim arrLength, ItemCount

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items

ItemCount = 0
For Each objContact In colContacts
line = objContact.HomeTelephoneNumber & objContact.BusinessTelephoneNumber & objContact.MobileTelephoneNumber
dline = Replace (line, " ", "")
line = objContact.FullName & "_" & dline
arrContacts(ItemCount)= line
ItemCount = ItemCount +1
Next

SearchString = "+43664"
For Each InputItem In arrContacts
TempString = InputItem
If InStr(TempString, SearchString) > 0 Then
pos = InStr(TempString, "_")
displayString = Left(TempString, pos-1)
End If
Next
[/code:1]

If you have any questions, just ask - and a big thanks to you Java wiz kids out there!
Back to top
View user's profile Send private message
shosa
Newbie


Joined: 10 Mar 2008
Posts: 6

PostPosted: Tue Mar 11, 2008 1:12 pm    Post subject: Reply with quote

Ok, I've changed the whole stuff to vbs now. Enjoy -
[code:1]
function CallStatusChanged( theTerminal, theCallStatus, thePhoneNumber, theCallType, theCID )

'On Error Resume Next

Const olFolderContacts = 10
Const Title = "Incoming call from "
Dim arrContacts (1000)
Dim arrLength, ItemCount

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items

If theCallStatus = 7 Then
If Not thePhoneNumber = "" Then
ItemCount = 0
For Each objContact In colContacts
line = objContact.HomeTelephoneNumber & objContact.BusinessTelephoneNumber & objContact.MobileTelephoneNumber
dline = Replace (line, " ", "")
line = objContact.FullName & "_" & dline
arrContacts(ItemCount)= line
ItemCount = ItemCount +1
Next

SearchString = thePhoneNumber
For Each InputItem In arrContacts
TempString = InputItem
If InStr(TempString, SearchString) > 0 Then
pos = InStr(TempString, "_")
displayString = Left(TempString, pos-1)
'WScript.Echo displayString
End If
Next
displayString = Title & displayString
Else
displayString = Title & " unknown number"
End If
Call ShowMessage (displayString , NoIcon, -1, 1000)
End If

End Function
[/code:1]
Back to top
View user's profile Send private message
pepe6859
Newbie


Joined: 10 Mar 2008
Posts: 10

PostPosted: Tue Mar 11, 2008 1:27 pm    Post subject: Reply with quote

So when ready to install this will do what Im asking in another post about to display caller name from CALL NOTIFIER right?
The thing is that now I need to syncronize my Nokia PC SUITE with otlook express and till now I've been not able to do so :-(
But a least we are going in the right path jejejejeje
Back to top
View user's profile Send private message
shosa
Newbie


Joined: 10 Mar 2008
Posts: 6

PostPosted: Tue Mar 11, 2008 2:45 pm    Post subject: Reply with quote

This is what the script does - see attached screenshot. Please note that I am using it with Outlook 2007 not Express.


Untitled.jpg
 Description:
 Filesize:  31.62 KB
 Viewed:  32224 Time(s)

Untitled.jpg


Back to top
View user's profile Send private message
pepe6859
Newbie


Joined: 10 Mar 2008
Posts: 10

PostPosted: Tue Mar 11, 2008 2:57 pm    Post subject: Reply with quote

Hi Shosa

Im using office outlook 2007 also (sorry for my mistake)
So that means tha it is already a working script? I copy and paste and thats it?
I did it and not working at all.
I erase the old content and paste the new as it is.

Thankes for any advise.
Back to top
View user's profile Send private message
shosa
Newbie


Joined: 10 Mar 2008
Posts: 6

PostPosted: Tue Mar 11, 2008 3:01 pm    Post subject: Reply with quote

You'll need to edit the xml file so it matches the new filename (callnotifier.vbs not .js)
Back to top
View user's profile Send private message
pepe6859
Newbie


Joined: 10 Mar 2008
Posts: 10

PostPosted: Tue Mar 11, 2008 4:06 pm    Post subject: Reply with quote

I still trying to get a software to make my .vbs jejejeje the HTLM already edited.
Thanks for ur tips
Back to top
View user's profile Send private message
pepe6859
Newbie


Joined: 10 Mar 2008
Posts: 10

PostPosted: Tue Mar 11, 2008 6:14 pm    Post subject: Reply with quote

I dont have the knowlage about debbuger and so on. So not able to install it :?
Back to top
View user's profile Send private message
pepe6859
Newbie


Joined: 10 Mar 2008
Posts: 10

PostPosted: Wed Mar 12, 2008 8:34 am    Post subject: Reply with quote

I'm lost!!!!
Back to top
View user's profile Send private message
pepe6859
Newbie


Joined: 10 Mar 2008
Posts: 10

PostPosted: Wed Mar 12, 2008 11:07 am    Post subject: Reply with quote

:shock: At least Outlook syncronized with my phone!!!! :D :D :D :D
Only the script file still offering resistance jejejejeje
Back to top
View user's profile Send private message
frrik
Newbie


Joined: 16 Apr 2008
Posts: 2

PostPosted: Thu Apr 17, 2008 12:03 am    Post subject: Reply with quote

Hi,

I cant get this to work. It's all done by the book - I think - but I can't figure it out.

This is the log:
Tue Apr 15 19:57:13 2008
Call Notifier - Körningsfel i Microsoft VBScript
[Line: 18 (10)] [color=red]Objektet stöder inte egenskapen eller metoden[/color].: 'objContact.HomeTelephoneNumber'

The RED text reads something like [i]"Object does not support the feature or method"[/i].

HELP PLEASE!
Back to top
View user's profile Send private message
InGeNeTiCs
Newbie


Joined: 30 Apr 2008
Posts: 1

PostPosted: Wed Apr 30, 2008 5:32 pm    Post subject: Reply with quote

Ok, so how do I change the display interval on this? It seems like it only pops up for half a second before it disappears. Hardly long enough for me to decide whether I want to ignore the person calling or not.

Thanks
Back to top
View user's profile Send private message
vwmomo
Newbie


Joined: 23 Aug 2007
Posts: 5

PostPosted: Sat May 03, 2008 2:04 am    Post subject: Just displays Unknown Number Reply with quote

Did everything I was suppose to do and synced my address book from my phone.. Im wondering also if I can get it to show longer its only up for a half a second... Just shows "Incoming call from unknown number"

Thomas
Back to top
View user's profile Send private message
shosa
Newbie


Joined: 10 Mar 2008
Posts: 6

PostPosted: Tue May 06, 2008 1:26 pm    Post subject: Reply with quote

This entry controlls how long the caller ID is displayed

[code:1]
Call ShowMessage (displayName , NoIcon, -1, 10000)
[/code:1]

Edit the "10000" (equals 10 seconds) to fit your needs.

Regards - Tom
Back to top
View user's profile Send private message
shosa
Newbie


Joined: 10 Mar 2008
Posts: 6

PostPosted: Tue May 06, 2008 1:33 pm    Post subject: Reply with quote

Frrik,

this line
[code:1]
line = objContact.HomeTelephoneNumber & objContact.BusinessTelephoneNumber & objContact.MobileTelephoneNumber
[/code:1]
represents the fields which are queried in Outlook (Mobile Phone Number, etc.) - if you use other fields (like Business Phone Number 2 or alike) you'll need to adapt those fields to your needs.

Or your Outlook is not 2007 that is also possible (I'm afraid those objects only exist in Outlook 2007).

Regards - Tom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group