Having Issues with a Script Error Coding Text to speech wit growl , itunes

okay so earlier it was working fine. then i made it longer and more efficient. the point is upon a track change it should say the title and artist and then a growl notification should come up. Now I get some errors when I load it.
cant get name of <<class PtRk>> of application "iTunes"
that comes up twice...waits a few seconds then pops up again...
heres my code:
+global LastTrack+
+global CurrentTrack+
+global CurrentArtist+
+global CurrentAlbum+
+global playen+
+--the script to run when app starts+
+on run+
+ tell application "iTunes"+
+ if player state is playing then --if a song is playing set all variabls for T2S+
+ set playen to 1+
+ set CurrentTrack to the name of current track+
+ set LastTrack to CurrentTrack+
+ set CurrentArtist to the artist of current track+
+ set CurrentAlbum to the album of current track+
+ say "Now Playing: " & CurrentTrack & " by " & CurrentArtist+
+ --Put Growl Code here when Ready+
+ end if+
+ end tell+
+ set CurrentTrack to " "+
+ set LastTrack to " "+
+ set CurrentArtist to " "+
+ tell application "GrowlHelperApp"+
+ if playen is 1 then+
+ notify with name CurrentTrack title CurrentTrack description "Now Playing: " & CurrentTrack & " by " & CurrentArtist & " From " & CurrentAlbum+
+ end if+
+ end tell+
+end run+
+--the script to check for track changes+
+on idle+
+ tell application "iTunes" --update tracks+
+ set CurrentTrack to name of current track+
+ set CurrentArtist to artist of current track+
+ end tell+
+ --check to see if tracks match+
+ if CurrentTrack is not LastTrack then+
+ set LastTrack to CurrentTrack+
+ say "Now Playing: " & CurrentTrack & " by " & CurrentArtist+
+ tell application "GrowlHelperApp"+
+ if playen is 1 then+
+ notify with name CurrentTrack title CurrentTrack description "Now Playing: " & CurrentTrack & " by " & CurrentArtist & " From " & CurrentAlbum+
+ end if+
+ end tell+
+ end if+
+ return 1+
+end idle+
+--the code to run when the app closes+
+on quit+
+ tell application "iTunes" --closes iTunes when app is closed+
+ quit+
+ end tell+
+ tell application --makes sure this app closes too+
+ quit+
+ end tell+
+end quit+

When you save your script as an application, uncheck the Startup Screen option.
Several of your variables only get set within an if statement - if the condition doesn't evaluate to true, the enclosed statements aren't executed and your variable doesn't get set. You should set all of your globals to some default value (or use a property), since the global declaration doesn't set anything. Also, the application name parameter of the GrowlHelperApp notify command is not optional.
In the future, try not to use whatever put in all those "+" - they make pasting the script into an editor a bit of a pain.

