Help: Need script help to delete hidden layers. Action errors using panel command.
I am trying to make an action (that is using some scripts) that will delete hidden layers. When I try and action that in photoshop, the actions stops for an error if the file didn't have any hidden layers. I think I need to script it so it will delete the hidden layers, and keep going if there aen't any.
I couldnt find anything in th ejavascript ref guide for doing this. ( I'm sure I was looking right at it, I am a noob).
Thanks for any help you can give.
Here is a script to will delete hidden layers but not throw an error is there are no hidden layers.
try{
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), stringIDToTypeID( "hidden" ) );
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
}catch(e){}
Note you could also do this with just actions steps. Have the action add a layer then hide it before the delete hidden layers menu item step. That way there would always be at least one hidden layer and no error.
Similar Messages
-
I wish, I wish for a javascript that would check my open document for hidden layers and delete them, thats all.
Thank you,
RichardHello try67 and thank you very much for the script.
It works well but not at 100%.
As an example:
If I have a InDesign file with 20 hidden layers. The script will delete 10, then when double-clicked again 5 more will be gone, do it again and 2 more will be deleted, so the run command needs to be repeated until all hidden layers are gone.
I cannot find any particular pattern as to the way layers are deleted and what prompt the script to stop, but I am sure there is one.
If you find out why please let me know, in the mean time this sure beats: selecting layers, right click, select delete layers, click yes, wait...
Thanks again,
Richard -
Hi,
Am having a requirement in my staging and prod env. to add, install,retract and remove wsp.
In my dev env i used to perform with Visual Studio ,so i didnt face any issues regarding retracting and removing the wsp from solution store.
But in my staging and prod since i dont hav VS installed, i would like to have a automated script[ NOT in POWERSHELL] using stsadm command line tool which adds the solution from a folder [say D:\DeployWSPs in staging and Prod] to the solution
store and installed onto a particular web application [ NOT "All WebApplications"].
and if the wsp already exists , i need to retract it & remove from solution store and add it and install again.
can someone pls help me with the automated script .also if the folder contains multiple WSPs how can i doa for each loop [ iterate through wach ".wsp" file and perform install/...task].
i know stsadm -o adddsolution, deletesolution,m retractsolution etc. But the issue is that customer asked me to do this ina automated fashion. manually entering all these commands is a cumbersome activity.
note: when i used powershell on 2 / 3 occasions, the wsp was retracted successfully,but failed to successfully remove from the
soln store.
so i thought i will depend upon on stsadm again like old version of SP since its supported.
DasI would recommend you to use Power Shell so that you can do the automation easily. You can use
power shell for earlier version of SharePoint as well.
Look why removing the solution is getting failed. May be you are trying to remove before the solution is retracted. Wait for retract and remove the solution. Refer to the following post for more information
http://www.codeproject.com/Articles/570011/PowerShellplus-plusWaitplusforplusRetractplus-fpl
http://consultingblogs.emc.com/mattlally/archive/2011/03/29/sharepoint-server-2010-multiple-solution-deployment-script.aspx
Cheers, -
Error Using java command. Please help!
Ok, I'm having problems running my java programs. I use the javac command, and it compiles it right, and makes the class file. But if I type
java anything
It won't work. It comes up with the error message:
Exception in thread "main" java.lang.NoClassDefFoundError: BigDebt
With BigDebt as the class file. That error message comes up if I type:
java anything
java blah.class
I have version 1.3.
It would be GREATLY appreciated if someone could help.It appears you are using the right command, "java BigDebt" if your class is called BigDebt and the compiler produced a file named BigDebt.class. (This assumes that your source code doesn't start with a "package xxx;" line.) Your problem is likely a Classpath problem. Make sure you have CD'd to the directory where BigDebt is located. Then try:
java -classpath . BigDebt -
Help - Tech Support Lost my Actions and Custom Panels
Lord only knows what else I've lost. (CS6 - 64 bit) Anyhow, somehow my blur gallery (Tilt-Shift, Iris and Field) got screwed up. Whenever I brought them up, they wouldn't work and I couldn't get out of the gallery.
I called tech support and after taking control of my computer, he reset my Preferences and all was well - or so I've thought. Now I find I've lost my custom Actions and Panels.
Is there a way to retreive these and other things I may have lost, or must I start from square one?
GerryNoel Carboni wrote:
Do you have a backup of your preferences area?
Sorry I'm just getting back to you folks. I found where CS6 keeps my preferences. Then I went to my NAS to find the file backups and after reloading my backup program (long story) I eventually copied all the stuff back to where it was supposed to go.
Thanks everyone; I'm back up until the next time Photoshop surprises me with the unexpected!
Gerry -
OK, so all of a sudden today my Mac has been acting weird with one thing. I am a photographer and have been using the standard viewing to edit down my folders. For examples, I have a folder with Baby A's photos. I click on the folder and in the list view format, use the "eye" preview button and the arrow keys to preview the photos before editing them in Photoshop. As I look at them, I will on occasion delete some of the photos using the Command+Delete keys on the keyboard. In the past, these photos would disappear, I'd hear the crunching paper sound, and they would go to the trash bin. Then, the next photo in the list would pop up on the screen. Today, out of nowhere, it started jumping back to the top and showing an image of the folder itself after I deleted a photo. So, I had to scroll back down within the folder to find my place again. Everytime I delete a photo, this keeps happening. I'm at my wits end. I don't know why it started doing that! And, I really would love to know how to fix it. Any suggestions or help would be greatly, greatly appreciated. This jumping back to the top is making a simple thing a 10-year process.
I can't tell if you have done any troubleshooting. The first thing to try is restartng the computer, as long as you're at that do a SMC Reset. If that doesn't help restart in Safe Mode, it's possible one or more caches have become corrupt.
SMC RESET
Shut down the computer.
Unplug the computer's power cord and all peripherals.
Press and hold the power button for 5 seconds.
Release the power button.
Attach the computers power cable.
Press the power button to turn on the computer.
PRAM RESET
Shut down the computer.
Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
Turn on the computer.
Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys. -
Determine if hidden layers exist
I am building a script to cleanse photoshop documents, and one of the options I am including is to remove all hidden layers. There is no direct command to do so (or none that I have seen), so I used a chunk of code from ScriptListener to perform the 'Delete hidden layers' command.
I only want to enable this option if there are layers that are hidden, so I'm wondering if there is a simple way to determine if any layers are hidden in the document (aside from looping through all of the layers). Or, if there's a way to determine if the 'Delete hidden layers' command is enabled or not, since that is only enabled when there are hidden layers.I would just bung the code between a try catch block (but I'm lazy )
If you did want to check this should be fast...
alert(hasHiddenLayers());
function hasHiddenLayers(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
try{
activeDocument.backgroundLayer;
var i = 0; }catch(e){ var i = 1; };
for(i;i<count;i++){
if(i == 0) continue;
ref = new ActionReference();
ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
var desc = executeActionGet(ref);
var layerName = desc.getString(charIDToTypeID( 'Nm ' ));
var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
if(layerName.match(/^<\/Layer group/) ) continue;
if(!desc.getBoolean(charIDToTypeID( "Vsbl" ))) return true;
return false; -
Cannot Delete CPTL file from Desktop using Vista
Hi All,
I cannot Delete CPTL file from Desktop using Vista. Explorer
crashes. It is a Captivate 2 file.
I have tried (with no luck):
- logging in as a different user and deleting the file.
- running explorer as an Administrator
- uninstalling Captivate.
Anyone got any ideas?
Cheers,
RaefHi Raef,
That is a strange issue. Here are a couple more ideas you
could try:
- Have you tried renaming the file (including suffix)?
- Have you rebooted?
- Do you get any error messages when trying to delete, such
as "Acess Denied"?
- Is your machine networked? Is it possible someone else has
the file open?
- Can the file be moved to another location or put in a
folder (and then deleted)?
- Have you tried using the Command Prompt / DOS mode to
delete the file?
It sounds like it could be a Vista issue so I would look at
the Microsoft Vista forums too. Sorry I do not have an exact
answer.
IHTH,
Aaron -
HELP! How Do I Delete Hidden Users?
i'm running 10.6.7. i have a hidden user account on my machine created by a livescribe installation. i've removed livescribe from my machine, but now want to delete the livescribe account that was created. anyone know how to do this?
ADthanksVANCE!
markHow do you know it's a "hidden Account?"
Don't know if this will help. To show all invisible Folders:
Open terminal and copy/paste:
defaults write com.apple.finder AppleShowAllFiles -bool true
Reverting to the default of NOT showing hidden files:
defaults write com.apple.finder AppleShowAllFiles -bool false
Restart or Force Quit Finder required to take effect. Use the command
killall Finder
Or get EasyFind, set to show Invisible files, and search for it there. When you find it, try "Destroy" from EF or choose "Reveal in Finder" and move it to the Trash from there. You may need to enter your password.
http://www.devon-technologies.com/download/index.html
Message was edited by: WZZZ -
HELP - I deleted an adobe file that I saved to a memory stick and I need it back really badly
Try this Google search:
http://www.google.cl/#hl=es&tbo=d&sclient=psy-ab&q=free+data+recovery+software+for+flash+d rives&oq=recovery+software+for+flash+drives&gs_l=hp.1.3.0i30j0i5i30l3.9708.24161.0.34539.3 4.26.0.8.8.0.378.7320.2-21j5.26.0...0.0...1c.1.lb0o4diaEEU&pbx=1&bav=on.2,or.r_gc.r_pw.r_q f.&bvm=bv.1355534169,d.eWU&fp=ff7a879957bf69ba&bpcl=40096503&biw=1112&bih=865
It gave me plenty of hits, but be a little careful. I would suggest using the free trial of one of the paid products. As I have never used one, I cnnot recommand any.
And remeber: every time you write something on that flash drive, you risk overwriting your lost file, thus decreasing your chances of recovering it. -
Please help I need to rest the deleted history
Please help I need to rest the deleted history
rest??
Did you mean "restore"?
Sorry, if you deleted your browsing history it is gone. No backups are made for browsing history, unless you have that set that up in a 3rd party application. Or if you have a backup of the places.sqlite file, which is where that data is stored in Firefox. -
Need help on deleting after exporting to IDML
Hi Forum,
I have a script to export all the "indesign files" found inside the folder... and then remove all the indesign files...
Instead, Can i have a help to delete....
the indesign file after exporting to IDML and then
continue opening the next indesign file, exporting to IDML and deleting it...
then continue file3....
The below is the script open indesign files and export to idml and then remove all the files inside the folder Desktop/GENERAL_CS6-IDML/IN_CS6
var mySourceFolder = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6");
var myOutFolder = Folder("Desktop/Completed");
//var Indd_files = get_Files(mySourceFolder,[], ".indd");
var Indd_files = mySourceFolder.getFiles (/\.indd|\.INDD/i);
//var Indd_files = get_Files(mySourceFolder,[], ".indd");
if(Indd_files.length>0)
for(var w=0;w<Indd_files.length;w++)
try{
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
myDoc = app.open(File(Indd_files[w]));
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
var myDocNam = stripExt((Indd_files[w].name).replace(/%20/g," "))+"idml";
myDoc.exportFile(ExportFormat.INDESIGN_MARKUP, (File(myOutFolder+"/"+myDocNam)));
// myDoc.save(File(myOutFolder+"/"+myDocNam));
app.activeDocument.close(SaveOptions.no);
}catch(E){}
try {
var copyFolder1 = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6");
var myFiles2 = copyFolder1.getFiles(/\.indd|\.INDD/i);
for ( i = myFiles2.length-1; i >= 0 ; i-- ){
myFiles2[i].remove();
} catch (e) {}
Many thanks for the support..I hope this is what you expected.
You can try the following code:
var mySourceFolder = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6");
var myOutFolder = Folder("Desktop/Completed");
//var Indd_files = get_Files(mySourceFolder,[], ".indd");
var Indd_files = mySourceFolder.getFiles (/\.indd|\.INDD/i);
//var Indd_files = get_Files(mySourceFolder,[], ".indd");
if(Indd_files.length>0)
for(var w=0;w<Indd_files.length;w++)
try{
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
var myFile = File(Indd_files[w]);
myDoc = app.open(myFile);
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
var myDocNam = stripExt((Indd_files[w].name).replace(/%20/g," "))+"idml";
myDoc.exportFile(ExportFormat.INDESIGN_MARKUP, (File(myOutFolder+"/"+myDocNam)));
app.activeDocument.close(SaveOptions.no);
myFile.remove();
}catch(E){}
Green4ever -
Hi, I have duplicate records and want to delete any 2nd duplicate row. Please help in DELETE script.
Select * from cmhrec
Sr_no code date charge Charge2 Code_ID
1 AAA 1-1-2014 24.0 24.0 5
1 AAA 1-1-2014 24.0 24.0 9
2 AAA 1-1-2014 23.0 23.0 4
2 AAA 1-1-2014 23.0 23.0 11
3 AAA 1-1-2014 26.0 28.0 12
3 AAA 1-1-2014 26.0 28.0 19
--Desired output after deleting any 2nd duplicate row.
Sr_no code date charge Charge2 Code_ID
1 AAA 1-1-2014 24.0 24.0 5
2 AAA 1-1-2014 23.0 23.0 4
3 AAA 1-1-2014 26.0 28.0 12Thank you
You can simply do this
DELETE t
FROM cmhrec t
WHERE EXISTS
SELECT 1
FROM cmhrec
WHERE SrNo = t.SrNo
AND Code = t.Code
AND Code_ID < t.Code_ID
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
I need help in deleting my junk mail/bulk mail...when I dump junk mail and bulk mail into the trash it not allowing me to delete all mail only some. HELP!!
What program are you using? And what version?
-
Need help in Delete operation using blazeDS
Please find the flex client code and servlet code given below
Trying to call a DELETE methods on the servlet using BlazeDS.Configuration is perfect in the proxy-config.xml and services-config.xml
when DELETE is called with paramter user="krishna it is being printed as
received DELETE operation with parameternull
My Question is why the servlet printing null value for the user where it should print "someuser"?Can some one help me on this?
FLEX CLIENT
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.rpc.http.HTTPService;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
public function callServletDELETE():void {
var service:HTTPService = new HTTPService();
//service.url= "http://localhost:8080/examples/blazeDS";service.destination=
"BlazeDSHTTP"; //this is configured in proxy-config.xml fileservice.useProxy =
true; service.method =
"DELETE"; service.resultFormat=
"e4x"; service.addEventListener(
"result", billingCarrierResult);service.addEventListener(
"fault", httpFault); service.send({user:
'someuser'});}
protected function billingCarrierResult(event:ResultEvent):void{
serviceResultsTextArea.text =
"Success with BlazeDS!\n"+event.result;
protected function httpFault(event:FaultEvent):void{
serviceResultsTextArea.text =
"Failure trying to access service.\n"+ event.fault.faultString + "\n" + event.fault.faultDetail;}
]]>
</mx:Script> <mx:TextArea id="serviceResultsTextArea" width="50%" height="50%" />
<mx:Button label="DELETE" click="callServletDELETE()"/>
</mx:Application>
servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
* Simple example intended to demonstrate BlazeDS with HttpService.
public class BlazeHttpExample extends HttpServlet
//excluded other methods GET,POST as they are working fine
* Handles the HTTP <code>DELETE</code> method.
* @param request servlet request
* @param response servlet response
@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
System.out.println("received DELETE operation with parameter"+request.getParameter("user"));
@Override
public String getServletInfo()
return "Simple intended to illustrate BlazeDS HttpService support.";in your java code you are considering user as the parameter.. but that is not a parameter..
When making a http call in flex try something like this
var obj:Object = new Object();
obj["user"] = 'someuser';
service.send(obj);
this should work hopefully.
Maybe you are looking for
-
i know that using certain type of OS with a CPU can result in lowered amount of memory i updated the mainboard using "liveupdate" Mainboard : MSI 990 FX GD-80 OS : windows 7 ultimate 64 bit CPU : FX 4170 Memory : 4x4 GB 2133 MGHZ PSU : XION 1000(W)P1
-
I have Windows 8.1, 64 bit, Flash Player 15, and use Firefox browser, Flash Player keeps crashing on every web page including Adobe, I cannot play games, this is a screen shot of the problem I have done all the FAQ's disabled hardware acceleration, c
-
Access required fields from another datasource
Hi, I need to have contract information for Sales Orders (i.e. doc_type / doc_categ / doc_categr / refe_doc) in Billing Document ODS (source - 2lis_13_vditm). This data exists in my Sales Order Item ODS (source - 2lis_11_vaitm). What is the most effi
-
Adobe Connect: how to display a picture in the WebCam pod when not sharing video
Adobe Connect: how to display a picture in the WebCam pod when not sharing video
-
ADF Faces Dialog position and status bar
Hi, I would like to set the status ="no" for the popup and set the position before it is launched.. Is there a way to do this with a selectInputText custom renderer or something else?? using the JSF navigation rules "dialog:" Thanks JO