If typename question

Sorry if this is a silly question, but can someone let me know why the if/else code below does not work?

The script is supposed to determine which of the two selected objects is a block of text and give it the variable 'text '.

var docRef = app.activeDocument;
if (docRef.selection[0].typename = "TextFrame"){
  var text = docRef.selection[0];
  var other = docRef.selection[1];
} else {
  var text = docRef.selection[1];
  var other = docRef.selection[0];
};

unique equal (=) - assignment.

Double equal (==) - comparison

Tags: Illustrator

Similar Questions

  • Several questions, the system crashes, corrupted notepad.exe.mui, SFC scan errors, cant play Battlefield 4 game

    Original title: I need help - corrupt notepad.exe.mui

    Hi all! This is my first time around these parts, so forgive me if I make a mistake and prepare for a long story.

    Quick information on my computer:

    Windows 7 64 bit

    AMD Radeon HD 7950

    8 GB RAM

    Intel i5 4670 k 3.40 GHz Quad Core

    Recently I bought Battlefield 4 for PC. I have loaded on my computer with ease but quickly came across a problem when I tried to play the game. My GPU drivers were apparently outdated and he gave me the choice of either a. cancellation of the launch, or (B) try to play anyway. Looking forward, I tried to launch anyway. No dice, the game freezes immediately and I can not play. At a time of the option.

    After traveling around for a bit, I discovered that my drivers were, in fact, to date and should update. So I downloaded the latest drivers, "AMD Catalyst Omega", and you click install (note that I have not manually uninstall previous drivers, so I don't know if it has really done anything). After that, he went through the whole process, do things (I suppose) as uninstall the old drivers and install the new. After it was over, I was able to boot successfully in the field of battle 4 and was able to play both the campaign and multiplayer without fault at 60 fps oh high heat. (Great game BTW, recommend to all who love FPS).

    Well, after a few hours, I decided to call it a night. After closing, I noticed that the bar at the bottom of my screen flickered from top down in very quickly. Naturally, I found it quite strange and decided to shut down my computer (thinking at the time, that I should probably do that as soon as the new drivers were installed - it was the result of not doing).

    The next day, I woke up wanting to start playing Battlefield 4. But, much to my dismay, my computer froze as he was loading the desktop. Now, it was nothing new for me, I had a lot of computer problems in the past, I can fix it this one as well. My first thought was just reboot and see if that will change anything. Unfortunately, he did nothing. He froze in the exact same task as he had before. It started to scare me a little. Previously, during an automatic update of windows, is the same thing. He has downloaded everything installed fine, very good, but when my computer restarted and tried to load to the top of my desk, my computer would freeze. Finally, I had to use system restore and restored my computer to a point before Windows automatically updated. After that, I disabled the automatic updates and him haven't touched since (Yes, my computer is has not been updated for months and months. I think that I stopped the download of updates at the time an update of Windows technically dirtied by malicious software that would crash the computers).

    I noticed the problem how similar I saw now was the question I had before with the updates of Windows. So I took to the system restore and wala, my computer was still running reliable update of the driver pre - GPUS. Now, I was still burning for some 4 battlefield. Whether I went through the same process as before, it would result in the same outcome, I did a little research. It turns out that someone had a similar problem for me. Their solution was to ensure that information on previous drivers had gone to 100%, and it said to use two programs called DriverFusion and CCleaner, well, I followed the instructions of the solution: uninstall the drivers - with DriverFusion - restart good computer - installation of new drivers - to go, but once again, no dice. A frozen at the exact same task as it did before.

    Now completely annoyed at all this, I'll be back and system restore to the point that I just had previously. Except that this time it did not work. Were no longer my system restore bringing back me to the settings of the computer that worked, it would freeze (and sometimes a blue screen), every time I tried from the desktop. Sometimes, I could get a few minutes before it would freeze, other times that I do not see my office. And it doesn't matter what time I have to put in place. Sometimes, the system restore would work, sometimes it wouldn't, but in two results, it would freeze at the office.

    Panic is now being that my computer does not seem to work at all. I can still run without danger made (thank God for that), but normal Windows is just the gel. As my panic slowly transforms into a will, I turn to google to see if someone is having my exact problem (Note: everything I do on my computer is in safe mode, and any internet research I do is on my smart phone). Finally, I came across a page saying: I need to use the command "sfc/scannow" and this should solve my problems. If I use the command, and he said that he detected problems, but has been unable to fix. He also said that he saved the information on the analysis in a journal, a journal that I could access. So I do! The entrance to the EXACT newspaper that speakes of the error is.

    2014 12-26 11:46:03, info CSI 00000321 [SR] verification complete
    2014-12-26 11:46:03, info CSI 00000322 [SR] repair of components 1
    2014-12-26 11:46:03, Info CSI 00000323 [SR] beginning verify and repair
    2014-12-26 11:46:03, info CSI 00000324 Member \SystemRoot\WinSxS\x86_microsoft-windows-notepad.resources_31bf3856ad364e35_6.1.7600.16385_en-us_1dbc2e35304db501\notepad.exe.mui file hashes are not actual file [l:30 {15}] "notepad.exe.mui": "
    Found: {l:32 b:tfmxBgEeHYSqU0nOhrdrRtqL98a1xYC32if7l90WiOg =} expected: {l:32 b:o2tSWlTNsLpfCP + I3R4E0Dz7Z4HwNtMMweSbWEZCHTw =}
    "2014 12-26 11:46:03, info CSI 00000325 [SR] cannot repair the military record [l:30 {15}]"notepad.exe.mui"Microsoft-Windows - notepad.Resources, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture = [l:10 {5}] 'en-US', VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch"
    2014-12-26 11:46:03, info CSI 00000326 Member \SystemRoot\WinSxS\x86_microsoft-windows-notepad.resources_31bf3856ad364e35_6.1.7600.16385_en-us_1dbc2e35304db501\notepad.exe.mui file hashes are not actual file [l:30 {15}] "notepad.exe.mui": "
    Found: {l:32 b:tfmxBgEeHYSqU0nOhrdrRtqL98a1xYC32if7l90WiOg =} expected: {l:32 b:o2tSWlTNsLpfCP + I3R4E0Dz7Z4HwNtMMweSbWEZCHTw =}
    "2014 12-26 11:46:03, info CSI 00000327 [SR] cannot repair the military record [l:30 {15}]"notepad.exe.mui"Microsoft-Windows - notepad.Resources, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture = [l:10 {5}] 'en-US', VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, type neutral, TypeName neutral, neutral to the public key in the store, hash mismatch"
    "2014-12-26 11:46:03, info CSI 00000328 [SR] this component was referenced by [l:266{133}]"Microsoft-Windows-WindowsFoundation-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514.Windows Foundation Language Pack.
    2014-12-26 11:46:03, Info CSI 00000329 repair results created:

    "(Note that I stressed and bolded what I assumed important information, and it's the only mistake he came with).

    The only thing that I have noticed time and time again is the reference to a file called "notepad.exe.mui". Curious, I investigated more research and found that the file may be damaged and even deleted without knowing you, even by simple virus. Now, I know that I had a virus on my computer when the update of the driver. Try to add the pieces together, I thought that maybe this virus was the reason that this file has been going crazy and maybe even corrupt the file itself. Later in the article to tell me about the "sfc/scannow" command, he said that if it is available, I can get the file from another computer that is the same as mine. So, I borrowed laptop from my brother, running Windows 7 64-bit, publish the file on his computer, put it on a flash drive, plug it into my computer, move my old notepad.exe.mui on the desktop (Yes, I still have the original) and replace it with my brothers.

    Now for the part I did not yet understand. Replacing the file met with some success. After the first restart, my computer blue armored, but after the second reboot, it was in normal operation once again! Pre - GPUS normal update driver, that is. But nevertheless reliable running. Careful, I decided to run my anti-virus, Avast! and see if something happens. Of course, on a quick scan, he found a "malicious" file and I "moved it to the chest. To be doubly sure that all is well, I decide to run a scan at startup and have it automatically move all the malicious files, he finds 'trunk' or whatever he calls. I allow this to run at night and wake up to find that my computer still works reliably.

    Well, not wanting to take another chance, I run "sfc/scannow" once, just to see the error is still there. Nothing has changed. Sad it's not yet over, I again to replace the "notepad.exe.mui" in my computer this time that I deleted it, with one always on the flash drive. No blue screen on reboot, but I decide to again run the command "sfc/scannow". Once again, same error.

    At this point, I have no freaking idea what to do. My last two options are to use my disc and 'repair installation' and see if it makes something or just completely re - install Windows, which without a doubt, I don't want to do. Now, I can still play my old games very well. It's just I can't update Windows or drivers, fear, it may have a very dangerous effect.

    Anyone with any information which could be of use, please do not be afraid to say something. I come to this community as my last resort. Any information will be helpful, and I will watch this post like a bird of prey. Thank you for reading all of this. I'm sure it was quite the trip.

    Hello Logan,.

    Thanks for your reply, appreciate the time taken by us keep up to date on the State of the question.

    To proceed with method 2 and then Fixit and manual steps to reset the Windows Update components in method 3 and check running SFC analyzing once more.

    If the problem persists even after trying the method 2 and 3 the method successfully, you can try to repair (MBR Master Boot record), boot sector and Boot Configuration data via Bootrec tool in the article below.

    Use Bootrec.exe in the WINRE to troubleshoot startup problems.

    http://support.Microsoft.com/kb/927392

    Just reply with the results. We will be happy to help you.

  • iOS 10 people record problem/question

    Hello

    I have a couple of "faces" in the issue of people who are coming in white, but acknowledged same 'face' of many times.  Is anyway to update it for photo comes actually?  At a few faces, I don't know that facial recognition found since it is coming from white.

    Hi JohnP007,

    Congratulations on your iPhone 7 more running iOS 10! I understand that some of your faces in the album of people pull up as a draft and you want to refresh. You can try to use the steps below to fix the faces on the thumbnails in albums.

    Difficulty faces and names mixed-up

    If you notice that there is a photo of someone in a collection that is poorly identified, you can remove it.

    1. Tap the person you want to remove in the album of people > select.
    2. Type Show done face to emphasize his face in every photo.
    3. Press on each photo that is not the person.
    4. Type > not this person.

    Hide people

    You can hide the people or groups that you don't want in your album of people.

    1. Open the album people and press Select.
    2. Touch the people you don't want to see.
    3. Click Hide.

    If you want to see the people that you have hidden, press on show hidden people.

    People in the Photos on your iPhone, iPad or iPod touch

    This should be corrected without delay faces. Please use the Apple Support communities to post your question. Good day.

  • Questions - and answers forgotten

    How to get my 'secret' answers to the questions that I have noted the way back when?

    If you forgot the answers to your questions of security of Apple ID - Apple Support

  • I can't reset the security questions. We received notice as below:

    Hello world

    I can't reset the security questions. We received notice as below:

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    Please help me as soon as possible! Thank you very much.

    Hello

    You will need to contact the Apple Support.

    The information is available here:

    Contact Apple for assistance with the security of the Apple ID - Apple Support accounts

    (I'm afraid that no one here can solve the problem for you - this is a user-based community).

  • Question of cloning for SSD upgrade on 12 Macbook Pro

    Previously, I did an upgrade to SSD on my Macbook Air to 2012 according to the instructions of JetDrive transcend. Basically connection via USB 3 and using Mac OS X to clear (and format) disc utilities new SSD, then restore again SSD and then remove the original 128 GB SSD and insert the new 480 GB SSD.  For about a month and so far without problem.

    Now I'm trying to 2012 Macbook upgrade my Pro partner (on 10.11.6).  I got a Crucial SSD MX300 to replace his HARD drive.  Crucial comes with (or recommend) Acronis software.  And a lot of the messages of the forum recommend Carbon Copy Clone.

    My question is if I can use the same method for the cloning of the HD as my Macbook Air (just restore disk of Mac OS X utilities)?  This time, I'm upgrading HARD drive and I don't know if something is different.  At the same time, if I got lucky the first time, I don't not ruin Macbook Pro my spouse this time.

    Thank you.

    Yes, you can use disk utility to clone your MBP wives, but unlike CCC, it will not clone the recovery and Partition.

  • Question about resolution movie downloads

    If I buy a movie at a certain resolution (780p for example), but I want more later re - download at a higher or lower resolution (SD or 1080 p), can I do so and how?

    Same question perhaps for music. Some of my songs have been bought before the latest Apple codecs.

    Any help is appreciated!

    THX!

    Once you have made a purchase on the iTunes store, you will see your purchased items in the menu under accounts bar > bought. You can simply select the item purchased and re-upload.

    With regard to the resolution of the film for films that are offered, and you select the resolution, you can download it again and select a different resolution. For movies that are available as separate download to SD, 780, or 1080 points, you would be limited to the original resolution you selected.

  • Why I can't ask questions.

    I just have a question.  I said that I can't ask questions.

    Do exactly what you did to make this post, but your question in there instead.

  • Cannot reset the Security Questions

    Hello my dear

    -J' forgot my account security questions, but I remember password

    And I'm changing my Security Questions, but show me this sentence

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    -I want to solve this problem as soon as possible if permitted

    You should contact the account of Apple security team. To join, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (145081)

  • Bootcamp Windows 10 question

    Hi all

    Stumbled upon a problem, try to install Windows 10 an end 2014 27' iMac w/retina education runs Yosemite 10.10.5. Bootcamp is V 5.1.4. 32 GB, 3.5 ghz Intel I5. Disk of 1 TB of Fusion. Before you try this, I read the guide of Bootcamp to install windows, but also a number of other tutorials and forum messages about potential problems. This research, I learned that for EDU edition you must change the name of the file from Win10_1607_Education_English_x64.iso to Win10_1607_English_x64.iso. Apparently to have the former name of the file may cause OS X to not recognize the ISO. That fact I started Bootcamp, waited while the software downloaded and created a bootable USB key and partitioned my drive giving Windows 70 GB of space. After that, I got the message that my computer is restarts. Upon restarting, I got the black screen with the blue Windows logo and a spinning loading animation. After a few minutes, a blue screen with a message "Windows has encountered and error with computer and must restart," or something similar. He was pretty quick, so maybe it's not word for Word, but it was not a helpful post in terms of saying something specific. When the computer reboots, I am sent directly to OS X, though a bit slower than normal. I tried to restart with the flash drive to see if the installer would start up, no dice. Try now the Option key at startup, the flash player is not available. Went into my settings to see if I could change my startup on Win disk install USB, no luck it no more.

    Now for the question: How can I get the Windows installation again? What I have to start the process, and if so, what should I use Bootcamp to delete the partition that was created? I have re-run Bootcamp and the only option that is checked is the partition and start and install/uninstall windows and delete the partition.

    Thanks for the help.

    Perform the following two procedures

    Reset the management system (SCM) controller on your Mac - Apple Support

    How to reset the NVRAM on your Mac - Apple Support

    If you use a USB drive, not a USB flash drive, you will have problems. It is recommended to use a 8-16 GB USB2 flash drive.

    If the installation program is located on a USB Flash drive, stop your Mac, connect the USB key, restart and hold down the alt/option key and select the Windows icon in the USB port. This installs Windows in BIOS mode. If you click the start EFI icon, it will install using the EFI mode (faster). You may need to change the partition from MBR to GPT using GPT Fdisk.

  • Yahoo account question

    Yes, I understand these are the Apple support forums, but I don't know where else to ask this question and I thought some of you would have the answer to this question.

    I deleted my Yahoo account last week, but I've heard that the 500 million Yahoo accounts were hacked in 2014. I made my account in 2015. Im sure it is hacked since I made my account a year after the supposed hack, but if my account has been hacked and I deleted which would be safe?

    If your account did not exist in 2014, then it is has not been hacked. Removal of the guarantees it will not be new since there was more pirate. Normally, at least the hackers got access to more information in the narrative, as credit card numbers, change your Yahoo password would have sufficed.

  • Text backup question / deleted

    I accidentally deleted one of my iPhone SMS 6 Plus.  They always show on my iMac and iPad but I fear when an AutoSave occurs, it will back up the iPhone and remove them to two other devices. What will happen?  I use iCloud if that makes a difference.

    Hi melissahh625,

    I understand that you have questions about your messages deleted on different devices. I know that it is important to have a handle on your data, so I'm happy to help you.

    When you receive messages, they are stored on different devices. This means that when you delete a device they will not be deleted on the other. This is the case, even if one of your backup devices to iCloud that these backups are specific to devices, as well.

    Thank you for using communities Support from Apple. See you soon!

  • Question

    Look I went to a new site called collabmix.com, and in any case I tried one of my samples Logic Pro download for someone else to try to collaborate with and help me through my song production. In any case when I go to download, the site accepts only gif, jpg, jpeg, or png. How to record my song pro logic and make a jpeg or jpg file? Please someone... IM new to this site and maybe someone asked this already so I'm sorry if this is a redundant question. Anyway ill be looking for a response from the community here. Thank you

    GIF, jpg, jpeg, or png are all formats of image, audio files or formats of logic.

    I got a peek on the site but I'm not register. I'm going to guess and say you are in the wrong place to download your song.

  • Great list of 'How To' Questions

    I am a newbie to iTunes learn the tricks of the trade, and I learned a lot of ed2345, who led me to still more questions:

    1. a few songs that I managed to acquire have nothing in the kind column. So that this information will be available on the impressions of my playlists, is there a way I can key this information in me?

    2. I was unhappy to see small numbers began to appear to the left of the names of my songs, and I'm sure that must have been added when I said to organize my library. Is there a way I can get rid of them now?

    3 re the small icons 'cloud' next to my name of the song: one with the line through it saying "duplicate". If I delete one of them, I will always have it on my PC? (This whole business of some things being only in iCloud I do not understand yet.)

    4. a few other icons 'cloud' have an exclamation in them, which means that it is not able to be downloaded to iCloud due to an error. In all cases, there are an extra copy of the file in my library. Is this the reason why it didn't download?

    5. I'm fighting a lot to try to understand how certain things can be on iCloud and others do not. I mainly paid my $25 to Match service so I could keep transfer my playlists (and songs) to other computers on my LAN House (at this point, I don't have an iPad, iPhone or etc..). Now, I noticed that in the preferences that I can share my share my library on my network, which is an Ethernet wired with 4 PC and a Mac. If I check that box library share will I still game?

    6. on the other hand, if I want to share a playlist with a friend who has iTunes, I would want to use game for this?

    7. Finally, I know especially with PCs; I just bought the Mac this month. I find it there any equivalent to the files of Microsoft Explorer, except on an external hard drive, I connected to it. Specifically, I can't find the directory structure accessed by iTunes - a feature that could be very useful for me, for example in the collection in a single folder the files of one kind or a particular type (for example MP3). We're not supposed to do that?

    I hope that the answers to these questions will be useful to others, too.

    Thank you.

    1. You can use Get Info and enter the relevant information yourself. Select the album or the titles you want to edit and press CMD + I (Mac) or Ctrl + I (Windows).
    2. You see these numbers in a separate column in iTunes or in the name column, or in the Finder? ITunes is generally tracks numbers which are useful for playback of tracks in an album in the correct order. In some cases where the unmarked files are imported into iTunes, for example those in .wav format, numbers in the file name will become the name of the track in iTunes and other properties such as artist or album will be missing.
    3. See on iCloud library icons and status - Apple Support. If your support is not entirely possible that different versions of the same track are treated as duplicates so that they should not be. If you have duplicates real then they should be cleaned.
    4. Once again see on iCloud library icons and status - Apple Support. This indicates an error with a load of attempt.
    5. iTunes game is a great service if you want to replace any old purchases DRM with DRM 256 k new releases, like on the continuous access go to the entire library of your iOS devices or keep libraries iTunes on two remote sites in sync without manually copying files to and from portable hard drives. If the goal is simply to move a library from one computer to another, it's usually better achieved by copying the folder iTunes set to a portable player and then copying it in the new computer. A network share can also be used.
    6. You can't easily share a playlist with a friend. Normally iTunes playlists are sorted in lists of references to tracks in your library. They work only import if all the tracks already exist in the same paths that stored in the list. Having said that this is something which can be done in a certain measure with music from Apple, because each user has access to a common library of streaming content from the iTunes Store and their rights to listen to it.
    7. Equivalent of the Mac of the Explorer Windows is called Finder. It should be pretty easy to find. Macs are more lenient if you move the files in the same volume, but usually don't. Let iTunes manage physical files on disk when you store the logical organisation within the library. See make a split portable library for images of the typical presentation of the iTunes library. The images come from Windows, but the General layout on a Mac is the same.

    TT2

  • Step 2 verification question

    I have recently implemented stage 2 verification for my Apple ID. I get a text Message whenever I connect to my Apple account. The other day, I created iCloud and now when I connect to my Apple account on my mac I get the code on my mac. Is this normal?

    For Apple ID - Apple Support two-factor authentication

    Frequently asked questions about the audit in two steps for Apple ID - Apple Support

Maybe you are looking for