Works in ExtendScript and not in Script Panel [JS, CS3]

I've adapted the FindChangeByList script to work with a particular page.
The trouble is a couple of text boxes need to be removed entirely.
So I've included the lines:-
var myDoc = app.activeDocument;
var myPageItems = myDoc.allPageItems;
for(var i=myPageItems.length-1;i>=0;i--)
    if(myPageItems[i].constructor.name.toString()=="TextFrame")
if (myPageItems[i].contents == "WIN £50"||myPageItems[i].contents == "WIN £100") {
myPageItems[i].select();
myPageItems[i].remove();
... then the script gets down to doing the changes prescribed by the list
myObject = app.documents.item(0);
myFindChangeByList(myObject);
When I run the script in ExtendScript the boxes vanish as intended.
But when I run it from the InDesign scripts panel, the text frames stay where they are and their contents get changed along with the contents of the other text frames.
I've alt clicked the script in the scripts panel to make sure I've got the right script. It's one of those head-scratchy-am-I-going-dafter affairs.

After testing the box deletion part in the scripts panel and thus checking that it wasn't the culprit, I saved the box deleter script and the specialised FindChangeFromList script in the InDesign Scripts folder (so they don't appear in the Scripts Panel) and wrote an Applescript which does two "do scripts". When run from the scripts panel this script does the job. Inelegant, I know, but ours is not to reason why, ours is to get it working.

