Verify if a selection exists
Sorry to bother You all with such a question, but how can I verify if an active selection exists in a document?
Actually I seem to be able to verify it by way of a whack try-catch-construction set to some selection-property (which returns undefined if no Selection exists), but obviously a more simple way should exist.
I want to do so in order to set up a condition to delete the Layer Mask if no Selection is active on creating an Adjustment Layer (a basic setting seemingly lost in CS4).
Thanks for any suggestions.
> A nifty construction, but it seems to indicate that the fact of a Selection being active is indeed not an easily accessed property.
This is true.
> I wonder if
>
> var myDocument = app.activeDocument;
> try {var forgetIt = myDocument.selection.bounds}
> catch (a) {alert (has no selection)};
>
> might not be shorter after all?
>
Marginally shorter, but bad form. A general rule for good programming is that
you do not use try/catch for stuff like this. There are times when you
absolutely have to because there is no other choice or times when it saves you
20 or 30 lines of code. But, in this case, the hasSelection function is small
enough that there is no real benefit to doing the try/catch.
[email protected] wrote:
> Likely the reason X used the form shown in the first example is that earlier
versions of Photoshop had problems when requesting selection bounds and it seems
I recall some versions where it didn't work at all.
Selection.bounds didn't work in CS2 and accessing the property would always
raise an exception. I'm not really sure how I implemented earlier versions but
using the history state stack trick has simplified a lot of code.
-X
Similar Messages
-
Help! Itunes wouldn't update so I tried to delet and reinstall. I keep getting a message: The instillation source for this product is not available. Verify that the source exists and that you can access it. I also get this message: The feature you are trying to use is on a network resource that is unavailable. Click OK to try again, or enter an alternate path to a folder containing the installation package 'iTunes64.msi' in the box below. Help I have no idea what that means or how to fix it.
(1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page). Here's a screenshot showing the particular links on the page that you should be clicking:
After clicking one of the circled links, you should be taken to another page, and after a few seconds you should see a download dialog appear for the msicuu2.exe file. Here's a screenshot of what it looks like for me in Firefox:
Choose to Save the file. If the dialog box does not appear for you, click the link on the page that says "CLICK HERE IF IT DOES NOT". Here's a screenshot of the page with the relevant link circled:
When the dialog appears, choose to save the file.
(2) Go to the Downloads area for your Web browser. Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
(3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
(4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
(5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time? -
I cant update or remove itunes without receiving the message: the install source (itunes.msi) for this product is not available. verify that the source exist and that you can access it. Has anyone had this problem? Thanks
(1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
http://majorgeeks.com/download.php?det=4459
(2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
(3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
(4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
(5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time? -
Error message when trying to install iTunes on my Pc:
Using Windows 7, had to replace hard drive. HELP!!
This installation package could not be
opened. Verify that the package exists
and that you can access it, or contact
the application vendor to verify that
this is a valid Windows installer packageHello JAH1961,
I recommend following the steps in the article below when getting an error message trying to install iTunes:
Trouble installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
Thank you for using Apple Support Communities.
Best,
Sheila M. -
I'm unable to install Itunes on my new PC. I'm logged in as the administrator And have deleted my browsing history. This is the error I get, ITunes installation error- “This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this a valid Windows Installer package”... Any suggestions how to fix?
Hi
Try the following:
Uninstall iTunes and Quicktime
Reboot
in the task tray right click the quicktime icon and click exit.
navigate to the folder in program files and remove the quicktime directory and all its files.
Reboot.
Now try install iTunes and quicktime and it should work
Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
mI am trying to download iTunes to my Sony PC, but I keep getting the following error after initial download attempt:
"This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer Package."
I have Windows 7 Home Premium, Service Pack 1.
Any help is greatly appreciated.Hi gump68,
Thanks for visiting Apple Support Communities.
You may find the steps in this article helpful if iTunes is not installing on your PC:
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
All the best,
Jeremy -
Please help
I am trying to download itunes on windows 7 32 bit, everytime I go to open download it comes up with a green screen then a error message.
This installation package could not be opened. Verify that the package exist.
Please help MeHi gump68,
Thanks for visiting Apple Support Communities.
You may find the steps in this article helpful if iTunes is not installing on your PC:
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
All the best,
Jeremy -
The installation package could not be opened. Verify that the package exist
HELP!
I have not been able to update my Itunes to a newer version (since 6.0.5). Every time I try to upgrade to the newer version I get this error message when I try to install:
"The installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package"
This is been incredibly frustrating because now I am limited in what songs and albums I can buy online because they require the newer version. I am getting to the point where i'm ready to start using another service to get my music from now on. I've noticed that others here have the same error message, but they are using Windows Vista. I'm having this problem on Windows XP.
Any help would be very appreciated.Oh sorry what i meant was that i am trying to install adobe reader, i have tried all version from 8 to 9 and i am getting this error.The solution that i found on different forum was to use windows installer cleanup utility and clean up the previous installation. i dont have any installation in my registry.
Kindly help me in this matter -
The full message was "The installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify this is a valid Windows Installer package."
OK, I got around this error by extracting the files to "C:\Program Files (x86)\Adobe Acrobat XI"
Now I get a different error "1325.kstanwood is not a valid short file name". I'm not certain why it's even trying to create such a file name. -
this installation package could not be opened.verify that the package exists and that you can access it,or contact the appliacation vendor to verify that this is a valid windows installer package how can i istaller itunes in my laptop windows 7 64 bits
I'd first try downloading an installer from the Apple website using a different web browser:
http://www.apple.com/itunes/download/
If you use Firefox instead of IE for the download (or vice versa), do you get a working installer? -
Do you get the "The installation package could not be opened. Verify that the package exists and that you can access it, or contact the vendor to verify that this a valid windows installer package" error?
download and install "right click take ownership"
http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-me nu-in-vista/
locate the adobe folder inside the programdata folder, mine was located at "C:\programdata\Adobe"
right click the adobe folder, and take ownership of the folder.
Don't know if this will fix other peoples problems, but it fixed mine.Hi
Try the following:
Uninstall iTunes and Quicktime
Reboot
in the task tray right click the quicktime icon and click exit.
navigate to the folder in program files and remove the quicktime directory and all its files.
Reboot.
Now try install iTunes and quicktime and it should work
Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
I am having trouble downloading Itune, icloud etc onto my Windows 7 PC and keep getting the following error message "this installation pack could not be opened, verify that the package exists and that you can access it"
tried downloading the quicktime installer, I get the same message with it too
-
While installing itunes i am getting error "this installation package could not be opened.verify that the package exists and that you can access it,or contact the appliacation vendor to verify that this is a valid windows installer package"
I'd first try downloading an installer from the Apple website using a different web browser:
http://www.apple.com/itunes/download/
If you use Firefox instead of IE for the download (or vice versa), do you get a working installer? -
installation package could not be opened verify that the package exists and that you can access it or contact the application vendor to verify that this is a valid Windows package installler what can i do ? help me
Hi,
Firstly make sure you save it to your hard disk, and then run setup from there.
If it doesn't help, you may also try to unregister Windows Installer, and then reregister Windows Installer and check if it helps. To do this, follow these steps:
1. Press Windows Key + R
2. In the "run" box, type "msiexec /unreg", and then press ENTER.
3. Press Windows Key + R
4. In the "run" box, type "msiexec /regserver", and then press ENTER.
Besides that, You could try to create a new user to download and install the application.
Karen Hu
TechNet Community Support -
How do you download i-tunes onto Windows XP when error message occurs, 'This application pack could not be opened. Verify that hte package exists and that you can access it, or contact the application vendor to verify that this is a valid window installation package'.
I wish I knew because i'm having the same problem. As soon as I find the answer I will post.
Maybe you are looking for
-
Time Machine and "might be a problem with your network"
Hi! My Power Mac is from 2008, and I'm in the middle of replacing my hard drive. Here's a summary of what I've gone through, including various trouble shooting... OK, the hard drive dies (all of which I wrote about in an earlier thread and, I think,
-
New for ABAP in functional upgrade from 4.6c to ECC6.0
i want to know the enhancements, additions and changes in the technical side/ABAP , when moved from 4.6c to ECC6.0 in case of FUNCTIONAL UPGRADE only.... our compny has done FUNCTIONAL UPGRADE so far..whats new for technical ppl like us apart from ch
-
Good news! Uploads for collections reenabled in PSM.
Well, for those institutions new to iTunes U, you can now upload content to Apple's servers to create collections! This option was removed in early 2009 forcing institutions to provide their own RSS and content hosting. Dear iTunes U Administrator,
-
How to make a Jtree expandable
Hi have a JTree and when I expand the tree and catch an exption hence not adding any children I would like the node that I have expanded to autamatically be collapsed, and ready for a future expand, as I have a situation were a node in the tree might
-
Qosmio G50-12q - Vista does not load after connecting external USB keyboard
I have acquired a keyboard enermax acrilux usb and have connected the taken keyboard to the qosmio g50 12q at the same one where an other keyboard was attacked usb and that it worked without problems. After to start the PC with keyboard eneramx conne