Script will be executed is no longer
I have a script created by VIRTU-AL: vCheck5.ps1
I created a FAS of the run .bat file a scheduled task. If I run each command separately, the script runs. But if I run the script together, he never does by first line:
PowerShell.exe
Add-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
C:\PSscript\vCheck5.ps1 vi_server
I have had no problem runniing this script from a Windows XP workstation. Now I have a Workstation Windows 7 (64-bit).
Any advice would be appreciated.
Note *.
It was my previous script on a Windows XP workstation:
"C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" %systemroot%\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile-command '& {C:\PSscript\vCheck5.ps1 VI_Server} '.
Here is the error message that it returns:
Could not load the Windows PowerShell "C:\Program Files\VMware\Infrastr console file
ucture\vSphere PowerCLI\vim.psc1″. WIN 32 error: the system cannot find the path
specified.
On a PC running Windows 7 64-bit, PowerCLI is installed in the folder "C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI. If you need to change the command to:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile "C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\vim.psc1"-command "&{C:\PSscript\vCheck5.ps1 VI_Server}".
Best regards, Robert
Tags: VMware
Similar Questions
-
I have a fairly new version of PowerCLI (5,5 Rel 1) 5.5 being ESXi and vCenter.
I also checked that automation. Core is installed:
PowerCLI C:\Windows\system32 > Get-PSSnapin VMware.VimAutomation.Core
Name: VMware.VimAutomation.Core
PSVersion: 2.0
Description: This Windows PowerShell snap-in contains the Windows PowerShell cmdlet
TS of vSphere management.
but after connecting to vCenter, I get error trying to run:
PowerCLI C:\Windows\system32 > $Results = ForEach ($DRSRule to $DRSRules)
> > {}
> > «|» Select-Object-Property @{N = 'Cluster'; E = {(Id-vue-Get $DRSRule.Clust)}
amplifier. {{ID). name}}.
> > @{N = "Name"; {E = {$DRSRule.Name}}.
> > @{N = "enabled"; {E = {$DRSRule.Enabled}}.
> > @{N = 'Type of DRS'; {E = {$DRSRule.KeepTogether}}.
> > @{N = "MV"; E = {$VMIds = $DRSRule.VMIds - split ","}
> > $VMs = ForEach ($VMId to $VMIds)
> > {}
> > (Get-View-Id $VMId). Name
{> >}
{{> > $VMs - join ","}}
{> >}
> >
The term 'Select-Object-property' is not recognized as a cmdlet, fu
function, script file or executable program. Check the spelling of the name, or if
a path was included, make sure the path is correct and try again.
On line: 3 char: 32
+ "" | Select-Object-Property < < < < @{N = 'Cluster'; E = {(Get-view-Id $DRSRule
. {{Cluster.Id). name}}.
+ CategoryInfo: ObjectNotFound: (Select-Object-property string :)
[], CommandNotFoundException
+ FullyQualifiedErrorId: CommandNotFoundException
PowerCLI C:\Windows\system32 > Add-PSSnapin VMware.VimAutomation.Core
Is ' Select-Object-Property not installed? If not, where I get it, please?
see you soon
KC
Note, I received this Dean here code: PowerCLI: extraction rules DRS; Deans blog
There should be a space between the - Property parameter and Select-Object
-
Show/hide a Div so that the application process will be executed
Hi all
I have the following problem:
I'm on APEX 3 and I have the page with 2 elements. When the user, enter the value in the first element on the page and navigate out of the element, in the second article should be the SYSDATE.
This must be done as:
1. set the fovus in the Item1.
2. navigate off the Item1 (with TAB or the mouse).
3 JavaScript function will be executed:
3.1 icon "Please wait...". "will be displayed.
3.2 application of getDbDate process will be executed.
3.3 the value returned by the getDbDate of application process is allowed in the Field2.
3.4 icon "Please wait...". "disappears.
Here ist the sample application: http://apex.oracle.com/pls/otn/f?p=MISCELLANEOUS:108
In Firefox, I have no problems to show the "Please wait...". "Icon, but the Explorer Intener shows me nothing. But the application process will be executed.
Any ideas?
Best regardsHello
See the example of CARL
http://HTMLDB.Oracle.com/pls/OTN/f?p=11933:62Kind regards
Jari
-----
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
Hello guys
I have a question about the AS3.0 and the try/catch/finally block. When an exception thrown an exception in a try block, will be the runtimer continue to run the following code to the try/catch/finally block?
For example, assume that the tracking code:
public void attackEnemy (enemy: SpaceShip): void {}
try {}
setCurrentTarget (enemy);
fireOnCurrentTarget ();
{ } {finally
setCurrentTarget (null);
}
trace ("attach completed");
}
The appeal of "trace" will be executed is the one exception?
If Yes, what is the point of finally block?
Kind regards
Dennis
In your example you have no catch block, then if an error is thrown in
your try, the trace statement block will never run. The finally block
will run even if an error occurs or if there is a return statement in
your try block. Finally block is useful to ensure that a cleanup code
is executed regardless of how a function left.
-
Illustrator script will not print on the correct printer.
I call an Illustrator using BridgeTalk script within a script InDesign, but I doubt it would make a difference. Here's the question: we have four printers on the network that are named 'Printer 1', ' printer 2 "," printer 3 ", and"printer 4"on each Mac on the network." " I want to print a document to a specific printer, based on the computer that is used to run the script. Pretty simple idea and I have illustrated it in my script in progress below:
function illustratorDie(artFile, dieFolder, companyName, orderNum, shipDate, dieInks) { // Before anything else, find out to which printer we'll be sending our document. var machine = $.getenv("USER"); $.writeln("(IL) Environment variable 'USER' is " + machine); var localPrinter; var shipPrinter; switch (machine) { case "aerostar": $.writeln("Machine is aerostar."); localPrinter = "Printer 4"; shipPrinter = "Shipping"; break; case "apache": $.writeln("Machine is apache."); localPrinter = "Printer 3"; shipPrinter = "Shipping"; break; case "navajo": $.writeln("Machine is navajo."); localPrinter = "Printer 3"; shipPrinter = "Shipping"; break; case "seneca": $.writeln("Machine is seneca."); localPrinter = "Printer 2"; shipPrinter = "Shipping"; break; case "warrior": $.writeln("Machine is warrior."); localPrinter = "Printer 2"; shipPrinter = "Shipping"; break; case "tomahawk": $.writeln("Machine is tomahawk."); localPrinter = "Printer 1"; shipPrinter = "Shipping"; break; case "Marketing": $.writeln("Machine is Marketing."); localPrinter = "Printer 1"; shipPrinter = "Shipping"; break; default: $.writeln("Machine has defaulted."); localPrinter = "Printer 3"; shipPrinter = "Shipping"; } $.writeln("(IL) Thus, the local printer is " + localPrinter); // First, create a new document for the die. var dieDoc = app.documents.add(); // Then open the document that contains the artwork. var artDoc = app.open(artFile); // Group the art from the document with the artwork, // just in case it hasn't already been grouped. artDoc.layers[1].locked = true; artDoc.selectObjectsOnActiveArtboard(); var sel = artDoc.selection; var newGroup = artDoc.groupItems.add(); newGroup.name = "ArtGroup"; newGroup.move(artDoc, ElementPlacement.PLACEATEND); for (var i = 0; i < sel.length; i++) { sel[i].moveToEnd(newGroup); } // And copy the artwork from the art document to this new die document. var copiedArt = newGroup.duplicate(dieDoc.layers[0],ElementPlacement.PLACEATEND); // Now we can close the art document as it will no longer be needed. artDoc.close(SaveOptions.DONOTSAVECHANGES); // Back to our die document, let's fix up the art now. // We do so by first centering it on the page. copiedArt.left = ((dieDoc.width - copiedArt.width) / 2); copiedArt.top = (dieDoc.height + copiedArt.height) / 2; // Then we change all paths to black & white. // For this, we will assume that there are no gradients nor raster art. var pathsToRemove = new Array; var blackColor = new CMYKColor(); blackColor.cyan = 0; blackColor.magenta = 0; blackColor.yellow = 0; blackColor.black = 100; convertBW(copiedArt); $.writeln("Removable paths: " + pathsToRemove.length); for (var v = 0; v < pathsToRemove.length; v++) { pathsToRemove[v].remove(); } // Now specify the contents of that text block. var newLine = String.fromCharCode(13); var textContents = companyName + newLine; textContents += orderNum + newLine; textContents += shipDate + newLine; textContents += newLine; textContents += "W: " + Math.round((copiedArt.width / 72) * 100) / 100 + newLine; textContents += "H: " + Math.round((copiedArt.height / 72) * 100) / 100; // And finally actually place the text block while formatting it. var textDesc = dieDoc.textFrames.add(); textDesc.position = [36, dieDoc.height - 50]; textDesc.contents = textContents; textDesc.textRange.characterAttributes.size = 36; // Let's set print options for the two printers. var localPrintOptions = new PrintOptions(); localPrintOptions.printerName = localPrinter; var shipPrintOptions = new PrintOptions(); shipPrintOptions.printerName = shipPrinter; var myJobOptions = new PrintJobOptions(); myJobOptions.copies = 1; shipPrintOptions.jobOptions = localPrintOptions.jobOptions = myJobOptions; $.writeln("Printing to " + localPrintOptions.printerName); // Now we need to print this text block to the local printer as well as the Shipping printer. $.sleep(2000); dieDoc.print(localPrintOptions); $.sleep(2000); dieDoc.print(shipPrintOptions); // Before saving the file to an .EPS, we need to hide (or delete) the text block. textDesc.remove(); // Lastly, we need to save this document as an .EPS file in the proper location. // Set the SaveOptions first, just like the PrintOptions earlier. var dieOptions = new EPSSaveOptions { compatibility = Compatibility.ILLUSTRATOR16; preview = EPSPreview.TRANSPARENTCOLORTIFF; embedAllFonts = true; cmykPostScript = true; postScript = EPSPostScriptLevelEnum.LEVEL2; } // And then actually save the document. var savedFile = unescape(dieFolder.toString()) + "/" + artFile.name.slice(0,-4) + "_Die.eps"; $.writeln("Inside Illustrator script, savedFile is " + savedFile); dieDoc.saveAs(File(savedFile), dieOptions); // Finally, close the document. dieDoc.close(); return savedFile; // END OF MAIN. function blackIt (currentItem) { ... } }
I at first thought that the script was running too fast, so I added the two "$.sleep (2000)" orders near the end to see if it would help - it didn't.
The bits of important, after defining the variables localPrinter and shipPrinter, come after the line / / Let's define the printing options for both printers.
Instead of print to the local printer, sometimes it will print to the other. For example, I am the machine called "apache". The script must localPrinter on "Printer 3". And, according to the statement of $. writeln() , he does. However, despite this setting, almost always displays "Printer 2"! From time to time he actually does it print "Printer 3".
This happens on other systems, too. It almost seems as if it prints to a printer that is numerically the one less than that to which it is supposed to print. "aerostar" prints often to "3", "warrior" often it prints for "printer 1", and then the 'marketing' impressions, we do not yet all printers output a page!
What is the cause to happen and, more importantly, what can I do about it? Help, please!
Of course, I get another set of printers listed. Nevertheless, I found a solution for this. Since it seems that the printerName of PrintOptions property is buggy, I decided to try the printPreset property instead. I created of the presets on each computer, one for each printer and the accordingly modified script. Works like a charm now. Now the switch statement:
switch (machine) { case "aerostar": $.writeln("Machine is aerostar."); localPrinter = "Printer 4"; localPrintPreset = "Color Proof Printer 4"; shipPrinter = "Shipping"; break; case "apache": $.writeln("Machine is apache."); localPrinter = "Printer 3"; localPrintPreset = "Color Proof Printer 3"; shipPrinter = "Shipping"; break; case "navajo": $.writeln("Machine is navajo."); localPrinter = "Printer 3"; localPrintPreset = "Color Proof Printer 3"; shipPrinter = "Shipping"; break; case "seneca": $.writeln("Machine is seneca."); localPrinter = "Printer 2"; localPrintPreset = "Color Proof Printer 2"; shipPrinter = "Shipping"; break; case "warrior": $.writeln("Machine is warrior."); localPrinter = "Printer 2"; localPrintPreset = "Color Proof Printer 2"; shipPrinter = "Shipping"; break; case "tomahawk": $.writeln("Machine is tomahawk."); localPrinter = "Printer 1"; localPrintPreset = "Color Proof Printer 1"; shipPrinter = "Shipping"; break; case "Marketing": $.writeln("Machine is Marketing."); localPrinter = "Printer 1"; localPrintPreset = "Color Proof Printer 1"; shipPrinter = "Shipping"; break; default: $.writeln("Machine has defaulted."); localPrinter = "Printer 3"; localPrintPreset = "Color Proof Printer 3"; shipPrinter = "Shipping"; }
and the transfer block that accompanies it, which uses the new variable:
// Let's set print options for the two printers. var localPrintOptions = new PrintOptions(); localPrintOptions.printPreset = localPrintPreset; var shipPrintOptions = new PrintOptions(); shipPrintOptions.printerName = shipPrinter;
I hope this will help someone else who is faced with this problem!
-
MAXL Script will not file for data laod error write.
Sorry, Glenn here is the new thread. I re took place without semi colon after data 3 and the same error came without anything being written to the error file.
I voluntarily removed a member of the original contour which is included in the loaded data, but still the error file is not written in. I tried to make the load manually but runs it in the background, error file is created on my local hard drive, but he's not writing it. Check the output and it is written in a directory located on the server. I think it's normal.
It will not write to a local drive? I'll try specifying a task on the server to see if it spins here.
Thank you
Original post below.
Hello
I am also having this problem.
I'll include my script below but will state some details before
We are on Essbase 11.1.1.3
I'm running the administration Console of my PC client that connects to the server in the script and I read that in this whole file error message won't get written. This documentation has been to v 9.1.3
Here is my script (I've changed the names)
Login ' user '' password' server ';
create the application "Money1' as 'Money2.
coil stderr to 'errorfile ';
import the database 'Money1'.' Hand ' data
text local data_file 'Money1_Data.txt '.
using the server rules_file 'Data3 '.
Error adding to 'dataload.err ';
run the calculation 'ALL CALC'; on 'Money1'.' Hand ';
disconnection;
spool off;
"exit";
Here's the error output I get:
line of code: error add to 'dataload.err ';
The statement executed with warnings.
(3) close syntax error ["$"]
I don't see a sign of dollar anywhere in my code and the file of errors did not occur.
Also error files get written too if the actines are running in the background?
Thank you!
AlexIt works for me in a MaxL script run through essmsh.exe:
import database appname.dbname data from local text data_file "d:\\datafilename.txt" using server rules_file "rulename" on error write to "d:\\errorfilename.err" ;
Sometimes EAS (I think that you run through this) did weird things to MaxL. I avoid MaxL in EAS as much as possible (such as 100% of the time).
NB - the datafilename and errorfilename and their drive letters are local to each time that you run this process through the MaxL shell. I don't know how it works when you run EAS - are local drives to your local session on the server of the EAS? Don't know. Leave EAS, buy TextPad (no I'm not the author of this beautiful product) and download syntax MaxL library and be happy. :)
Kind regards
Cameron Lackpour
Published by: CL on October 7, 2010 07:12
Put the MaxL in a block of code so that it can work correctly. -
Bluetooth devices will not connect after a long period of absence
It started in the last 3 months, I'm not sure of that OS upgrade specifically. I currently have Version 10.11.3. I have a MBP late 2011. I use a keyboard, trackpad and bluetooth magic, bought the same time as my mac.
Whenever I come back from a business trip (usually a day or two max), my bluetooth keyboard and trackpad will not connect. They appear in the drop down bluetooth devices, but when I select Connect, nothing happens. I did everything the new standard batteries, SMC/PRAM reset, nothing helps. I then manually have to pair them up with difficulty using Set Up Bluetooth Trackpad/keyboard. It will show "found", then say could not pair. I have the power on the devices several times his cycle, and then hold the power button 'on' to the pair. Usually, it takes 5-10 minutes and is terribly frustrating. Once I get the paired, as long as my stays Mac in the same room with the devices, they pair very well. Appreciate the advice.
99 + % of the time, there is a previous event - you indicate that this has been the case for «...» 3 months... »
What event would it? Upgrade to El Cap? Nothing at all you can think of that has occurred "3 months ago"
-
When I use the minor correction, 'get build specification VI' in a VI it works as expected to provide the main, and what ever the project version number it is pointing to, however, when I buuild as VI in an exicutible and run this exicutable it always returns 0 for all fields.
Does anyone know why he would do this?
Windows 7 Enterprize
LabVIEW 15 Professional Development System
I think that it does not work in an executable file is because it's not supposed to run in an executable file. It is designed to extract the specification of the Build of the project (.lvproj) file, which is generally not available at run time.
However, there is another function, FileVersionInfo (found in the hidden gems that you can find in the LabVIEW tools network using VIPM). When you generate an executable file, the Version information is placed here where Microsoft wants it to be saved, and the LabVIEW function will retrieve it for you, as well as the name of the program executable. Here is an excerpt from my program and the utility Version:
Works like a charm. However, don't get started me trying to use the Build specification defined in the Action of pre-Build (I currently have a "discussion" with NOR, clearly, I lose the "Pre-build" meaning...).
Bob Schor
-
HP8600 All In One: HP8600 Panel will go up is no longer on my PC
HP8600 control panel will open is no longer on my desktop PC
Hello @Herndon1, greetings!
Thank you for visiting the Forums from the HP Support! It's a good place to find the help you need, other users, HP experts and other support staff.
I understand you are trying to access the menu of the printer on your desktop. Try the following steps:
- If present, disconnect the USB cable between the printer and the computer.
- Go to control panel of configuration-programs and feature - select the HP 8600 printer entries and uninstall them.
- Restart your computer.
- Now, click http://hp.care/2dUYVtJ and enter your printer model number to download and install the printer drivers.
- Plug the USB cable if necessary.
Once the new drivers are installed, try to check the functionality.
Let me know if that helps!
See you soon
Please click on 'acceptable' on the post that solves your problem to help others to find the solution. To show gratitude for my help, please click the 'Thumbs Up icon' below!
-
DVD player will not read is no longer drives
Recently, I went for 2 weeks - when I left my computer was working and my dvd drive could read all my disks (mainly games)
My return however (and after the installation of 18 updates last night) the bed DVD player is no longer just about any type of media disc (having already be able to read all). However, whenever I needed it for work, he did, I noticed that before I left my DVD player had played a bit and seems to be trying to read discs (making the noise of rotation).
Anyone got any ideas on what this could be and a possible fix?
(im running windows vista and the drive is a tsstcorp DVD + - RW TS - H653B ATA)
Thanks in advance
Hello
Step 1: Please do all the same underneath if you did some before as is often total
a process that solves the problem.Try this - Panel - Device Manager - CD/DVD - double click on the device - driver tab.
Click on update drivers (this will probably do nothing) - RIGHT click ON the drive - uninstall.
RESTART this will refresh the default driver stack. Even if the reader does not appear to continue
below.
Then, work your way through these - don't forget the drive might be bad, could be a coward
cable or slight corrosion on the contacts (usually for a laptop) and other issues.Your CD or DVD drive is missing or is not recognized by Windows or other programs
http://support.microsoft.com/kb/314060 - a Mr FixitTry this fix manually if the Fixit 314060 does not work
http://www.pchell.com/hardware/cd_drive_error_code_39.shtmlYour CD or DVD drive is missing or is not recognized by Windows or other programs-
a Mr Fixit
http://support.Microsoft.com/kb/982116The CD drive or the DVD drive does not work as expected on a computer that you upgraded to
for Windows Vista
http://support.Microsoft.com/kb/929461When you insert a CD or a DVD, Windows Vista may not recognize the disc
http://support.Microsoft.com/kb/939052Your CD or DVD drive cannot read or write media - A Mr Fixit
http://support.Microsoft.com/GP/cd_dvd_drive_problemsCD/DVD drive does not appear in Windows Vista, or you receive this error in Windows
Vista installation after booting from the DVD (AHCI)
http://support.Microsoft.com/kb/952951
Drive CD - R or CD - RW Drive is not recognized as a recordable device
http://support.Microsoft.com/kb/316529/Hardware devices not detected or not working - A Mr Fixit
http://support.Microsoft.com/GP/hardware_device_problemsAnother possibility is that the cables are loose. Remove ALL power, then make sure that the cables in both
ends. Remove and replace, do not just tight. For laptops, you can often clean power and
contacts data with a pencil eraser.Some DVD players do not use the Windows default drivers so check with the manufacturer of system and
manufacturer of device to see if there is a firmware or drivers for your drive if necessary.===============================
Step 2: You have disc problems as the CD/DVD is actually 4 discs in 1 case (CD & DVD
Burn and CD and DVD read). So it is not unusual for 1 or 2 operational so that other parts
do it right.Did you follow the Troubleshooting Guide for the reader who still does not work? There are
the entries in registry that the troubleshooter does not solve and those who "might" be the cause.Check with your Maker system and a device for the two possible firmware updates and
the correct registry entries for your car.Here are the keys that I of course are those in question - for the subkeys of the CD/DVD drive
as there will be other subkeys in these keys. Do not forget to ask specific keys involved as well as
the parameters.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\IDE
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E965-E325-11CE-BFC1-08002BE10318}
-----------------------------------------------------------------------
You can probably find more info here and maybe even the exact registry for your CD/DVD settings
drive from someone with the same model.Forums - a lot of expert real help
http://Club.myce.com/CD/DVD units
http://www.myce.com/storage/Use DevManView to locate the CD/DVD in the registry (be careful and do a prior Restore Point)
nothing change) - find the DevManView device and then make a right click on it free in RegEdit.DevManView - free - an alternative to the standard Windows Device Manager, which displays all the
devices and their properties in flat table, instead of the tree viewer
http://www.NirSoft.NET/utils/device_manager_view.htmlI hope this helps.
Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.
-
Where scripts can be executed in a PDF form?
I created some forms in Acrobat Pro XI, but very, very recently went to Acrobat 8.1 Windows DC. I have a field 'number of quote' who, at the opening of the form to be generated. This all works fine, but I can't find the script for her! Not under the Actions field or calculate nor Document JavaScripts. I'm puzzled. Where else could be defined?
Open Control Panel Pages, right click on the first page, select properties and
and then under the Actions tab, look under the trigger Page Open. My guess is that
will be there.
-
Invoices will be sent is no longer!
I just off the coast of cat after not receiving my invoice by e-mail this month.
Apparently, Adobe will be no longer able to send invoices by email! Instead, I have to go through a multi-step process which is to connect twice!
Adobe please bring back this feature. My team and I are required to submit documentation for our credit cards each month.
Hello
Adobe does not send invoices on emails.
Please see print a receipt of payment or invoice for your subscription to creative cloud
For more information, please contact customer service
Kind regards
Sheena
-
A / V Script will not spend a single page
Hey all,.
I don't know what I'm doing or what is happening, but I write an A / V script on the desktop app and it won't let me past one page writing. All advice or tips or things I can do to make it work? \
Thank you!
-Scott
Hello
Currently, you will be able to type past a page in a single line. To continue please insert another line in your script.
Thank you
Rashi
-
[JS] [CS5] My Script will not remove any cardboard in CS5
Hi all
We used this script in years, but CS4 now I try it in CS5 and it removes everything, not only the items on the pasteboard. I know there are a few changes with pageItems in CS5 and I suspect it has something to do with the problem, but I can't. Any help would be greatly appreciated as usual. Also, I took out cela a script that Dave Saunders created for us. I would use it in another script, that I am currently working. I know that's not pretty as if it were when Dave created, but I tested this in CS4 and it works, if you can clean at all too, would be great.
var myDoc = app.activeDocument; deleteAllPasteboardItems(myDoc); function deleteAllPasteboardItems(myDoc) { var myPIs = myDoc.pageItems.everyItem().getElements(); for (var j = myPIs.length - 1; j >= 0; j--) { var page = findPage(myPIs[j]); if (page === null) { // must be on Pasteboard -- can't be overset try { myPIs[j].locked=false; myPIs[j].remove(); } catch (err) { } } } } function findPage(theObj) { if (theObj.hasOwnProperty("baseline")) { theObj = theObj.parentTextFrames[0]; } while (theObj != null) { var whatIsIt = theObj.constructor; switch (whatIsIt) { case Page : return theObj; case Character : theObj = theObj.parentTextFrames[0]; break; case Cell : theObj = theObj.insertionPoints[0].parentTextFrames[0]; break; case Note : ; case Footnote : theObj = theObj.storyOffset; break; case Application : return null; } if (theObj == null) return null; try { theObj = theObj.parent; } catch (ignored) { } } return theObj } // end findPage
Thanks again,
Danny
Hey Danny,
In ID CS5 any top-level page point belongs to spread even if it is on a page, so your findPage function no longer works. Fortunately the DOM offers now a parentPage property that returns the null value if the object has no parent page (= does not hit any page).
The following excerpt should do the job:
// =============================================== // Remove Pasteboard Items / InDesign CS5+ // =============================================== removePasteboardItems(app.documents.length && app.activeDocument); function removePasteboardItems(/*?Document*/doc) { if( !doc ) return; var items = doc.pageItems.everyItem().getElements(), t = null; while( t=items.pop() ) t.parentPage || removeItem(t); t = items = null; } function removeItem(/*PageItem*/item) { try { item.locked = false; item.remove(); } catch(_){} }
@+
Marc
-
Any ideas why weather script will not appear in the index created with DW
For an example of what I want to do with DW, please see my page now created with CoffeeCup. It will cost $49.
This did not require a moment of my time asking them for help. It is not perfect and there are a lot of code that could be cut out, but it gives me results. I need assistance in support of DW to do what I know, the software can do, but maybe not easy at the beginning.
Why the weather script does not play when the page is created with DW, but when created with Publisher and cup of coffee?
Any help would be greatly appreciated.
I want to use Dreamweaver, really I do. I have a whole database downloaded with the software of connection Member, just waiting for me to install. I don't install it until I first get a handle on a bug of ugly time.
atmydeskworking wrote:
Why the weather script does not play when the page is created with DW, but when created with Publisher and cup of coffee?
The reason that the weather-report is not working in the Dreamweaver version of the page is that you have a gap between the words 'white' and '&' in the link below. Delete the gap and it will work. http://weatherreports.com/jscript.html?width=234&height=60&theme=white &location=Fairfax%2C%20Minnesota%2055332&units=f"
Maybe you are looking for
-
Why do I not rights aloud java on sites I know are ok
When I go to dsl test his blocked even if I say that he'll let me not operate
-
Export to the Photo in email (Mail) does not
Recently upgraded to El Capitan on my Mac in late 2009. I worked through most of the problems of conversion of iPhoto photo. A question, I'll have the pictures sent to me, the guest in Mail to 'Export of Photos' does nothing. I select that the photo
-
CVI2013: WARNING: implicit conversion changes signedness: "long" to "int".
What is Clang was trying to say with this warning? int f( void ) { int i1 = 4; int i2 = 1l
-
How to set up printing wireless of my lide 120 to a brother hl-3170cdw
Seems like scanners are the poor relative in the community, I do not see any place to ask this question other than "General Discussion." To expand on my subject line... nothing ignite communication between my Windows laptop 8.1 and my printer Brother
-
HP Photosmart B8550 printer Out Of Paper error message
I have a HP Photosmart B8550 who insists on the fact that I'm paper little matter how much is in the main tray. Whenever I try to print from my computer or just running test page, I get the error message "Out of Paper". This problem occurred about