Jump to content

Recommended Posts

Hi,

 

I need a script to change the Skype status available/away/etc.

I've tried the following, but it doesn't work very well, because quite often, the compiled app remains stuck in task manager without changing the status. 

#NoTrayIcon
#include "SkypeCOM.au3"

Opt("GUIOnEventMode", 0)
$oSkype.ChangeUserStatus(1)

The compiled app is triggered by a perl script each 1-5 minutes. A short switch from available to away and back to available. 

Link to post
Share on other sites

Hey Expansion,

Is SkypeCOM the script that generates the skype object?

I can see that $oSkype is your object handle.

It may be worth adding a simple message box before the Opt() function, so you can test whether the issue lies within your Wrapper script, Or "SkypeCOM.au3" itself.

Cheers

Javi

give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.

Link to post
Share on other sites

javiwhite, yes, SkypeCOM is generating the object by itself. What I've posted there is the entire code. 

I'm guessing that I'm doing something wrong:

Either not deallocating some resources or some timeouts protection

Either it's not ok to use:

 

Opt("GUIOnEventMode", 0)

If i let EventMode ON, the script stays alive forever. So, I'll end up with thousands of exe processes waiting(I can see them in task manager).

 

Edited by Expansion
Link to post
Share on other sites

Ahh so i'm guessing SkypeCOM enables event mode? If it's an event driven UDF, it's probably best you leave it as such.

What if you leave Event mode on, and then add an exit to the end of your script?, Like So:

#NoTrayIcon
#include "SkypeCOM.au3"

$oSkype.ChangeUserStatus(1)
exit

If that doesn't work, then chances are their is some sort of loop within the SkypeCOM.au3, that is preventing your code from running.

Out of interest, Did the msgbox appear when you added it above Opt()?

Cheers

Javi

give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.

Link to post
Share on other sites

1) EventMode + exit at the end, it still gets stuck sometimes, and I see the .exe file in task manager.

2) 

#NoTrayIcon
#include "SkypeCOM.au3"
#include <MsgBoxConstants.au3>

MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10)

Opt("GUIOnEventMode", 0

$oSkype.ChangeUserStatus(1)
exit

In this case, the MsgBox appears.

Link to post
Share on other sites

Hmmm, You could always add this line to the top of your script which will, At the very least kill any static processes:

if ProcessExists("YourCompiledNameHere.exe") > 0 then 
Do
ProcessClose("YourCompiledNameHere.exe")
Until ProcessExists("YourCompiledNameHere.exe") = 0
endif

Just replace the "YourCompiledNameHere.exe" with the actual name of your compiled script.

Note: this method won't work if the script is not compiled, As when running an au3 program, The autoit3Wrapper.exe (or something to that liking) will appear as the process.

The issue most likely lies with the SkypeCom.au3 contents, Although I can't really comment as I haven't seen the code.

Cheers 
 

Javi

Edited by javiwhite

give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By kellariluukku
      Hey.
      Is there anything that does the same thing as this?
       
      Namely I'm talking about detecting when something has changed on screen.
      The FastFind library is crashing without any errors after running:
      FFSnapShot($left, $top, $right, $bottom, 0) FFSnapShot($left, $top, $right, $bottom, 1) $diff = FFLocalizeChanges(0, 1) And then trying to overwritite the old snapshot (0 or 1).
      If I use always different snapshot numbers its using too much memory and will eventually crash my pc.
      I tried downloading older versions but they're not working and the author is inactive.
       
      It takes 2 snapshots and compares them returning the area that has changed very quickly (left, top, right ,bottom).
      Can anyone help me do this?
      Looping PixelGetColor would require a bunch of extra code to my purpose and its not as efficient...
       
      Thanks
       
       
    • By nacerbaaziz
      good morning autoit team
      please i need your help
      am trying to make an program that work with hotkeys
      it function is to change the volume to the current application
      e.g when i select the vlc window by using this hotkey i will be able to change the vlc volume with out changing the system volume.
       am able to get the process handle and the process name of the window
      but when am trying to get or set the volume i does not succeded
      i tried to search in this forums but no result.
      can you please guide me to do that.
      am waiting for your answers
      thanks in advanced
    • By nacerbaaziz
      hello autoit team
      please i've a question for you.
      am creating a audio player
      and in this audio player i want to show the current trac info
      such as the total time and the position ... etc
      i know i can show it as label
      but the screen reader for the blind read the text every change
      because it have a screen scan
      what i want is to show this informations but such image or icon
      i mean i need to create
      GUICtrlCreatepic or GUICtrlCreateicon ....
      or some thing as that
      and show this informations as image on it
      i think that i can do that with the 
      _GDIPlus functions
      but i couldn't find the currect way to do it
      i tried the _GDIPlus_GraphicsDrawString
      but i couldn't know how it work
      what i need is a small example that create a GUI
      and add a multy line text to it as graphic or image.
      so i need a simple way because it will changed every sec
      i hope any one can help me to do that
      global $GUI = GUICreate("text", 400, 400) global $label = GUICtrlCreateLabel(GetText(), 10, 10, 380, 380) GUISetState() do sleep(100) until GUIGetMSG() = -3 exit func GetText() return StringFormat("file name is test.mp3 \r\n total time is 00:30:00 \r\n position is 00:05:50") endFunc  
    • By edpoguatemala
      Hello Everyone, 
      So I'm using auto it to automate the download of pictures in woocommerce orders. Once images are downloaded, I need to change the status of the order from in process to completed. This is how my code looks like: 
      Download()
      Func Download()
          ; Save the downloaded file to the temporary folder.
          Local $sFilePath = @DesktopDir&"\TestAutomatizacion\"&@YEAR &"_"& @MON &"_"& @MDAY & "_picpic_orders.zip"
          ; Download the file in the background with the selected option of 'force a reload from the remote site.'
          Local $hDownload = InetGet("https://hellopicpic.com/get_pic_orders.php?token=ygtV2bMh23uJ7f6s&type=pic", $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
          ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True.
          Do
              Sleep(250)
          Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
          ; Retrieve the number of total bytes received and the filesize.
          Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD)
          Local $iFileSize = FileGetSize($sFilePath)
          ; Close the handle returned by InetGet.
          InetClose($hDownload)
      EndFunc   ;==>Download
       
      Thanks for any help you can give. 
    • By nooneclose
      Good afternoon, I am in need of some help. I am sure this is a stupid question requiring only one or two lines of code. However, I would greatly appreciate the help I cannot figure this out. I also tried searching for the answer on the internet but no one except me apparently seems to be having a hard time figuring this out and or is asking about it. 
      I simply want to change the "status" of an email from unread to read once I have processed it. My code is over 500 lines and I would like not to clutter this post with it. Assume I have all my includes and connections properly defined and stuff. 
      Here is the bit of code where I am trying to change the email that was used from unread to read:
      Func ChangeEmailStatus() ;******************************************************************************* ; changes the status of an email from unread to Read ;******************************************************************************* Local $iRows = UBound($aItems, $UBOUND_ROWS) MsgBox("", "Number of Unread emails (Before Change)", $iRows) _OL_ItemModify($oOutlook,$aItems[$i][0], Default, "Read=True") MsgBox("", "Array Display 1", $aItems[1][0]) MsgBox("", "Array Display 2", $aItems[2][0]) Local $iRows = UBound($aItems, $UBOUND_ROWS) MsgBox("", "Number of Unread emails (After Change)", $iRows) EndFunc  
×
×
  • Create New...