Scripting  bug in the background?

Hi
A few weeks ago I read a post by Alan_AEDScripts about Killing windows (palettes) and  that
seems to be true. I´ve  been testing some scripts and  I found that Functions are also keept in memory even after the function ends
This is a simple window (dialog) tester  with 10 buttons.
function dummyWin(){
    var win = new Window("dialog","Dummy Window",undefined);
    for(var i = 0 ; i < 10;i++ ){
        win.add("button",undefined,"Tester");
        win.children[i].onClick = function(){win.close();}
    win.show();
dummyWin()
Before I run it After Effects memory allocated is
and  after I run tester script 20 times After effects memory increases in almost 3 megs.This is more visible with windows that has more features and have to be open and close a lot of times.
It seems to be that the same thig happens with ScriptUI Panels
I have a more complex script that when a I run it it increases  almost 2 megs to the memory allocated by AE  every time I run it .I tried  a lot things but unfortunately memory keeps increasisng  
Maybe I am the only one who is experiencing this issue.if not this is serius bug that
should be solved right away.
All tests were done in AE CC. Please give it try
Sorry for my English

Hi
A few weeks ago I read a post by Alan_AEDScripts about Killing windows (palettes) and  that
seems to be true. I´ve  been testing some scripts and  I found that Functions are also keept in memory even after the function ends
This is a simple window (dialog) tester  with 10 buttons.
function dummyWin(){
    var win = new Window("dialog","Dummy Window",undefined);
    for(var i = 0 ; i < 10;i++ ){
        win.add("button",undefined,"Tester");
        win.children[i].onClick = function(){win.close();}
    win.show();
dummyWin()
Before I run it After Effects memory allocated is
and  after I run tester script 20 times After effects memory increases in almost 3 megs.This is more visible with windows that has more features and have to be open and close a lot of times.
It seems to be that the same thig happens with ScriptUI Panels
I have a more complex script that when a I run it it increases  almost 2 megs to the memory allocated by AE  every time I run it .I tried  a lot things but unfortunately memory keeps increasisng  
Maybe I am the only one who is experiencing this issue.if not this is serius bug that
should be solved right away.
All tests were done in AE CC. Please give it try
Sorry for my English

Similar Messages

  • 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)

  • How to create a "global" variable in Photoshop (or let a script "sleep" in the background)

    I tried to toggle the select-tool and the move-tool with a script. Seems simple enough. Something like:
    var toggleState;
    if (toggleState == true){
        activateMoveTool();
        toggleState = false;
    if (toggleState == false){
        activateSelectTool();
        toggleState = true;
    should do it (well, beside the "activateMoveTool" and "activateSelectTool" functions, which are not a problem).
    But how to rember the variable toggleState? I tried to make it global, but did not find a way. Is there any?
    Or could I just have an objekt(or funktion) running in the background that would keep track of variables like that one?

    Not having X's programing background I think of an action reference as something that tells Photoshop what to do. And yes it is like a little action that you write instead of record. For example the code that I and X posted could also be written like this
    var ref = new ActionReference();
    ref.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID('tool') );// what key to get
    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );// where to get it from
    var cTool = executeActionGet(ref);// in this case returns a one key descriptor
    var cToolTypeID =  cTool.getEnumerationType( stringIDToTypeID('tool') );// get the value of that key
    alert( typeIDToStringID( cToolTypeID ) );// make that value readable
    Most of the ordinals you will see will be target as Photoshop likes whatever you are working on to be active. You sometimes see next or previous. I can't recall seeing a 'normal ordinal' like first or second.
    There is not much in the way of documentation. Most of what I know comes from looking at the scriptlistner log, xtools and X himself, and a little bit of code I put together for exploring action descriptors and action list. It's not as nice as X's getterdemo but works more the way I think. It sends it's output to the ESTK console window
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var desc = executeActionGet(ref)
    var c = desc.count ;
    //for(var i=0;i<c;i++){ // to enumerate list
    //  $.writeln('Key '+i+' = '+desc.getType(i))
    for(var i=0;i<c;i++){ //enumerate descriptor's keys
      $.writeln('Key '+i+' = '+typeIDToStringID(desc.getKey(i))+': '+desc.getType(desc.getKey(i)))

  • 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?

  • Running an SQL script in the background

    Hi all,
    I am executing a simple but long running script. Is there a possibility to have the script executed in the background so that I can close the SQL Developer with the script still being executed?
    Thanks for your help,
    Jan

    Yes, but you'll have to schedule it using DBMS_SHEDULER or the older DBMS_JOB package. The latter is somewhat implemented inside sqldev, using the Jobs node.
    Hope that helps,
    K.

  • Script to open RSS feed url's and post those in the background to a webpage

    Dear everyone,
    Im trying to work on a script that should do:
    - Read My Apple mail RSS feeds every 120 seconds
    - extract a NUMBER from the links from those RSS feeds
    - then post them to a website url site.com/rss.php?id=<extracted id>
    - It should run totally in the background of my apple
    - The links should be posted in the background also without opening any browser or safari
    Is this possible?
    I have my apple now 4 months and this is my first applescript project, so its a bit too much for me, ive spend several hours investigating on how to do this can someone help me out a bit please?
    on idle
    if application "Mail" is running then
    -- read RSS feeds from apple mail
    -- Extract link ID www.site.com/?id=12345
    -- Post Id 12345 to http://site.com/rss.php?id=<the id>
    end if
    return 120
    end idle

    Read My Apple mail RSS feeds every 120 seconds
    Start by using a different RSS application.
    Mail.app doesn't provide any access to RSS feeds via AppleScript, so there is no chance of doing this with Mail.app (or, at least, no easy way to do so).
    Try something like NetNewsWire instead.
    Once you have a viable app, the first part is pretty straightfoward:
    on idle
     if application "NetNewsWire" is running then
      --extract a NUMBER from the links from those RSS feeds
      tell application "NetNewsWire" to set numLinks to total unread count
     end if
     return 120
    end if=idle
    From here, though, I don't know what you're trying to do. You say:
    then post them to a website url site.com/rss.php?id=<extracted id>
    Do you mean you want to post the number of RSS messages (since that's what you asked for earlier), or do you mean you want to re-post the RSS articles? Or do you mean you want to download the links and re-post the entire linked article?
    That's three options (and there are probably more), each of which require a different approach.

  • Is there and ipad app that allows you to record and edit audio, but can record in the background?  This would be to record voiceover auditions/podcasts while reading a script

    Hi wondering if anyone might be able to help me out.  I am an audio engineer and my wife is a voiceover artist.  We just got the ipad thinking she could record her voiceover auditions on the go, but we can't for the life of us figure out how to record audio while reading a script off of her email.
    Looking for an app that:
    Either can record audio while in the background (garageband cannot)
    OR Import text (copy paste I guess?) to read while recording
    The app needs to  be able to edit audio and export or email out an MP3 - by edit audio I mean trim, fades, and move around sections.
    Anyone have any thoughts on how to do this?  I have been looking around the web for answers for hours and can't find any.  Thanks in advance for your help.

    Hi-  I've done a lot of research in this area and actually am just finishing a book on this subject which will soon be in the iBookstore.
    The best app is TwistedWave.  It allows easy editing and recording, and also allows you record while you are in another app (such as a script your agent sent in your email)
    I recommend MiC by Apogee as your microphone, available at the Apple store.
    My book which goes in depth in how to get the best sound as well as how to edit is called:
    iVoiceover
    Super. Simple. Recording.
    I'll post here when it's live in the iBookstore!

  • MAXL SCRIPT TO EXECUTE IN BACKGROUND THE DATA LOAD

    Hi,
    I have problem with a MaxL script, I don´t know the command to execute a data load in the background, someone knows??? it would be very grateful if you can help me because now I have to load the data manually and then tick execute in background.
    Thanks for your help
    Regards,

    If the two processes are in no way dependent on each other, why not just use two separate MaxL scripts and run / schedule them separately?
    If you really need to launch multiple MaxL operations against different cubes to run in the background from a single script you can only do this with a shell / command script, not 'natively' in MaxL. If you're on Windows and using CMD, for example, see the 'START' command.
    --EDIT: Crossed over with Sunil, think he pretty much covers it!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • PHP script won't run in the background

    Hi all
    Hope someone can help me with a weird issue I have...
    I am trying to run a php CLI script in the background and it just won't run - it has a status of Stopped SIGTOU (Trying to write output) - Here are the details
    OS
    Mac OS X Lion 10.7.2
    PHP
    PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    I created a basic script  test.php
    <?php echo 'Hello world'.PHP_EOL; ?>
    Here are the results of various tests:-
    Test 1) php -f test.php  (Hello world gets displayed)
    Test 2) php -f test.php >test.log 2>&1 (Hello world gets put into test.log)
    Test 3) php -f test.php >test.log 2>&1 & --- I get [1]+  Stopped(SIGTTOU)        php -f test.php > test.log 2>&1 -- and the job just sits there doing nothing nothing gets logged however lsof shows the log file is open
    It has to be something to do with Apple's php build because a similar bash shell script gets executed no problems in the background...
    This has me stumped ... any ideas? What can I do to find out what is going on ...?
    TIA
    Rich

    Just realized your trying to load the php files by using the File->Open menu item in the Browser.  That won;t work.
    You have to load the php file by placing it in the Sites folder and entering http://localhost/file.php
    (or if you have user Sites enabled http://localhost/~user/file.php)
    The reason it is grayed out is that the browser doesn't run (or know of) php files. The web server runs those (via php) and the output of the file goes to the web browser.
    This page How to enable Web Sharing in OS X Mountain Lion does a pretty good job of explaining it. (as does the user tip I lonked to before)

  • New photoshop cc seems to have a bug wrt the toolbar's foreground and background squares.

    New photoshop cc seems to have a bug wrt the toolbar's foreground and background squares. When I pick a color to use as a fill the squares show gray and the fill is gray rather than the color picked. Never had a problem with this in previous version of PS. Could something be set up or initialized to cause this state of affairs?

    Change your document from Grayscale to RGB, or change the selected channel to the RGB data instead of a mask.

  • Changing the background by hovering over an object / triggering a jQuery script

    Thanks to this thread i managed to implement a js library called backstretch, which adds dynamically resized background images to either the whole site or objects.
    so far so good. Now i'm working on my portfolio page, and i want to change the background image when you're hovering over the thumbnail of an individual project like it was done here.
    So i guess the script has to be triggered somehow, but i don't know how to do that. Any ideas on how this could be achieved are highly appreciated.
    cheers,
    Rabauke

    Very simple.
    create a symbol with your background
    create the rotation in the symbol - select the background - select rotate at first frame - move playhead to the right - select rotate and change 0 to 360.
    add code to last frame at 360 degrees.
    var randomAColor = '#' + (Math.random() * 0xFFFFFF << 0).toString(16);
    sym.$('Ellipse').css({'background-color': randomAColor});
    sym.play(0);
    here is the sample:
    Randomly change color on rotation.zip - Box
    Also see this file that has different ways to randomize colors with rgba, names or hexadecimals.
    randomly change color of an element.zip - Box

  • A possible bug in the Accordion scripts

    I've encountered what may be a bug in the handling a single
    apostrophe in the tab of an accordion panel. When I use &apos;
    in the tagged element content displayed in the accordion tab, the
    character appears in the tab but any processing of the panels
    stops. When I remove the &apos; everything is fine. When I swap
    &apos; for &quot; (or any other special character) this
    also works. So I'm thinking the single quote is affecting the
    javascript somewhere along the line.
    I'm using the 1.4 release of Spry.
    BTW, all special characters in the panel content work just
    fine. It seems to be only the tab that is affected when the content
    there contains this single quote mark special character.
    Unless I'm totally out to lunch or this is one of those magic
    things that self-corrects the minute you ask someone a question
    about it (I hate when that happens).
    Thanks for any help you can give me.

    Hi solsenkp,
    I'm not seeing the problem. Can you post some sample markup?
    --== Kin ==--

  • I have league of legends music running in the background when 1. did not even open the application, and 2. i deleted the application long ago. Can someone help me fix this so it doesn't bug me!!

    For the last two months, when i am working some league of legends music (i think it is) pops up in the background and the only way i can turn it off is by restarting the computer. It is driving me nuts. Why does it do this when i've deleted the application ages ago and how do i fix my computer?

    Please help me people, im a dumb uni student after all!

  • Script to Submit XFDF in the background?

    I was wondering if anyone has any hints or techniques on how to submit a pdf as XFDF in the background using javascript on a web instance of Adobe Reader. Right now, I have a button that when the user hits save, submits the XFDF to another web page that then saves the data to the database. I'd love to be able to do this without having to redirect the user to a new page. I'd like to be able to just have it save in the background and keep the user on the web page and maybe even use a timer option in Javascript to do an auto submit at a time interval.
    Any suggestions?
    Thanks
    John

    Could you please elaborate on your requirement. In general we use SM36 and SM37 for IM creation and scheduling. For IM activation you have to use program RIMODAC2 and create and schedule job using SM36 and SM37
    Thanks
    Aparna
    Edited by: Saradha Ramesh on Jun 12, 2009 6:15 PM

  • [Applescript] How do i make a script: "open a safari website - do something - something else - etc", run in the background before presenting the final result to the user?

    I've made a script that does a certain "log in process". It opens a safari website-> does some actions -> opens a new website -> does some actions.
    I dont want to "open" the final safari website before the script has ended.

    The only way to do it, and even that doesn't always work, is by using a script. The basic code to use is:
    app.launchURL("http://www.google.com", true);
    The second parameter tells the browser to open the link in a new window.

Maybe you are looking for

  • How do I delete this non-existent hyperlink destination?

    New to Indesign. I need to use the "Blank White" header text as a hypertext destination and I want the name of the hypertext destination to be the same as the text. When I try, I get: Yet, there seems to be NO hypertext definition already in existenc

  • When I select the "Firefox" tab or Bookmarks tab and the options are displayed they begin dissappearing and reappearing almost like they are blinking.

    It is difficult to navigate though my bookmarks due to the fact that they keep disappearing and reappearing. The same goes for any kind of button that gives me options to choose from. "Most Visited", the Firefox button on the top-left of the browser,

  • Can I reduce space required when using Record Slideshow?

    Hello. I tried to play a bit with Record Slideshow functionality and it works well. However, there is one big problem from my point of view in my case: presentation with 17 slides weights only 4.3MB without sound. When I add sound with Record Slidesh

  • Java fonts rendering problem

    Hi all, I've used JEditorPane to render an html page. My problem is that the way to interpreter fonts seems different from Java to the operating system font, also if I have the same font installed (for example Arial TT unicode). For example, I have a

  • Finder wont open

    if i restart my imac g5 & enter password when the screen appears the hd is gone, finder, file, edit & the rest are unresponsive. the trash can will not open either. the fans are kind of loud. if i wait about ten minutes finder sometimes eventually op