Sign in to follow this  
Followers 0
WannaBeGut

Skype - Call Check

1 post in this topic

Hey,

I want to make a application which calls a User and returns the error / status of the call. I don't think it works, the status stays "routing". Not 100% sure what that means for me.

$oSkype = ObjCreate("Skype4COM.Skype")
$oUser = $oSkype.User("User")
$oSkypeEvent = ObjEvent($oSkype,"Skype_")
$oError = ObjEvent("AutoIt.Error","MyErrFunc")
$cUserStatus_Offline = $oSkype.Convert.TextToUserStatus("OFFLINE")
$cUserStatus_Online = $oSkype.Convert.TextToUserStatus("ONLINE")
$cCallStatus_Ringing = $oSkype.Convert.TextToCallStatus("RINGING")
$cCallStatus_Inprogress = $oSkype.Convert.TextToCallStatus("INPROGRESS")
$cCallStatus_Failed = $oSkype.Convert.TextToCallStatus("FAILED")
$cCallStatus_Refused = $oSkype.Convert.TextToCallStatus("REFUSED")
$cCallStatus_Cancelled = $oSkype.Convert.TextToCallStatus("CANCELLED")
$cCallStatus_Finished = $oSkype.Convert.TextToCallStatus("FINISHED")
$cCallStatus_Busy = $oSkype.Convert.TextToCallStatus("BUSY")
$cAttachmentStatus_Available = $oSkype.Convert.TextToAttachmentStatus("AVAILABLE")

If Not $oSkype.Client.IsRunning Then
    $oSkype.Client.Start()
 EndIf

 Func Skype_AttachmentStatus($aStatus)
    MsgBox(0,"","Attachment status " & $oSkype.Convert.AttachmentStatusToText($aStatus))
    If $aStatus = $oSkype.Convert.TextToAttachmentStatus("AVAILABLE") Then
        $oSkype.Attach()
    EndIf
 EndFunc

While 1
    If $oSkype.CurrentUserStatus = $oSkype.Convert.TextToUserStatus("ONLINE") Then
        ExitLoop
    Else
        $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus("ONLINE"))
    EndIf
    Sleep(1000)
 WEnd

 If $cUserStatus_Offline = $oSkype.CurrentUserStatus Then
    $oSkype.ChangeUserStatus($cUserStatus_Online)
 EndIf

   $oCall = $oSkype.PlaceCall($oUser.Handle); Start Call
   $callstatusraw = $oCall.Status;Raw Call Status
   $callstatus = $oSkype.Convert.CallStatusToText($callstatusraw);Call Status converted to Text
   While $callstatusraw <> $cCallStatus_Inprogress
     MsgBox(0, "", ""&$callstatus);Displays the Call Status
  WEnd

The part until the $oCall Variable is from Andy Flesner (Airwolf123). But works fine.

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • r0ash
      By r0ash
      Hi guys,
      I am trying to backup Skype contacts when the Skype window is minimized or machine is locked. But ControlSend is not working.
      However when I run program, when Skype is active & focused, same program works.
      #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $pid = Run("skype.exe") $hWnd = WinWait("[CLASS:tSkMainForm]", "", 10) WinSetState($hWnd, "", @SW_SHOW) Sleep( 1000 ) ControlSend($hWnd,"","TConversationsControl1", "!cdb") If I change 
      WinSetState($hWnd, "", @SW_SHOW) to 
      WinSetState($hWnd, "", @SW_MINIMIZE) The file dialog to save contact as file will never appear. Where FAQs says ControlSend() instead of Send() will work even computer is locked.
      Thanks for your time.
       
      P.S: I've tried to find if backing up Skype contacts violate any EULA but do not find anything. Kindly enlighten me if this post is against forum rules in any sense.
    • ur
      By ur
      There is a build machine in the network where it will automatically download the code from source repository and compile using visual studio and compresses the complete code in a zip file.
      I have added a line at the end of the build script(written in python on that machine) to copy that zip file to my ESX Virtual machine.
      Where I kept a AutoIT exe to wait for the zip file, once it is copied then I will extract the contents and find only the dll files in the extracted folder and do the Install creation using Installshield silently and copy the created setup files to anther machine.
      I wrote the script till the setup files creation.
       
      But now the problem is, when the zip file is copying through network, the autoit script is detecting it even the copy is still in progress and trying to extract the zip file and failing.
      Even when I am checking whether the file in use is not working.
       
      Any suggestion on how to check whether the copy is completed.?
    • blumi
      By blumi
      I found a website where it is explained how to use wmi to check the tpm status of the tmp security chip.
      http://windowsitpro.com/security/checking-status-trusted-platform-module-command-line
      I tried this with autoit, but had no success.
      Anyone here who can give little support to me?
      Thanks
      #include <Array.au3> $ScriptName = "TPM Status" Dim $sResult $strComputer = "lapxxx" $objWMIService = ObjGet("wmic /namespace:\\.\root\cimv2\security\microsofttpm") ;$objWMIService = ObjGet("wmic /namespace:\\" & $strComputer & "\root\cimv2\security\microsofttpm") ;$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $colItems = $objWMIService.InstancesOf("Select * from Win32_Tpm") For $objItem In $colItems $IsActivated = $objItem.IsActivated_InitialValue $IsEnabled = $objItem.IsEnabled_InitialValue MsgBox(0, $ScriptName, "IsActivated: " & $IsActivated & @CRLF & _ "IsEnabled: " & $IsEnabled & @CRLF & _ "x: " ) Next $oMTpm = ObjGet("winmgmts:\\.\root\cimv2\Security\MicrosoftTpm") $oCol = $oMTpm.InstancesOf("Win32_Tpm") For $oObj In $oCol ConsoleWrite($oObj.IsActivated_InitialValue & @CRLF) ConsoleWrite($oObj.IsEnabled_InitialValue & @CRLF) ConsoleWrite($oObj.IsOwned_InitialValue & @CRLF) ConsoleWrite($oObj.SpecVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersion & @CRLF) ConsoleWrite($oObj.ManufacturerVersionInfo & @CRLF) ConsoleWrite($oObj.ManufacturerId & @CRLF) ConsoleWrite($oObj.PhysicalPresenceVersionInfo & @CRLF) Next  
       
    • parrishjason
      By parrishjason
      I want an AutoIT script to be able to open a given page, but also be able to check the HTTP status of the page and print out the status code in a message box. Looking through some of the documentation, I've found how to open a page in Internet Explorer and keep it as an object by doing this:
      $IE = _IECreate($google_url)
      ^^^ but how would I find the HTTP status 200 from here?
    • christian11
      By christian11
      I just wanted to return back to the main function if pixelgetcolor did not matched  similiar to goto, but it gaves me error whenever there's no pixelgetcolor matched 
      any suggestions?
      Func main() Local $RandomNumber = Random(1,3,1) If $RandomNumber == 1 Then Local $click1= PixelGetColor ( 458 , 163 ) If $click1 = (0x55556b) then MouseClick("primary",458,163, 10 , 0) else call ("main") EndIF EndIF If $RandomNumber == 2 Then Local $click2= PixelGetColor ( 668 , 349 ) If $click2 = (0x55556b) then MouseClick("primary",668,349, 10, 0) else call ("main") EndIF EndIF If $RandomNumber == 3 Then Local $click3= PixelGetColor ( 520 , 449 ) If $click3 = (0x55556b) then MouseClick("primary",520,449, 10, 0) else call ("main") EndIF EndIF EndFunc