How do I know whether an area of selection has pixels or not?
Hi all
I want to know how find out whether an area of selection has pixels (empty) using javascript.
can someone help me?
With the help of Mike function you can do...
main(); function main(){ var doc = activeDocument; if(hasSelection (doc)){ var result = interscetTransparency(); if(result && !hasSelection (doc)){ alert("No pixels exist"); }else{ alert("Pixels exist"); } } } function interscetTransparency() { var desc = new ActionDescriptor(); var channelRef = new ActionReference(); channelRef.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') ); desc.putReference( charIDToTypeID('null'), channelRef ); var selectionRef = new ActionReference(); selectionRef.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') ); desc.putReference( charIDToTypeID('With'), selectionRef ); try{ executeAction( charIDToTypeID('Intr'), desc, DialogModes.NO ); return true; }catch(e){return false;} }; function hasSelection (doc) { var res = false; var as = doc.activeHistoryState; doc.selection.deselect(); if (as != doc.activeHistoryState) { res = true; doc.activeHistoryState = as; } return res; };
Tags: Photoshop
Similar Questions
-
IPhone 6 - How will I know what apps are underway in the background?
IPhone 6 - How will I know what apps are underway in the background?
On multitasking on your iPhone, iPad and iPod touch - Apple Support
Scroll to the bottom where he treats background App update!
You can visit these settings under settings > general > background App update.
-
I have a mp3 player.i sansa player - tunes doesn't recognize Sansa, so I need to transfer my music in windows media player. to do this I need to convert all my music in mp3 format.when I do that, then I can burn all my music and import to wmp.question is that when I convert to format mp3, how will I know which songs are mp3?
You can create a smart playlist which, for example, collecting files converted based on the date that they are added to the library. It depends on how you want to proceed. If you want to permanently convert, I have a script called ConvertFormat which range the originals after conversion. Alternatively, you can temporarily change your media to the converted files folder are stored in a folder of new media, then once the process is complete you may add these files to your WMP library, reset the media in iTunes folder and delete the new additions to iTunes library, thus separating the two libraries.
TT2
-
Hello
These symbols have appeared on the desktop of my admin account. I don't like unexplained things that appear in my admin account, so, how do I know what they are associated with? They appear as a result of software that I installed in my admin account, and it is rare to access this account, so I don't know when they "conclude" and have been unable to find their source. It is the first time symbols as it appeared on my desk.
Thank you, Jay
Hi Jay
These files Desktop.ini sometimes appears on the desktop for no apparent reason, if you have the show hidden files enabled in folder options.
In other cases, they generally only appear when you perform a large customization on a folder.
If you have not made any radical customizations on the folder on the desktop, you can delete these files safely.
How to customize with the Desktop.ini files:
http://msdn.Microsoft.com/en-us/library/Windows/desktop/cc144102 (v = vs. 85) .aspx
Concerning
-
How can we know if there are two or one router processor (RP) in ASR1006?
How can we know if there are two or one router processor (RP) in ASR1006? Is the RP located in ASR1K inside or it's like a map? Thank you
'show the inventory' or 'display the platform '.
The RP is "embedded" / "shipped" in ASR1001/1002 and 1004, 6, 9, 13 card.
-
In Task Manager, how can I know which processes are running in the background?
In Task Manager, how can I know which processes are running in the background?
Hello.
What exactly is your problem?
Details please! Thank you.
- When you open the Task Manager, go to processes
- under the seat of tab CPU reading 01, 02, or higher... that's how you know what programs are underway on the bottom.
Helped?
-
How do I know what programs are safe stop execution or remove it from the startup of Windows 7?
original title: start up programs?Hello
You can use these to control which startup programs. Many others settle
start-up haven't really needed to be there. Such as Acrobat Reader (Adobe), WinAmp
Agent and many others who are responsible for pieces of themselves to get started more quickly (not a problem
on the machines of today ' hui) and of course they can control the files they support (to be
course you continue to use only). Those who are only common examples and didn't want to not say
as a slam on these programs very well.How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7
http://support.Microsoft.com/kb/929135How to change, add or remove startup programs in Windows 7
http://www.SevenForums.com/tutorials/1401-startup-programs-change.htmlAutoruns - free - see what programs are configured so that it starts automatically when your
system boots and you log in. Autoruns is also the full list of registry and files
locations where applications can configure start automatic settings.
http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx-------------------------------------------------------------------------
Performance and maintenance tips
http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/welcome-to-the-performance-and-maintenance-Forum/19e5d6c3-BF07-49ac-a2fa-6718c988f125I hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
How do I know which patches are needed?
I installed Oracle 11 g R2.
How could I know what patches are needed? It is such tool or check the app?
concerningSee MOS Doc 756671.1 (Oracle recommended patches - Oracle database)
It is also advisable to apply the latest patch of PSU available - see these Docs MOS
268895.1 - group of patches oracle Database Server, Versions information: 8.1.7 for 11.2.0
437878.1 - intro to set Patch updates (PSU)HTH
Srini -
How will I know if my XP Pro OS has 64 or 32-bit?
How will I know if my XP Pro OS has 64 or 32-bit?
Go in the "Start Menu > all programs > Accessories > system tools > Information System" on the section that is displayed by default, it will list in the "System Type" it will list the system as a "x 86" one "x 64" or "x 64", a "x 86" is a 32-bit processor, a "x 64" or "64" is 64-bit Dennis, owner: please do not forget to mark any message (s) who assisted as useful or answer EMAIL ME "" "" "» : STAFF E-MAIL: BUSINESS EMAIL
-
How will I know if my e-mail sent has been read?
How will I know if my e-mail sent has been read?
You do not have. Even if you add a reception/reading, the recipient always has the choice to respond or not. If you find my answer helpful, please click the button "Vote as helpful"! Thank you!
My Blog -
How will I know if my inspiron 1721 laptop has a SSD or HARD disk drive?
How will I know if my inspiron 1721 laptop has a SSD or HARD disk drive?
Original title: HDDorSSD
Greg
Go to support.dell.com and enter your express number and they will tell you.
-
How do I know if an update to mysql has been accepted?
How do I know if an update to mysql has been accepted?
I need to know if an update has been performed, or if the record was not found... is it possible that coldfusion can use this resoponses of success/failure of pitfalls of mysql [linda as myquery. RecordCount]?
Basically, I'm trying to update a row if no line has been updated with day - registration does not exist so then I do an insert...
-any ideas?
-sean
Try to use the result created by CFQUERY object.
See the documentation: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7f ae.html
Update DISC_CUST set DISC_PriceChange = '222222', DISC_TaxablePriceChange = ' 2222222 "
where DISC_ProdID = '1129'
-
How do you know what screw are running?
When I stop my Main.vi all the subVIs should be stopped. But when I go to close my project, it says some screws are still running? How I know which screws are running? Where can I get a list of these?
-
I try to install Service pack 3 on my windows XP system when I try to download I have the C:\windows\ssystem32\ntdll.dll message is opened or currently in use by another application you approach other applications & try again, I'm connected only to Microsoft, how know if there are other applications running.
I hope it's because you just made a new installation of Windows XP?
Through these two articles:
- Steps to take before you install Windows XP Service Pack 3
- Windows XP SP3 - read all the prerequisites for a successful installation
What I propose is the following...
- Go to this web page: How to reset the Windows Update components? and use the FixIt utility in aggressive mode.
- Reset.
- Download here all the SP3 Setup file: Windows XP Service Pack 3 Package of Network Installation for developers and information technology professionals and save it to the Office of the administrator of the user account on the computer in question.
- Reset.
- Double-click the installation file downloaded in step 3 and follow the instructions.
-
How can I know which files are accessed more so I can move them to another drive
My C drive is constantly busy and is indexed to 100% much of the time. My swap file is on my S drive and its activity is very low. How can I know what is causing all the readers of the activity on my C drive so I can move some things my S, or other?
I realize it is not easier to simply move the files, I might have to reinstall some applications or other things. But for now, I don't know what are the files or applications, roll to the top of the activity on my C drive.
You can use performance monitor. Type perfmon in the "Search" box and press "Enter."
Open the drive section by clicking on the arrow
To identify individual files in more detail, you will need the Windows Performance Toolkit
http://msdn.Microsoft.com/en-us/performance/cc709422
http://msdn.Microsoft.com/en-us/performance/cc825801
Download as part of the WIndows SDK from here:
Select this option for components you need.
There is a video on the use of the tool here: http://channel9.msdn.com/Events/PDC/PDC09/CL16
At a glance, use Process Explorer to identify the source of the e/s:
http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653
On the file menu, click "show details for all processes."
On the view menu, click on "Select columns" and check the deltas of reading and writing.
You can also use the process monitor:
http://TechNet.Microsoft.com/en-us/Sysinternals/bb896645
This will show you the operations of individual files so the amount of data will be huge. If a Visual inspection reveals anything, you can export the data to a csv file and use a spreadsheet to a total activity for each file.
Maybe you are looking for
-
Officejet Pro 8500 printhead don't align
Recently bought an Officejet Pro 8500. But followed installation instructions the printer can't align the print heads. Have reinstalled the print heads, heads cleaned, etc. but in vain. Auto diagnostic test indicates the two print heads are good.
-
Sleep mode? cleaning maintenance disk cleanup
My computer want to wake up from sleep mode
-
implementation of the system slowly after virus/spyware removal
Win XP Home: A the IS fake virus who, after much time/patience, finally got rid of. However, the system seems really slow to start and after opening, which is slow to close etc. Is there security programs I can download to check and fix or can anyo
-
My PC will not restart or shut down
Original title: problem with my pc HELO I would like to know why my pc won't restart or shut down. Can U help me?
-
All I'm doing is to change an icon on the desktop and I get the ACCESS DENIED, YOU WILL NEED to PROVIDE ADMINISTRATOR TO MODIFY THESE AUTHORIZATION SETTINGS. Click on continbue to perform this operation! When I click on continue, nothing happens!