Script running in the background and buffer overflow

Hi,
I have written a script that is supposed to be a background process, which will check every 5 minutes if given person is logged in on Skype.
The script does it basic job (alters me when given person is on Skype) but when I try to quit it (see code below, first display dialog inside on idle handler) it does not quit. Instead it displays "buffer overflow" or "stack overflow" error message (I am not certain how to exactly translate the error message - it is not in English as I am not running MacOS X in English). Also on rare occasions it displays another error message about terminated connection.
Any advise about how get rid of these errors would be greatly appreciated.
I have saved the script as an application and I have added to Contents/info.plist the following:
Application is agent (UIElement) = true
Here is the applet code:
global interval
global _path
on run
set _path to POSIX path of (alias ((path to me as text) & "Contents:Resources:sound.aif"))
set interval to 300
end run
on idle
tell application "System Events"
set _run to (name of processes) contains "Skype"
end tell
if _run = true then
tell application "Skype"
set _Calls to send command "SEARCH ACTIVECALLS" script name "cal"
end tell
if _Calls = "CALLS" then
tell application "Skype"
set Lstat to send command "GET USER " & "user_nickname" & " ONLINESTATUS" script name "stats"
set AppleScript's text item delimiters to " "
set status to text item 4 of Lstat
if status is "OFFLINE" then
--do nothing
else
do shell script "afplay " & _path
tell me
activate
display dialog "user_nickname is on Skypie" buttons {"OK", "Change interval", "Quit"} default button 1 giving up after 60 with icon note with title "Skype check"
if button returned of the result is "Quit" then
quit
else if button returned of the result is "Change interval" then
display dialog "Enter new interval in minutes:" buttons {"OK"} default button 1 default answer "5" with title "Skype check"
set interval to ((text returned of the result as number) * 60)
end if
end tell
end if
end tell
else
-- do nothing
end if
else
-- do nothing
end if
return (interval as number)
end idle
on quit
quit
end quit

Delete the following code:
on quit
quit
end quit
The purpose of the 'on quit' handler is so additional instructions can be executed when the script is told to quit. If desired, 'continue quit' can be part of the handler to call the normal quit command; without the 'continue', the script just repeats the handler over and over with no exit, which causes the overflow.
(53695)

