Earthshine Posted April 23, 2019 Posted April 23, 2019 yes. I was using it with some success, but can't call the method to start the connection My resources are limited. You must ask the right questions
jantograaf Posted April 23, 2019 Author Posted April 23, 2019 Let's see, I'm at my PC now so I'll try this UDF and see how far I get. Thanks a lot! I'll keep you guys posted!
jantograaf Posted April 23, 2019 Author Posted April 23, 2019 Alright, this is not going to be easy, that's for sure. I am indeed able to load the library, but after that I'm completely in the dark as well... Local $oCallCenter = _CLR_LoadLibrary("C:\Program Files (x86)\JUstPhone\Callcenter\SDK\bin\RemotePhoneService.dll") MsgBox(0,"Result","$oCallCenter: " & IsObj($oCallCenter) & @CRLF) Local $oApplication = _CLR_CreateObject($oCallCenter,"JustRemotePhone.RemotePhoneService.Application") MsgBox(0,"Result","$oApplication: " & IsObj($oApplication) & @CRLF) The first result is 1, since the library is loaded. The second, however, stays 0, and I've tried a lot of possible variations on that classname...
water Posted April 23, 2019 Posted April 23, 2019 I think the thread for the NET UDF is the best place to get more help. If they can't help then I don't know who else 😯 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
TheXman Posted April 23, 2019 Posted April 23, 2019 (edited) 11 hours ago, jantograaf said: Since the API is installed together with their standard software (no seperate installer) and I've just double-checked that I didn't need to check any additional options in the installer to activate this, it should be installed. I am also the admin-user on my local desktop, so I should have all rights to installed objects. Here is a screenshot from within OleView: Thanks for your replies, guys, I'm sure it'll be something very stupid and simple somewhere... Kudos! According to the OleView image above, the object name should be "JustRemotePhone.RemotePhoneService.ApplicationFactory". What I usually look for when trying to figure out what the object name should be, is the ProgID or the VersionIndependentProgID if it has one. The following example appears to successfully create the application object for me. If you change "ApplicationFactory" back to just "Application" and run the example, you will see that it fails with an invalid class string error (as I think was stated earlier). #include <Constants.au3> example() Func example() Local $oComErr, $oApp $oComErr = ObjEvent("AutoIt.Error", "com_error_handler") $oApp = ObjCreate("JustRemotePhone.RemotePhoneService.ApplicationFactory") If @error Then Exit MsgBox($MB_ICONERROR, "ERROR", $oComErr.WinDescription) MsgBox($MB_ICONINFORMATION, "INFO", "Application object successfully created!") EndFunc Func com_error_handler($oError) Return EndFunc Edited April 24, 2019 by TheXman Skysnake and Earthshine 2 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
jantograaf Posted April 24, 2019 Author Posted April 24, 2019 Yeah, I can connect the ApplicationFactory-object as well, without any issues, but this ApplicationFactory-object is mentioned nowhere in RemotePhone's API. So, I contacted them to see what possibilities there are to get this to work. If I find out more, I'll post it here... Greetings! Earthshine 1
Danyfirex Posted April 24, 2019 Posted April 24, 2019 (edited) Hello. my two cents... expandcollapse popup#include <MsgBoxConstants.au3> Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") ;Register AutoIt Error handler Global $oObject = ObjCreate("JustRemotePhone.RemotePhoneService.ApplicationFactory") ;Create Main object ConsoleWrite("-oObject: " & IsObj($oObject) & @CRLF) Global $oApplication = $oObject.CreateApplication("AutoIt Client") ;Create Application If Not IsObj($oApplication) Then Exit MsgBox($MB_ICONERROR, "Error", "Unable to Create 'Remote Phone Call' Instance") EndIf Global $sNumber = InputBox("Add a number to be Called", "Phone Number", "") If Not $sNumber Then Exit MsgBox($MB_ICONINFORMATION, "Error", "Phone Number is Emtpy Script will Exit.") $oApplication.BeginConnect(True) ;Begin Connection ;You probably will need to grant accest to the application at this point. Global $oPhone = $oApplication.Phone ;Create Phone Object ConsoleWrite("-oPhone: " & IsObj($oPhone) & @CRLF) ;Call $oPhone.Call($sNumber) $oApplication.BeginDisconnect() ;End Connection ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc PD: Can't load syntaxhighlighter Cuz My Connection is too slow. So I'll update it later. Saludos Edited October 17, 2021 by Danyfirex Updated code tag Earthshine, TheXman and jantograaf 2 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Danyfirex Posted April 24, 2019 Posted April 24, 2019 (edited) Edited: Browser sent info twice 😤. Saludos Edited April 24, 2019 by Danyfirex Browser sent info twice. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Earthshine Posted April 24, 2019 Posted April 24, 2019 (edited) yeah, that should do it! i was thinking along those lines after looking at the VBA example Edited April 24, 2019 by Earthshine Danyfirex 1 My resources are limited. You must ask the right questions
jantograaf Posted April 24, 2019 Author Posted April 24, 2019 You're all heroes, truly! Thanks a lot! I got this to work, so I'll build from that example to implement what I need in my code. Thanks, @Danyfirex! And of course, a lot of gratitude as well for @Earthshine and @water and @TheXman for getting this discussion going! 😍 TheXman, Earthshine, Danyfirex and 1 other 4
photoevents Posted April 25, 2020 Posted April 25, 2020 Forgive me jumping in with the question where to download oleview for windows10 ? Christian
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now