Similar Messages

  • Anyone having issues with iphone 5 having issues with screen freezing and cant text

    Screen is freezing, when texting it deletes the characters automatically as well

    Would it matter if others were?
    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • I have a MacBook Pro...I am having issues with being able to highlight any text from any program...it works intermittently...and then not at all...any suggestions?

    I have a MacBook Pro...I am having issues with being able to highlight text from different programs. It works intermittenantly and then sometimes not at all. Went to where bought it today and tested one of their MacBook Pro's and it was working fine. Any suggestions?

    I have a MacBook Pro...I am having issues with being able to highlight text from different programs. It works intermittenantly and then sometimes not at all. Went to where bought it today and tested one of their MacBook Pro's and it was working fine. Any suggestions?

  • I'm having issues with my TV programmes artwork. It shows in iTunes but not on the Videos app.

    I'm having issues with my TV programmes artwork. The artwork shows in iTunes but not on the Videos app. Is anyone else having a similar issue?

    Your feed is at http://feeds.feedburner.com/blogspot/GPKwx
    The latest episode in it is 23 July: the later episodes haven't made it into the feed so either the connection to Feedburner has failed or there is something about the recent episodes which is causing them not to make it into the feed. It's not obvious from looking at the web page what this might be.

  • I am having issues with my web module on Lightroom 4 (Mac OS 10.9.5). "an unknown error occurred" while trying to upload to my FTP (no changes in my FTP). Bandaid fix was to export to local folder and upload via Filezilla. However, now that is no longer w

    I am having issues with my web module on Lightroom 4 (Mac OS 10.9.5). "an unknown error occurred" while trying to upload to my FTP (no changes in my FTP). Bandaid fix was to export to local folder and upload via Filezilla. However, now that is no longer working and although upload completes, the URL takes you to a "Forbidden - do not have permission to read this file" page. Lightroom is changing the permissions of each file to 000 instead of 644 for index files and 755 for all others. How can I change the permissions settings in Lightroom?

    I am having issues with my web module on Lightroom 4 (Mac OS 10.9.5). "an unknown error occurred" while trying to upload to my FTP (no changes in my FTP). Bandaid fix was to export to local folder and upload via Filezilla. However, now that is no longer working and although upload completes, the URL takes you to a "Forbidden - do not have permission to read this file" page. Lightroom is changing the permissions of each file to 000 instead of 644 for index files and 755 for all others. How can I change the permissions settings in Lightroom?

  • I'm having issues with text layers in photoshop. Text layers show it's there but not visible on the canvas.

    I'm having issues with text layers in photoshop. They aren't visible. I've checked font size, alignment, layer order and color. And the layer list shows that it's there. All seems well but I still can't see the text that I write. Need help trouble shooting. (I asked this question about a month ago but I got sidetracked and never circled back.) Thanks.

    Please refer to your original topic (Text Layer not Visible.) instead of posting a new topic.

  • Recently upgraded to a Canon Mark 3 and now having issues with my RAW files in Bridge and Photoshop. I am operating with CS4. Photoshop produces an error " Could not complete your request because photoshop does not recognize this type of file"

    Recently upgraded to a Canon Mark 3 and now having issues with my RAW files in Bridge and Photoshop. I have operating with CS4. Photoshop produces and error " Could not complete your request because photoshop does not recognize this type of file"

    Assuming you mean 5D Mark III, Photoshop CS4 cannot directly open raw files from your camera.
    Generally speaking, Adobe stopped updating older versions to be able to read raw files from newer cameras when they released a new major version of Photoshop. Photoshop CS4 is no longer receiving Camera Raw updates.
    You can double check this yourself:
    First you need to determine whether Adobe has released support for your new camera in your version of Photoshop. To do that, look at these two pages. You'll want to find out the earliest version of Camera Raw that can support your camera, then what version of Photoshop can run that version of Camera Raw.
    Camera Raw plug-in | Supported cameras
    Camera Raw-compatible Adobe applications
    If you find your camera is supported by your version of Photoshop, you need to download the latest update for Camera Raw. There's more information on how to do that here:
    Keeping Photoshop Up-To-Date
    If your version of Photoshop cannot support your camera, you can download and install the latest version of the free Adobe DNG Converter, which can take your raw files as input and put out DNG format files, which your version of Photoshop can open.
    Photoshop Help | Digital Negative (DNG)
    The DNG converter DOES work, but if you want maximal quality from your raw files (not to mention the convenience and ease of use of directly opening your raw files) you'll want the latest version of Photoshop. Adobe has made substantial improvements in raw conversion quality in recent years.
    -Noel

  • HT201210 The iPod "iPod" could not be restored. An unknown error occurred (1).This is my Ipod 32 GB, which is out of warranty and is 1G-A1213 and had gone kaput, after having issues with iTunes Software as it was not able to run Music on my IPod when conn

    The iPod "iPod" could not be restored. An unknown error occurred (1).This is my Ipod 32 GB, which is out of warranty and is 1G-A1213 and had gone kaput, after having issues with iTunes Software as it was not able to run Music on my IPod when connected.
    I have wasted my precious 2 days and nights and am lost all my hope...APPEAL TO ALL GEEKS TO RESOLVE MY ISSUE ON HUMANITARIAN GROUNDS ATLEAST WITH SOME VALID TIME OF YOURS.
    All mails can be sent to [email protected]
    Restore of Ipod back up is present...but is not getting restored due to some iTunes issue with playing my music files.It says restoring and extracts but failes in 1 min with the said error.

    Other users and reported error 1 but I have not seen a solution.
    Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar                          

  • I am using an early 2008 MacBook Pro and am having issues with it deleting text on its own (in word, emails, etc.). As I am typing it all of a sudden starts deleting and I can't stop it. What can I do?

    I am using an early 2008 MacBook Pro and am having issues with it deleting text on its own (in word, emails, etc.). As I am typing it all of a sudden starts deleting and I can't stop it. This happened once before and it was due to a buldging battery pressing on the track pad. I checked the battery and it appears to be fine. What can I do?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.  The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Hi.  I am having issues with copying files to my shared WB 2TB HDD connected to my airport extreme.  Comes up with error 50.  I am using a Macbook Pro to copy from so not sure what I am doing wrong.  Can someone help? thanks Rory

    Hi.  I am having issues with copying files to my shared WB 2TB HDD connected to my airport extreme.  Comes up with error 50.  I am using a Macbook Pro to copy from so not sure what I am doing wrong.  Can someone help? thanks Rory

    These links might provide some information that may be of help.
    http://support.apple.com/kb/TA20831
    https://discussions.apple.com/message/2035035?messageID=2035035
    I've encountered this error myself upon occasion.  If I remember correctly, it was a permissions/ownership issue with the some of the files I was copying.

  • I have been having issues with not receiving texts and voicemails daily, for a few months now. If I turn the phone completely off, when I turn it back on the messages will flood in from hours before. I can't be continually turning off my phone in case som

    I have been having issues with not receiving texts and voicemails daily, for a few months now. If I turn the phone completely off, when I turn it back on the messages will flood in from hours before. I can't be continually turning off my phone in case someone left me a message. How do I resolve this issue?

    Wifi:  my Cell phone will remember 10 wifi connections.  So delete any you don't use often and your home wifi and try to enter home wifi again.
    if it still won't connect to home wifi, call your internet provider for help.  You may need a newer router or different settings Or upgraded service.   Your phone seeks the best connection and will refuse lesser connections.
    last resort.  Backup the phone.  Do a full reset, then restore as new with the backup.
    if still not fixed, go back to apple and insist on repair or replacement.
    HOWEVER.   voicemail is not a wifi issue, it's a carrier function, which is why the SIM card is a suspect.

  • Is anyone having issues with Android version 4.3 for Galaxy III throwing in zeroes into text messages?

    I received a message on Christmas Eve that a free update was available for my Samsung Galaxy III.  I accepted the download and discovered some enhancements and fixes that I liked (finally, my voicemail icon displays the number of waiting voicemails that I have!) but I've noticed to glaring issues:
    1. When I send text messages that include numbers (a phone number for example) the OS throws in random zeroes into the number.  I have to usually touch the ENTER key and type the number on a new line and play around with it until the number stays in the message correctly.
    2. I've had occasional lockups using the media hub which, when I do a restart, causes my settings to revert to the default factory settings....kind of a pain.
    There may be other issues. 
    Q. Has anyone out there experienced this same thing?
    Q. Is Google going to fix these issues?  I noticed that on Christmas day a half dozen or so updates were made, but these to things still are a problem. 
    Q. Also, the Verizon Wireless Software Upgrade Assistant on my laptop insists that my version is not supported.  I can still access photos and music, but it's a little annoying...

        I'm sorry you're having issues with your phone after your update BigLouie1124. I recommend enabling safe mode to see if any of your apps are causing issues with your new software. If so, you can remove them. Here are the steps http://vz.to/1cD0kqT . If you continue to have issues the last step would be a factory reset to clear up some of your issues http://vz.to/JCsr33 . Please keep us posted and continue to clear unwanted message threads and clear your browser history periodically.
    KinquanaH_VZW
    Follow us on Twitter @vzwsupport

  • Anyone having issues with importing CR2 files into lightroom 5 as error message comes up saying "Some import operations were not performed". please advise what is a solution please

    Urgent please
    anyone having issues with importing CR2 files into lightroom 5 as error message comes up saying "Some import operations were not performed". please advise what is a solution please

    Sounds like the folder Write permissions issue described here with a solution:
    "Some import operations were not performed" from camera import

  • Having issue with update Adobe 11.0.06.  Error 1603.

    Having issue with update Adobe 11.0.06.  Error 1603.

    You should have gotten this information with the error: "Shut down Microsoft Office and all web browsers. Then, in Acrobat or Reader, choose Help > Check for Updates. See also Error 1603 | Install | CS3, CS4 products." Also, be sure you log in as the administrator and disable anti-virus.

  • I have been having issues with my iCloud email on my iMac. For some time period, everyday, it won't reload and often shows symbols instead of letters for the text. Any ideas how to solve?

    I have been having issues with my iCloud email on my iMac. For some time period, everyday, it won't reload and often shows symbols instead of letters for the text. Any ideas how to solve?

    All I can suggest is that you open that file on the MBA and save it as a new file, then see if you can open the new one on the iMac.

Maybe you are looking for

  • Apparent XP SP3 incompatibility with PC Suite 6.86...

    On my Windows XP with SP3 I have installed PC Suite 6.86.9.3. Since I have upgraded by SP2 to SP3, it appears that I cannot use PC Suite to connect to my NOKIA 6230. The get connected wizard states that there is no connection type, although my Blueto

  • Creating a  calculated total field in BIP

    Hi, Hope this isn't a stupid question. I have have a SQL data model in BIP (BI Publisher) which displays a percentage of the number of withdrawn students at our university against the total number of students. The report is broken down by department.

  • FM of BAPI for the transactions VV12 , VV22 and VV32

    Hi All, My requirement is to update the condition records for different output types using the transactions VV12,VV22 and VV32. Is there any FM or BAPI to do that. I have searched but could not get any.

  • Organizing my library

    Hi! How do I make compilation albums (e.g. Trojan-boxes) with different artists on each track to show up togeather as one album i my music library? And how do I make several albums by the same artist to show cronologically instead of aphabetically?  

  • Tablespace autoextend on multiple datafiles

    There is a tablespace with 3 data files, one of them having AUTOEXTEND option ON. I am trying to understand why space is not allocated on datafile with AUTOEXEND option ON. Thanks in advance..