Script for deleting objects on pasteboard
Anyone have a script that deletes all objects and text outside the page (or margins)?
Unfortunately in my Indi CS6 any pasteboard and spread item is "instance of spread".
So i consider geometrical bounds:
myDocument = app.activeDocument
cur_Ruler = myDocument.viewPreferences.rulerOrigin;
with(myDocument.viewPreferences){
rulerOrigin = RulerOrigin.spreadOrigin;}
myDocument.zeroPoint = [0,0];
aWidth = myDocument.documentPreferences.pageWidth*2+10;
var objs = app.documents[0].pageItems.everyItem().getElements();
while(obj=objs.pop()){
a_left = obj.geometricBounds[1];
a_right = obj.geometricBounds[3];
if(a_right <0 || a_left > aWidth){obj.remove()}
with(myDocument.viewPreferences){
rulerOrigin = cur_Ruler} //back to the RulerOrigin
Similar Messages
-
Need script that delete objects of certain color...
Hello. For my Hobby I would need an Illustrator script that can delete objects of a certain color on selected layer. The color can be set in a dialog like #000000 or anything alike.
I will need it to delete letters in text that has a certain color (different than letters around it). Letters to delete can be inside sentances or free. It doesn't matter if the text need to be outlined and ungrouped before run script, or not.
I would apprechiate any help. Thank you.// CharacterColorizedIfNotMatchPrompt.jsx
// Hint: test the script with little text.
// The more extensive the text, the more time it takes the script.
// greetings pixxxel schubser
// http://forums.adobe.com/thread/1190610?tstart=0
var aDoc = app.activeDocument;
var col = new CMYKColor();
col.cyan = 0;
col.magenta = 20;
col.yellow = 0;
col.black = 0;
var aTFrame = aDoc.textFrames;
if (aTFrame.length > 0) {
var check = prompt ("Which character?", "a");
check1 = check;
check2 = check1.toUpperCase();
for (i=0; i<aTFrame.length; i++) {
for (j=0; j<aTFrame[i].characters.length; j++) {
aChar = aTFrame[i].characters[j];
if (aChar.contents != check1 && aChar.contents != check2) {
aChar.fillColor = col;
alert("done")
Try this.
Have fun. -
Apple Script for deleting podcasts
I subscribe to a lot of podcasts, but I don't want to keep them in my iTunes library after I'm done listening to them. Is there an Apple Script for automatically deleting podcasts? Thanks.
Thanks - once I'm in Automator and select Music, I don't see any options for finding Podcasts. Any suggestions which item/step I should select next in Automator? Thanks.
-
Generating .sql script for all objects of a User/Schema
Hi All,
What are the ways in which I can generate scripts for a full USER (all objects) with dependencies. (by dependencies I mean for example that PK be created first before creating FK).
We can export the full schema using (exp rows=n) but this will generate a .dmp file. I want a .sql file which can be run on any other machine (from SQL> prompt) so that user and all objects are created (without the need to use "imp").
Thanks
-AKJBut the easiest way to do this would be to do an export with rows=N and then an import.
You coule do an export and then let run the import utility with indexfile=<you_name_it>.sql and this way you'll get a file with all statements included (but table definition commented out).
Or you do it yourself (DIY-method), where you have to select all your relevant objects and their dependencies. -
Powershell script for deleting sitecollection and its content db
want to know whether any powershell script is avlble for deleting the sitecollection and its content db at oneshot!
i have created sitecollection specific content db and i wanna delete the same.Hi,
Below link will help to delete site collection
http://technet.microsoft.com/en-us/library/cc262392(v=office.15).aspx
Thanks
Somnath Matere -
Simple Script for Multiple Objects?
Someone recently helped me with setting an opacity level for an object using this one line script and binding a keyboard shortcut to it: app.selection[0].transparencySettings.blendingSettings.opacity=50; (Pressing "5" sets the object's opacity to 50%)
Although the script works perfectly for one object, when mutiple objects are selected it only affects the first selected object. Can someone show me how to get this script to affect multiple objects at once?
Thanks in advance!Thanks for the help man, but what's with the snarky comment? lol. Yeah I use my "5" key daily as well. But in ID it does nothing while in the default context, so why not put it, and the other digits to use to quickly set object opacity? (this function is similar to setting opacity for Photoshop layers by the way).
Have a nice day, and cheer up. Spring's almost here. -
We need to apply object style to only eps files in doc, or tif.... How to do this? Maybe someone have a script?
thanks@kajzica – I don't have a script for that, but it is scriptable. You surely mean that you want to apply the object styles to the container frame of the images, aren't you?
A few minutes later – try the following ExtendScript (JavaScript) code:
You could edit the names of the two object styles at the beginning of the script code.
OR: you could first run the script, the script will add two object styles to the document that you can edit afterwards.
The script will sort the EPS and the TIFs from the other image types.
Make sure that all graphics are up-to-date and linked correctly!!
//ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx
//Uwe Laubender
* @@@BUILDINFO@@@ ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx !Version! Thu Dec 12 2013 13:15:30 GMT+0100
//Edit your style names here. Change the name between the two " " only!!
//OR: edit your object styles in InDesign after running the script.
var styleNameForEPS = "EPS-Containers-Only";
var styleNameForTIF = "TIF-Containers-Only";
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
app.doScript(_ApplyObjectStylesToContainers, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Apply object styles to containers for TIF and EPS graphics");
function _ApplyObjectStylesToContainers(){
var d=app.documents[0];
var allGraphicsArray = d.allGraphics;
if(!d.objectStyles.itemByName(styleNameForEPS).isValid){
d.objectStyles.add({name:styleNameForEPS});
if(!d.objectStyles.itemByName(styleNameForTIF).isValid){
d.objectStyles.add({name:styleNameForTIF});
for(var n=0;n<allGraphicsArray.length;n++){
//The EPS case:
if(allGraphicsArray[n].getElements()[0].constructor.name === "EPS"){
allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForEPS);
//The TIF case
if(allGraphicsArray[n].getElements()[0].constructor.name === "Image" && allGraphicsArray[n].getElements()[0].imageTypeName === "TIFF"){
allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForTIF);
}; //END: function _ApplyObjectStylesToContainers()
Uwe -
Need shell Script for Invalid object
Hi All,
Can anyone post me a script for checking the invalid objects in 10g/11g database.
The should should check for invalid objects,recompile and sent the email .I could think fo something like below(And applicable to multiple SID's running on the server) and i tested it it works(bash shell script)
Assumptions:
You have environmental file to set ORACLE_HOME ORACLE_SID
say in this example
/oracle/env
ls -ltr
env_ORCL.sh
env_TEST.sh
env_HR.sh
You also have uuencode rpm installed to use along with mailx command(or else get it installed not big deal). uuencode is required
to send as mail attachment
1)I have kept SID list in file (/oracle/INVALID directory for eg)
cat SID.lst
ORCL
TEST
HR
If you have lot of SID's you can populate the file using ( ps -ef|grep -i pmon | grep -v grep | awk '{print$9}' | sed 's/ora_pmon_//g' > SID.lst)
2) Here are the list of SQL's(/oracle/INVALID directory
cat invalid_pre.sql (For listing invalid objects per instance)
set echo off
set heading off
set time off
set timing off
spool invalid.log append
break on instance_name
select instance_name , a.*
from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
spool off
exit;
cat invalid_compile.sql--to recompile invalid objects
set echo off
set termout off
set feedback off
@?/rdbms/admin/utlrp.sql 4; (Note you change degree 4 or 8 accordingly)
exit;
cat invalid_post.sql--to list post recompilation
set echo off
set heading off
set time off
set timing off
spool invalid_post.log append
break on instance_name
select instance_name , a.*
from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
spool off
exit;
3)here is the shell script
cat invalid.sh
for i in `cat SID11g.lst`
do
cd /oracle/env/
source env_$i.sh
cd /oracle/INVALID
sqlplus "/as sysdba" @invalid_pre.sql
sqlplus "/as sysdba" @invalid_compile.sql
sqlplus "/as sysdba" @invalid_post.sql
done
uuencode invalid.log invalid.log | mailx -s "Invalid" <your mail id>
uuencode invalid_post.log invalid_post.log | mailx -s "Invalid" <your mail id>
4) Finally run the shell script, hopefully you should receive email :-)
I have tested it on bash
./invalid.sh
Once tested you can schedule it in cron
Edited by: vreddy on Jul 19, 2012 9:57 AM -
Script for changing objects presence based on amount range
Hello,
Is there a way to change an objects presence (either a field or a subhead) based on the entered amount range in a numeric field?
For example:
-The numeric field amount entered is a range between 1 and 49,999, then "Signature Subhead 1" appears.
-The numeric field amount entered is a range between 50,000 and 250,000, then "Signature Subhead 2" appears.
Etc.
Any advice for this script would be appreciated.
Thanks!Hi Bruce,
Your solution worked perfectly. If I was to expand the ranges (let's say to three ranges), would I just have to add another "case this" logic section such as this?
switch (true)
case this.rawValue >= 1 && this.rawValue <= 49999:
SignatureSubhead1.presence = "visible";
SignatureSubhead2.presence = "hidden";
SignatureSubhead3.presence = "hidden";
break;
case this.rawValue >= 50000 && this.rawValue <= 249999:
SignatureSubhead1.presence = "hidden";
SignatureSubhead2.presence = "visible";
SignatureSubhead3.presence = "hidden";
break;
case this.rawValue >= 250000 && this.rawValue <= 500000:
SignatureSubhead1.presence = "hidden";
SignatureSubhead2.presence = "hidden";
SignatureSubhead3.presence = "visible";
break;
default:
SignatureSubhead1.presence = "hidden";
SignatureSubhead2.presence = "hidden";
SignatureSubhead3.presence = "hidden";
Appreciated,
Eric -
Script For Deleting Computers in SCCM 2012
Dears,
I need script to remove all the remain computers in SCCM 2012, sometimes we are going to delete some computers in active directory but the computers still remain in SCCM 2012, so I need script or query to find all the computers which removed from active
directory but still remain in SCCM 2012, because I don't want to go remove them manually one by one.'
Thanks..Thanks for article but below are not clear for me. I know only meaning of site code which I replaced with the script but is not working. My site code is "S01"
1- why there is two site codes?
2- Why there is two local domain names?
3- What dose mean by installdrive and why we have two?
# $sitecode = "<sitecode>:"
# $sitecode = "PS1:"
# $installdrive = "<ConfigMgr Admin Console installation>"
# $installdrive = "C:"
# $loglocation = "<loglocation>"
# $loglocation = "D:\Logfiles\"
# $localdomain = "<domainname>"
# $localdomain = "ConfigMgrLab"
# $maxdevices = <maximum number of devices in your ConfigMgr environment>
# $maxdevices = 2000 -
Please help with script for 3D object
Hi!
I have PDF file with simple 3d object (for example a cube).
I need to make script that when user right-click to this cube, some PDF file (c:\mypdf.pdf) opening in new windows. How to make it? Thank you so much!Hi!
I have PDF file with simple 3d object (for example a cube).
I need to make script that when user right-click to this cube, some PDF file (c:\mypdf.pdf) opening in new windows. How to make it? Thank you so much! -
Help with understanding script for rotating objects
Hi all
would some help me with this, I am trying to understand what part of AS3 script says loop through(create a continues 360 loop of objects) the images from an XML file, does this make any sense.
in my script I have this
for(var i:int = 0; i < images.length(); i++)
is this the part that says loop the images/objects
this is a little more to the script including the above to maybe understand better?
private function onXMLComplete(event:Event):void
// Create an XML Object from loaded data
var data:XML = new XML(xmlLoader.data);
// Now we can parse it
var images:XMLList = data.image;
for(var i:int = 0; i < images.length(); i++) <<<<<<<<FROM ABOVE /// {
// Get info from XML node
var imageName:String = images[i].@name;
var imagePath:String = images[i].@path;
var titles:String = images[i].@title;
var texts:String = images[i].@text;
any help would be greathi rob
ok I found this menu which rotates item around on a 360 wheel trying to see if I can use the same script on my menu,
link to example: http://art.clubworldgroup.com/menu/R...g_menu_AS3.zip
I have highlighted in blue what creates the loop of items
in my menu I do ot have anything like
var angleDifference:Number = Math.PI * (360 / NUMBER_OF_ITEMS) / 180;
which sest up the 360 circle of the item
//Save the center coordinates of the stage
var centerX:Number=stage.stageWidth/2;
var centerY:Number=stage.stageHeight/2;
//The number of items we will have (feel free to change!)
var NUMBER_OF_ITEMS:uint=15;
//Radius of the menu circle (horizontal and vertical)
var radiusX:Number=200;
var radiusY:Number=200;
//Angle difference between the items (in radians)
var angleDifference:Number = Math.PI * (360 / NUMBER_OF_ITEMS) / 180;
//How fast a single circle moves (we calculate the speed
//according to the mouse position later on...)
var angleSpeed:Number=0;
//Scaling speed of a single circle
var scaleSpeed:Number=0.0002;
//This vector holds all the items
//(this could also be an array...)
var itemVector:Vector.<Item>=new Vector.<Item>;
//This loop creates the items and positions them
//on the stage
for (var i:uint = 0; i < NUMBER_OF_ITEMS; i++) {
//Create a new menu item
var item:Item = new Item();
//Get the angle for the item (we space the items evenly)
var startingAngle:Number=angleDifference*i;
//Set the x and y coordinates
item.x=centerX+radiusX*Math.cos(startingAngle);
item.y=centerY+radiusY*Math.sin(startingAngle);
//Save the starting angle of the item.
//(We have declared the Item class to be dymamic. Therefore,
//we can create new properties dynamically.)
item.angle=startingAngle;
//Add an item number to the item's text field
item.itemText.text=i.toString();
//Allow no mouse children
item.mouseChildren=false;
//Add the item to the vector
itemVector.push(item);
//Add the item to the stage
addChild(item);
//We use ENTER_FRAME to animate the items
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
//This function is called in each frame
function enterFrameHandler(e:Event):void {
//Calculate the angle speed according to mouse position
angleSpeed = (mouseY - centerY) / 5000;
//Loop through the vector
for (var i:uint = 0; i < NUMBER_OF_ITEMS; i++) {
//Save the item to a local variable
var item:Item=itemVector[i];
//Update the angle
item.angle+=angleSpeed;
//Set the new coordinates
item.x=centerX+radiusX*Math.sin(item.angle);
item.y=centerY+radiusY*Math.cos(item.angle);
//Calculate the vertical distance from centerY to the item
var dx:Number=centerX-item.x;
//Scale the item according to vertical distance
//item.scaleX = (dx / radiusX);
//If we are above centerY, double the y scale
if (item.x<centerX) {
item.scaleX*=1;
//Set the x scale to be the same as y scale
item.scaleY=item.scaleX;
//Adjust the alpha according to y scale
item.alpha=item.scaleX+1.9; -
Script for deleting a pattern by name
I want to delete a pattern by using its name.
Thank so much for your prompt reply.
I am using Photoshop CS3 and i have converted this code to VB.Net, but i am getting error on below line
theNames(cnt) = patternNames.getString(cnt).
Error Message : General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
I think this function is not available in CS3. Would you please guide me on this error.
Thank you.
This is the code that i have converted.
'REM =======================================================
Dim objApp
objApp = CreateObject("Photoshop.Application")
'REM Use dialog mode 3 for show no dialogs
Dim dialogMode
dialogMode = 3
Dim desc5
desc5 = CreateObject("Photoshop.ActionDescriptor")
Dim ref1
ref1 = CreateObject("Photoshop.ActionReference")
Call ref1.PutProperty(objApp.StringIDToTypeID("property"), objApp.StringIDToTypeID("presetManager"))
Call ref1.PutEnumerated(objApp.charIDToTypeID("capp"), _
objApp.charIDToTypeID("Ordn"), _
objApp.charIDToTypeID("Trgt"))
Dim applicationDesc = objApp.executeActionGet(ref1)
Dim presetManager = applicationDesc.getList(objApp.stringIDToTypeID("presetManager"))
Dim patternNames = presetManager.getObjectValue(4).getList(objApp.stringIDToTypeID("name"))
Dim theNames(patternNames.count) As String
For cnt As Integer = 0 To patternNames.count
theNames(cnt) = patternNames.getString(cnt)
Next
MessageBox.Show(String.Join(",", theNames)) -
Hi All,
wen im loading the all the dimensions we have to delete all alises and reload all the dimensions
How can i delete alias for every load using maxl or any thing else
ThanksDear user98631,
I was going to refer you to this link: Re: HOW can i delete the members in dim using MAXL but I find that you are one and the same as the OP of that thread so you've already got the gen on what MaxL can and cannot do.
So, briefly, there is no MaxL command to delete aliases.
What you could do is create a dimension load rule that load blanks to aliases. This would require a rebuild of each dimension that you wanted to impact.
I'm a little confused, though.
You wrote:
wen im loading the all the dimensions we have to delete all alises and reload all the dimensions
How can i delete alias for every load using maxl or any thing else Do you want to delete the aliases from existing dimensions, or delete all of the dimensions and rebuild them from scratch?
If you want to do the latter, the previous thread linked above ought to do it. If you don't want aliases, just ignore the column with the aliases in your build table/file.
Does this answer your question?
Regards,
Cameron Lackpour -
Querying deleted objects container in Active Directory using JNDI
Hi,
I am trying to query deleted objects container using JNDI which fails with error 64.
Has anyone seen this or knows how to query AD using binary data in JNDI.
Seems to me there is some problem with the search base.
search base: <GUID=18E2EA80684F11D2B9AA00C04F79F805,dc=engserver,dc=com>.
filter: objectclass=*
search scope: subtree
This is the error:
Search example failed.
javax.naming.InvalidNameException: <GUID=18E2EA80684F11D2B9AA00C04F79F805,dc=eng
server,dc=com>: [LDAP: error code 64 - 00000057: LdapErr: DSID-0C090563, comment
: Error processing name, data 0, v893 ]; remaining name '<GUID=18E2EA80684F11D2B
9AA00C04F79F805,dc=engserver,dc=com>'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2802)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2616)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1744)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1667)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirCon
text.java:368)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCom
positeDirContext.java:328)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCom
positeDirContext.java:313)
at javax.naming.directory.InitialDirContext.search(InitialDirContext.jav
a:245)
at jSearch.main(jSearch.java, Compiled Code)
Thanks,
ChetanI thought I had posted one of these. How remiss of me !/**
* deleted.java
* 5 July 2001
* Sample JNDI application to search for deleted objects
* Modified December 2004 to add Win2K3 lastKnownParent
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.ldap.*;
import javax.naming.directory.*;
import com.sun.jndi.ldap.ctl.*;
class DeletedControl implements Control {
public byte[] getEncodedValue() {
return new byte[] {};
public String getID() {
return "1.2.840.113556.1.4.417";
public boolean isCritical() {
return true;
public class deleted {
public static void main (String[] args) {
Hashtable env = new Hashtable();
String adminName = "CN=Administrator,CN=Users,DC=ANTIPODES,DC=COM";
String adminPassword = "XXXXXX";
String ldapURL = "ldap://mydc.antipodes.com:389";
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
//set security credentials, note using simple cleartext authentication
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PRINCIPAL,adminName);
env.put(Context.SECURITY_CREDENTIALS,adminPassword);
//connect to my domain controller
env.put(Context.PROVIDER_URL,ldapURL);
try {
//Create the initial directory context
LdapContext ctx = new InitialLdapContext(env,null);
//Create the search controls
SearchControls searchCtls = new SearchControls();
//Specify the attributes to return
String returnedAtts[]={"distinguishedName","lastKnownParent"};
searchCtls.setReturningAttributes(returnedAtts);
//Specify the search scope
searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
//specify the LDAP search filter
String searchFilter = "(&(objectClass=user)(isDeleted=TRUE))";
//Specify the Base for the search
String searchBase = "DC=antipodes,DC=com";
//initialize counter to total the results
int totalResults = 0;
//specify the Deleted control
Control[] rqstCtls = new Control[] {new DeletedControl()};
ctx.setRequestControls(rqstCtls);
//Search for objects using the filter
NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
//Loop through the search results
while (answer.hasMoreElements()) {
SearchResult sr = (SearchResult)answer.next();
totalResults++;
System.out.println(totalResults + ". " + sr.getName().toString());
// Print out some of the attributes, catch the exception if the attributes have no values
Attributes attrs = sr.getAttributes();
if (attrs != null) {
try {
for (NamingEnumeration ae = attrs.getAll();ae.hasMore();) {
Attribute attr = (Attribute)ae.next();
System.out.println("Attribute: " + attr.getID());
for (NamingEnumeration e = attr.getAll();e.hasMore();System.out.println(" " + e.next().toString()));
catch (NullPointerException e) {
System.err.println("Problem listing attributes: " + e);
System.out.println("Deleted objects: " + totalResults);
ctx.close();
catch (NamingException e) {
System.err.println("Problem searching directory: " + e);
}
Maybe you are looking for
-
iPhone has previously downloaded apps but go to do today and won't keeps asking for billing info which is in there and correct but then says plz update you payment there is a billing problem with your previous purchase it's done before to me so reset
-
Multiple devices, one account
Is it legal to purchase an app and put it on more than one device with the same account? If so, is there a way to transfer an app from an iphone to an ipod touch when there is no wifi to connect the ipod touch to the internet/app store? Thanks!
-
Now my computer is all screwed up
I downloaded that "airfoil" so media player and other stuff and now i cant play anything just threw the computer like i used to. When I was in the airport I couldent use it atll all. The music shows its playing and the equalizer on the airfoil is ope
-
Macbook overheating, hard drive running constantly
why does my macbook hard drive run and overheat.Don't have a dvd running or lots of other apps
-
JEditorPane.setPage - detecting that asynchronous image loading is complete
Hi, I'm using a JEditorPane to load and display an html page of a url by using setPage(String url) ... and I've added a progress bar to show the user that loading is still occuring. Currently i'm detecting that the page has finished loaded by listeni