Similar Messages

  • When making a call, sometimes, my iPhone 5 , gets stuck on 'Calling' than I have to press END..but still nothing happens, than when I press HOME button, the call app keeps running in the background and it keeps saying CALLING... please help

    When making a call, sometimes, my iPhone 5 , gets stuck on 'Calling' than I have to press END..but still nothing happens, than when I press HOME button, the call app keeps running in the background and it keeps saying CALLING... than I have to wait 2 - 3 minutes and call again.
    please help

    Has nothing to do with the SIM or master reset.  This has been done to my phone.  The SIM once and the factory reset many times over.  You all just sold us a bad piece of equipment and have us by the tail with our contracts so none of us can get a new phone without paying full price or re-upping our contract.  I just got off the phone last night with your high up tech people (you know, the hidden number we get once we tear into your support people enough), they went into my phone again and still didn't find anything wrong.  I about got fired from my job for not getting my calls and texts.  The BBB has now been contacted, and I feel your end should shore this up for all of us!

  • When i close firefox it keeps running in the background and i have to got in taskmaster to close it so i can open it again

    when i close Firefox it keeps running in the background and i have to got in taskmaster to close it so i can open it again I am running windows 7 64 bit

    Firefox Hang at Exit
    https://support.mozilla.com/en-US/kb/Firefox%20hangs#w_hang-at-exit
    See the Bulleted points in this section
    Check and tell if its working.

  • Process runs in the background and shown as an icon next the clock (how to?

    Hi guys,
    I have a program that runs in the background (a daemon). It refers to a database and make some calculations. If it's not activated, the database will lack some critical information. For this propose, I eliminated the closing option from the user (it's a gui); so if the user wants to close it he must terminated the application from the 'window task manager'.
    Question: how can I place this process as a small icon next to the clock on the lower right side? I don't want the process to be shown on the taskbar.
    Thanks for any idea
    Peter

    https://jdic.dev.java.net/
    The JDesktop Integration Components (JDIC) project aims to make Java� technology-based applications ("Java applications") first-class citizens of current desktop platforms without sacrificing platform independence.
    This demo application demonstrates functionality in the JDIC APIs org.jdesktop.jdic.tray package.
    It creates a tray icon on the desktop (in the System Tray Area for Windows platforms, or in the Notification Area for Unix platforms), with a caption (text), an animated icon, and an associated Swing menu containing icons. It also has a tooltip displayed when the mouse hovers over the tray icon.

  • Firefox keeps running in the background, and cannot clear Cache after turning off Firefox

    After shutting down Firefox, it keeps running in the background. This creates a Problem when trying to clear the Cache, etc.
    Why does it keep running?

    Look into CCleaner and Advanced System Care and file a support question because if Firefox is not in task manager it is NOT RUNNING! By the way you mentioned you don't like that Firefox 7.0 because it doesn't have a tool bar with Mail and Facebook try this:
    *Make mail etc. bookmarks
    *Open the list of bookmarks
    *Right click one
    *Click "Properties"
    *Enter mail or facebook etc. in "Keywords"
    *Next time you want to open it just type mail or facebook etc. into the address bar
    *Hit enter or click the green arrow however you normally load a webpage when you type it in
    *This will open the web page without having to enter the URL

  • HT4528 I have an IPhone 4S--How do I see if apps are running in the background and should they be deleted?

    I have an IPhone 4S.  How do I see if there are any apps open in the background and if so, should they be deleted to save energy?
    Thanks

    Very few apps run in the background - mainly music playing apps and GPS apps.  Double-clicking the Home button gives you a list of previously used apps, not (as so many people believe) "running" apps.  You can delete the apps from the list if you wish, but it will make no difference to energy usage (unless they actually are running, as in the categories above. You should know if you are using GPS or if you can hear music).

  • How can I find out what is running in the background and running my batterie down

    How can I find out what is running in the background

    Hi simpbarby,
    Welcome to the Support Communities!
    The links below will help you understand what apps are running on your iPhone.  You can quit the ones that you aren't using.
    iOS: Understanding multitasking
    http://support.apple.com/kb/ht4211
    This link will provides tips to conserving battery life:
    Apple - Batteries - iPhone
    http://www.apple.com/batteries/iphone.html
    Optimize Your Settings
    Depending on how they are set, a few features may decrease your iPhone battery life. The tips below apply to an iPhone running iOS 7.0 or later.
    Enable Wi-Fi: Having Wi-Fi enabled helps consume less power when doing activities that access data. Go to Settings > Wi-Fi and log in to a Wi-Fi network.
    Adjust brightness: Dim the screen or turn on Auto-Brightness to extend battery life. Turning on Auto-Brightness allows the screen to adjust based on lighting conditions.
    Fetch new data less frequently: The more frequently email or other data is fetched, the quicker your battery may drain. To fetch data manually: Go to Settings > Mail, Contacts, Calendars > Fetch New Data and tap Manually.
    Turn off push notifications: Apps with Push Notification alert you of new data, which may impact battery life. To disable, go to Settings > Notifications, choose the app you want to disable, and do the following:
    Change Alert Style to None.
    Turn Badge App Icon off.
    Turn Sounds off.
    Note: New data will be received when you open the app.
    Minimize use of location services: Apps that actively use location services, such as Maps, may reduce battery life. You can see which applications have recently used location services by going to Settings > Privacy > Location Services.
    Use Airplane Mode in low- or no-coverage areas: Your iPhone always tries to maintain a connection with the cellular network, which may use more power in low- or no-coverage areas. Turn on Airplane Mode to increase battery life in these situations.
    Viewing Usage StatisticsKnowing and understanding your iPhone usage can help you better manage your battery life. To view your iPhone usage statistics, go to Settings > General > Usage. Under “Time since last full charge”:
    Usage: Amount of time iPhone has been awake and in use since the last full charge. iPhone is awake when you’re on a call, using email, listening to music, browsing the web, or sending and receiving text messages, or during certain background tasks such as auto-checking email.
    Standby: Amount of time iPhone has been powered on since its last full charge, including the time the phone has been asleep.
    I hope this information helps ....
    Have a great day!
    - Judy

  • Firefox is running in the background and I can't turn it off.

    When I go to a site I can hear talking and music in the background. This happens when I'm not even using firefox. I tried to remove a tool bar I have and it said I had to close firefox. I can hear it when I check e-mail. Help!!!

    I have tried your suggestions and FX still won't open. Things I have tried are ending FX processes, restarting, removing "parent lock" from the FX profile - still no luck. Any further ideas? Thanks.

  • Why wont firefox load after i close the window ? it tells me it is already running in the background and to close that window before opening again. took 10 tries before it would load again !

    this has been going on for some time. 2 months maybe. i can hear the hard drive winding up/down after i close the window, and then comes a long narrow blue window stating what i have written.

    See
    * [[Firefox is already running but is not responding]]
    Try closing any running instances of ''firefox.exe'' (and plugincontainer.exe) using something such as Task Manager. That should allow you to then restart Firefox.
    As for iLivid. Possibly it also has associated apps or extensions with names not including the word iLivid. Looking at their own FAQs there are instructions to remove iLivid using the Windows Control panel, and mention of other bundled software that you may wish to remove. It seems it is more of a nuisacne rahter than out and out malware.
    * see http://www.ilivid.com/faq.htm (page scrolls for more info) but includes:
    How do I uninstall the software?
    The software can be removed in a simple was like any other software:
    Go to the Windows Start menu and then to Control Panel > Add/Remove ("Programs & Features" in Vista & Windows 7) and click "Remove" next to the software name (e.g iLivid Download manager / Windows iLivid Toolbar ).
    During the installation bundle software are offered, each can easily be removed following those instructions: Uninstall Yontoo Addon , Uninstall Search Toolbar (powered by Bing) or Uninstall Babylon.

  • New version FF3.63 causes a faded screen with script running in the background. I understand it may not be entirely compatible with 64bit units. I was perfectly happy with 3.59 and would like to downgrade, is this possible and how?

    I would like to go back to version 3.59. 3.63 is slow and buggy on my unit.
    == This happened ==
    Every time Firefox opened
    == I installed new version today ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    You can get 3.5.9 from here: http://www.mozilla.com/en-US/firefox/all-older.html
    But 3.6.3 should run fine. DO you have any add-ons installed, that may be causing the problem?

  • Once closed, Firefox keeps running in the background and ties up 50% of my CPU at 112mb of memory. WHY?

    firefox keeps running in background after closing, ties up 50% of CPU and 112mb of ram. why?

    Just keep following the suggested solution until you die.

  • Error when I try to open Firefox. Says Firefox is running in the background and cannot open. Suggests closing that window or restart system. This has happened several times recently. I reinstalled but am still getting the error. Any thoughts?

    I am getting an Error when I try to open Firefox that Says Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. This has happened several times recently. I deinstalld and reinstalled but am still getting the error. Any thoughts?

    This happens to me as well. However, I have a shortcut on my desktop as well as my quick start bar. When this has happened to me, I can usually log back in without restarting, by using the shortcut on the desktop rather than the usual quick start bar.
    I know this sounds weird, but it has worked for me about 80% of the time.

  • After closing firefox and then reopening it, a message states that firefox is already running (in the background) and to restart computer.

    the window closes normally, then when i reopen it i receive a message that states Firefox is still running. i open task manager and it is not shown on the application tab but is shown in the process tab, where i "end process" i would appreciate any help. thank you

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    See "Firefox hangs when you quit it":
    *https://support.mozilla.com/kb/Firefox+hangs

  • There is something running in the background and I don't know what it is.

    This is what I see when I click on "Window" abhtml_background_{776244c8-ba5f-4ee8-8b66-e4ca025f546a} except all of the letters are uppercase. It's a window for something I can't get rid of. It is only there when I run Firefox and restarting and emptying the cache don't get rid of it. I don't know if it is harmless or can cause problems. Can you please help me with this?
    Thank you,
    Lydia

    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • When I click on update the download runs in the background and nothing happens, how do I correct this so I get updates?

    I receive a message box asking if I would like to update Firefox. I click on yes and it goes to the download box with the long horizontal download bar with blue and white moving lines. That never changes...it simply stays with this box, the download bar never changes and it doesn't matter how long I wait for it to complete install it never occurs. The update box appears randomly in time, but it is quite often.

    Hello emckenzie
    If there is an issue with update or permissions '''the better, quickest and safest way''' is to download and install firefox:
    1. Download a copy of the latest firefox from http://www.mozilla.org/en-US/firefox/all.html
    2. '''Trash''' the current Firefox application to do a clean install.
    3. Install the version that you have downloaded.
    Do not select to remove your personal data, your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks or other personal data.
    see also: [https://support.mozilla.org/en-US/kb/install-firefox-mac?redirectlocale=en-US&redirectslug=Installing+Firefox+on+Mac#os=mac&browser=fx16 Installing Firefox on Mac]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

Maybe you are looking for

  • How can i see the total size of files which i have been selected?

    I want move my files including movies and photo to the tumpdrive. But, my tumpdrive told me which was only 500MB space. Therefore, i decided that choose some movies and photo to there. When i chose the files i don't know how much of the total size wh

  • Removing a Video Stream From The Stage

    what I have: main.swf 1 frame btns load various external.swfs I have 3 one swf (commercial.swf)has a slideshow inside using the SlideShowPro component Not the flv player problem: stream remains after swf is swapped out with new. AS code  main timelin

  • Screen Flickers, Goes White, Goes Grey but Computer Responds Normaly

    Ok, this has to be the right place to post, apparently I put this in the wrong thread originally. This is a new one on me. This started out of the blue. Sorry for the long post but I was trying to think of as much info as possible. The screen on my p

  • How to open a port in RV325?

    Hey guys, I'm looking for a way to open a port (port 43 - whois) in RV325, so I can check if domains are taken for my customers and I don't want to use an external service for this. I tried using the GUI, telnet and SSH, but I couldn't find it in the

  • MM Consigment stock : Need to sell without getting into stock

    dear all we have a unique problem. we have done the following 1. created inforecord for vendor the type consigment 2. PO created with type K 3. GR done with 101 with Type K ( the stock is Vendor stock) we need to sell that product without getting our