Similar Messages

  • Why is the Executable class only available in Script Task and not in Script Component.

    Why is the Executable class only available in Script Task and not in Script Component.
    Here is a link to the Executable class documentation.
    http://technet.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.executable.aspx
    Mr Shaw

    Because Executables are available only in Control Flow. Script Task is a control flow component whreas Script Component is a data flow component. It works on data buffer and rows and not on executables.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Why does my php export feature work in IE and not firefox?

    Why does my php export feature work in IE and not Firefox? I've written a web application which contains a SigmaGrid. The grid controls reload, add update delete, print and export to csv all work in IE8. The export feature does not work in Firefox.

    I'm not sure what's going on for you. I've had 4 other developers - two on Comcast and two on Fios review my work and they get the control and export action in the IE8 version but not the FF10 version.
    Thanks for looking into this for me, though. I appreciate the effort. '' The operation was a success doctor, but the patient died.''

  • Quicktime plugin works in IE and not in safari

    Hello,
    I'm using Safari 2.0.1 for browsing the web. I'm on Tiger 10.4.2 and have QT7 pro.
    Firewall is set to let Quicktime streaming pass through.
    the following URL is extract from the allocine web site witch is the french movie portal.
    http://www.allocine.fr/video/generation.mov?u=rtsp://a1622.v09806.c980.e.vq.akamaistream.net/7/1622/980 /41891159/quicktime.allocine.fr/nmedia/18/35/52/34/18397590_fa1_vosth.mov
    under safari I've got the big blue Q and that's it. On IE it works fine.
    Moreover on safari the end of the URL (beginning at RTSP) open quicktime player.
    Sound to me like a bug but can't be sure.
    You can check at www.allocine.com click on a movie and try to watch a trailer ("bande annonce" in french).
    Moreover High definition trailer works fine on this site with quicktime....
    really strange
    maxime
    just an add on : Trailers on apple web site works fine

    Sorry but already done that. Quicktime is set to RTSP and SDP in the mime settings...
    A person in the french forum got the salme problem than I and install IE. With IE he can got at allocine web site..
    I'm convinced it's something to do with the HTML interpreter but can't point out.
    On Safari the plugin seems not starting so I assume it's not the connexion and can't see why it would works under IE and not safari in this case...
    Please, I don't want to why IE, get my Safari back to work on allocine web site with quicktime
    maxime

  • Why is my airportxpr only working with Itunes and not with another music program

    why is my airportxpr only working with Itunes and not with another music program??
    I can not select/see other outputs in my sound selector.

    You have not indicated which OS or which music program you have so I have listed a program called Airfoil to try for both Windows and Mac - it may work for you
    for Windows - http://rogueamoeba.com/airfoil/windows/
    for Mac - http://rogueamoeba.com/airfoil/mac/

  • I have CS6 and CC installed on my mac when I'm using CS6 and use bridge CC activates how can I set this to only work on one and not the other

    I have CS6 and CC installed on my mac when I'm using CS6 and use bridge CC activates how can I set this to only work on one and not the other

    If you want Bridge CS6 to open when using Photoshop CS6, you must quit Bridge CC.
    Then File menu > Browse in Bridge will bring up Bridge CS6.
    If Bridge CC is already open, The File > Browse in Bridge for Photoshop CS6 will use Bridge CC and Bridge CS6 will not open.
    I hope that's the answer you were looking for.
    Gene

  • HT3412 impossible to download my book ! I-photo 11 worked last month and not anymore.Download stops in the middle.

    I-photo 11 worked last month and not anymore.Download stops in the middle.I have to shut MAc down and restart to debug.
    What's wrong ?

    Here's a fix that worked for some users:
    Make sure this checkbox is checked in the System/Sharing preference pane:
    If it is, uncheck it and then recheck and try ordering again.

  • Ipad screen went white with gray/black line through it. Worked one minute and not the next. It has not been jailbroken.

    The ipad screen has went white and has a gray line running through the middle of it. It worked one minute and not the next. It has not been jail broken.

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10-15 seconds). No data will be lost.

  • Spry:repeat works in Mozilla and not IE 6

    I made this little test in Spry.
    It happens to work in Mozilla but not in Internet Explorer 6
    which is quite weird since I almost copy/pasted from one of the
    included examples (the example worked fine everywhere).
    Can anyone point me in the right direction please?
    Thanks...
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <title>Club voleibol bargas</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <script language="JavaScript" type="text/javascript"
    src="scripts/spry/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="scripts/spry/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript">
    var dsNews = new
    Spry.Data.XMLDataSet("scripts/xml_noticias.php", "/allnews/news");
    </script>
    </head>
    <body>
    <div spry:region="dsNews">
    <div spry:repeat="dsNews">{header}</div>
    </div>
    </body>
    </html>
    The XML needed for this looks like this:
    <allnews>
    <news>
    <id>26</id>
    <header>Morbi mauris.</header>
    </news>
    <news>
    <id>23</id>
    <header>Lorem ipsum dolor sit amet</header>
    </news>
    <news>
    <id>8</id>
    <header>Proin convallis. Duis sed est ut ligula
    ullamcorper bibendum.</header>
    </news>
    </allnews>

    I spent days trying to figure it out and the minute I post it
    here the solution comes to me!
    The problem was that the XML file was being generated by a
    PHP script which was not outputting the appropriate headers.
    You can use:
    header('Content-Type: text/xml');
    Or use this other one if your charset is NOT US-ASCII:
    header('Content-Type: application/xml');

  • My facetime and imessage are not working! They were literally were working one minute and not the next!  I have reset (NOT RESTORED) my ipod, however these 2 apple apps are not working now, anyone have any idea why???

    My ipod touch seems to have a few issues, however my pre-installed and updated imessage and facetime were literally working last night, and after a breif break to charge battery (the back of the ipod was SUPER HOT) wasn't able to do facetime or imessage, and am STILL NOT today, what gives?? Any suggestions and advice?.

    Found the answer, at least for now!  Thanks to roryjt, and having to search through tons of post on imessage and facetime issues!  Changed the DNS on my ipod for my wireless network to 8.8.8.8   Not sure if it will work outside of my wireless network, but since its an ipod, not an iphone, I usually only use it in my place/on my network.  Below is a link to the thread by roryjt.
    https://discussions.apple.com/message/16674964#16674964

  • Set Empty Managed Metadata Column - Working in 2010 and not in 2013

    I have seen posts similar to mine below but am still not finding a solution. I understand that setting an already populated managed metadata column can be problematic using SPD. However, my column is empty, and what works in 2010 is not working in 2013.
    Issue: In SharePoint 2010 On-premises, I am able to set an empty Managed Metadata column on a file in a document library via SPD workflow using the following format:
    ID;#Term|IdForTerm
    In SharePoint 2013 Online, I am attempting to create a SPD workflow to do the exact same thing (ID;#Term|IdForTerm) and am experiencing the following results depending upon the type of workflow I try:
    - SP 2010 Workflow - The workflow status result is Completed, but the managed metadata column remains empty.
    - SP 2013 Workflow - The workflow internal status becomes Started and effectively remains this way until I end the workflow.
    Any thoughts on what needs to change for 2013 when doing this? 
    Thanks in advance for any help or guidance.
    Alan

    Hi,
    I try to reproduce the issue in my SharePoint Online environment, however, everything works well.
    I create term set as below:
    Then start the workflow and the value in the browser view. The result is as below:
    I recommend to create another managed metadata column to check whether it works.
    Or you can create another library to check whether it works.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Open new window using java code and not in script

    i need some method like sendredirect or forward . where i can make some codes so as to open a new window.
    actually i am calling a jsp from one jsp file where a lot of dynamic parameters are sent. and in the second jsp i call a servlet which works to download a file to the client side. i want the file should open in new window not in the browser from where it is initiated.
    else can any one say the mime type where i can open file(a xls file) in xls window and not in browser which is not needed as user needs to press the back button(present in browser)

    Hi,
    in your code
    the following code, which is used to set the file name that is to be downloded
    response.setHeader("Content-Disposition", "*inline*; filename=somename.xls" );
    to be replaced by
    response.setHeader("Content-Disposition", "*attachment*; filename=somename.xls" );
    it will work fine try it.
    Edited by: Bhaskar.krishna on Jan 17, 2008 12:56 AM

  • A puzzle I made in Adobe Flash on an html5 canvas only works in Firefox, and not in other browsers. What should I do?

    I made a puzzle on a html5 canvas in Flash CC, and followed the exact steps of an online tutorial. The final product works in Firefox, but not in Chrome or Internet Explorer. What am I doing wrong?

    Call up the Javascript Console in Chrome and see if it's showing error messages.
    Also, you might try uploading it to a web server and viewing it from there (or turning Apache on locally). It may be a cross site security issue.

  • Ipod Touch works with APPLE and not WINDOWS

    I have a first generation touch. Yesterday the PC crashed while syncing with the iTouch. After that it would not see the iPod any longer. However the APPLE I have sees it just fine. I have gone through the detailed uninstall and re install itunes process several times and tried cleaning the registry - still nothing http://support.apple.com/kb/HT1923 .
    The PC based iTunes syncs with another 2G and a nano and a shuffle just fine. Windows also sees the 1G Touch..... ideas other than moving my library to my laptop? I have also reset the 1G and upgraded the software now to the latest firmware. It still works with the APPLE but not with the PC. I am sure this is a driver issue but I cannot get it fixed.

    Well I happened on the answer after doing a lot of searches. Why doesn't apple post the fix on their site. This problem is due to their installation package for Vista and the fix does not require all the uninstalls and re installs you have been asked to do so many times....
    THANK YOU BeeBopp
    Posts: 3
    From: USA
    Registered: Feb 15, 2009
    Re: Ipod touch is recognized as a camera
    Posted: Feb 16, 2009 7:43 AM in response to: Twin195 Reply Email
    This solution is very similar to one above but worked for me. Am using iPod Touch 2nd Gen with 32 bit version of Windows Vista where the iTouch is being seen by Windows but does not show in iTunes. In my case it was being identified by Windows as a camera. I tried un-installing and re-installing iTunes and all the other Apple apps with no luck. Was almost ready to throw in the towel when I did one last search for alternate solutions and found the following instructions to reinstall the drivers, but instead of having the system look to the c:\Windows\inf or c:\windows\system 32 folders for the drivers, the path is changed to C:\program files\common files\Apple\Apple Mobile Support\Drivers, which is apparently where Vista installs the drivers. Once I changed the path the driver properly reflected the iTouch as a USB device, and not a digital camera. Try this if you are having similiar issues.
    Here are the steps:
    1. Verify you have the following files usbaapl.cat, usbaapl.inf & usbaapl.sys in the following directory "C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers"
    2. Log in using an ADMINISTRATIVE account
    3. Single left click on START
    4. Single left click on RUN (You may need to change the start menu to 'classic view' to see RUN, you can change back after if you like)
    5. Type in " devmgmt.msc " then hit Enter (Don't type in the quotes)
    6. Look for Imaging in the Device Manager window, and click on plus sign (In Vista you may not see the "Imaging" option. Look under "Portable Devices" as an alternative)
    7. Now you should see " Apple iPod " as a device underneath Imaging (or Portable Devices)
    8. Right click on " Apple iPod " then single left click on Properties
    9. Single left click on the " Driver " tab
    10. Single left click on " Update driver "
    11. Select " Install from a list or specific location " or "Browse my computer" whichever shows on your version of Vista
    12. Single left click on " Include this location in the search " if shown
    13. Paste " C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers " (Don't type in the quotes) into the box " Include this location in the search "
    14. Single left click NEXT and keep clicking through until " Apple iPod USB Driver " is detected, if no list appears then you should see the little animated circle thingie spinning. It's looking and working. Be patient.
    15. Hopefully you will get a successful message.
    16. The correct drivers(s) are now installed.
    17. Start up iTunes, and see if you iPod is detected again.
    Hope this works for you as it did for me and several others.

  • Sound working in emulator and not in Phone

    I did a game in which the player has to hit a target. If he successfully hit the target a wav file is played.
    In the emulator:
    The sound is played everytime the user hits the target.
    In the phone (nokia N70)
    The sound is played only a few times and it's not played afterwwards.
    But the explosion sprite is shown.
    (size of the wav file is 6kb and size of the game is 250kb)
    Please tell me what might be the problem.
    Thank you in advance !

    Hi,
    I have same problem with my iTunes 6.
    You can try this(Helps for me):
    1. From the Start menu, select Settings and open the Control Panel
    2. Double-click the Multimedia or Sound, Speech & Audio devices icon,
    3. Select Sound and Audio Devices, click the Advanced Audio button
    4. Select the Advanced tab then
    5. Select the Performance tab and find the Hardware Acceleration slider control
    hardware acceleration should be set at full.
    sample rate conversion quality should be set at best.
      Windows 2000   AMD Athlon XP 2500+

Maybe you are looking for

  • Can I get the battery replaced in my 3GS?

    My 3 year old iPhone 3GS can no longer make it through an 8 hour day. I'm going to replace it with an upcoming new model in October. In the mean time, can the Apple Store replace it ?

  • How to start SFC in activity hook.

    Hi Experts, I am trying to start SFC in Activity hook. Tried the following, but its not working. Please correct me where Im wrong... List<StartSfcRequest> sfcReqList = new ArrayList <StartSfcRequest>(); StartSfcRequest startRequest = new StartSfcRequ

  • Lion RSS view subject instead of sender

    In the previous version of Mail in Snow Leopard, RSS feeds showed only the Subject field and then could be sorted by date.  Now, the "sender" of the feed is shown in bold and the subject is below it normal text.  I find this a bit more difficult to s

  • Device insists on ORIGINAL device password.

    Blackberry device will not accept my password.  I get a message that I cannot "sign in with a different BB ID that i HAVE to use the ORIGINAL password.  I have been trying WEEKS! I simply cannot remember the original device password. Please help. Reg

  • Prices taken for BOm levels

    Hi, When we perform the cost roll up process (ck40n) how the prices will be taken in each level for BOM structure. Regards Mastan Reddy N