Problem with AppleScript inside automator app

Creating an Automator Application that I want to run by itself (hence application instead of workflow). The firs thing asks for a folder, then it goes to run the following applescript, followed by some more automator applications and another applescript. Everything works perfectly when i run it inside automator, but when I run it as a standalone app it fails on the first applescript. Here it is:
on run {input, parameters}
     set aFolder to input
     tell application "Finder"
          set folderName to name of folder aFolder
     end tell
     set value of variable "SeasonNumber" of front workflow to "0" & ((characters -1 thru -1 of folderName) as string)
     return input
end run
I'm thinking it has something to do with the fact that I am setting a value to an automator variable (SeasonNumber) but not sure. If so, I have attached the second applescript in case something needs to be fixed in both. Thanks in advance.
on run {input, parameters}
set whichFile to input
set epNum to 1
set sNumber to get value of variable "SeasonNumber" of front workflow
repeat with aFile in whichFile
     if epNum < 10 then
          set ifZero to "0"
     else set ifZero to ""
     end if
     set textBox to "What is episode title for S" & (sNumber as string) & "E" & epNum & "?"
     tell application "Finder"
          set filename to name of aFile
          set nameEnding to ((characters -4 thru -1 of filename) as string)
          display dialog textBox default answer ""
          set text_returned to text returned of result
          set name of aFile to "S" & (sNumber as string) & "E" & (ifZero as string) & (epNum as string) & " - " & text_returned & nameEnding                    
     end tell
set epNum to epNum + 1
end repeat
return input
end run

Awesome. Figured since now it is just a ask for finder items and run applescript, might as well convert the whole thing to applescript and save as application in script editor. So the first thing is ask for finder items, which I have as:
set a     set aFolder to (choose folder with prompt "Select Season Folder" default location "afp://DiskStation._afpovertcp._tcp.local/Entertainment/TV Shows") as text
But I keep getting an error saying that it can't make it into type alias. What is the correct way of changing the default location to this? It is a Folder called TV Shows that is on my NAS, connected through afp. Let me know as I have tried putting POSIX file, I have tried Network/DiskStation/Entertainment/TV Shows, among other things. DiskStation is the server and Entertainment is a partition. Thanks in advance.

Similar Messages

  • I have an ipad mini 1st gen 64 gb (wifi only) and i have problem with some of my apps. These apps have lags when you play with them for a few seconds the apps are having lags are call of duty strike team, gta San Andreas and nfs most wanted.pleas help me

    I have an ipad mini 1st gen 64 gb (wifi only) and i have problem with some of my apps. These apps have lags when you play with them for a few seconds the apps are having lags are call of duty strike team, gta San Andreas and nfs most wanted.pleas help me

    I'm going to guess videos buffer for a while also...
    Two possibilities, one is you should close apps on the iPad, the other is your internet speed is not able to handle the demands of a high speed device.
    To close apps:   Double click home button, swipe up to close the apps.
    To solve internet problem, contact your provider.   Basic internet is not enough for video games and movies.   Your router may be old and slow.

  • HT5137 I made a purchase with my debit card on The Simpson Tapped out game, And now my game won't open. It just kicks me out every time I click on it. How do I fix this problem with out deleting my app?

    I made a purchase with my debit card on The Simpson Tapped out game, And now my game won't open. It just kicks me out every time I click on it. How do I fix this problem with out deleting my app?

    Personally, I would never use a debit card online, for security reasons.  If your card gets hacked its your money that is stolen.  At least with a credit card it is the card providers money that is stolen.
    Anyway,  I would delete the app and re-install.  If you paid for the app in the first place you will be able to re-install free of charge.  Also, the app should allow the in-app purchase to happen again as it should recognise that you have already purchased it previously.
    Finally, it might be that the 3G doesnt have as much ram as more recent models of iphone and you may have applications running in the background that are preventing the app to function with the in-app purchase unless you shut down any apps eating all you memory that are running in the background.  Shut-down these apps (and the simpson tap out app) by exiting to your home screen and double-tapping the home button to show what apps are running in the background.  press and hold any of the open apps until it starts shaking.  close all the apps down.  exit then re-launch the app.
    good luck.

  • Hello I have a problem with a Wifi Survey app, this app is from Access Agility, however this app was working fine, but without advise stop of working, I tried to open again, but app be close after few seconds.

    Hello I have a problem with a Wifi Survey app, this app is from Access Agility, however this app was working fine, but without advise stop of working, I tried to open again, but app be close after few seconds. Every time that I tried to open it, in diagnostic and use create some files, in special one named LatestCrash-WifiSurvey.plist, this one generate an incident identifier E73B0164-CDFA-4E9E-839E-A0C021BD17A2, but this incident identifier change every time that I tried to open, the last incident identifier is: DE600EB3-AB57-4C33-8DE8-71F6788A7441.
    After of it, I checked that the app had a new version available for downloading, I took a backup of my ipad and then upgrade this app, but is the same problem, all I want is to save the projects I had in this app, I´m afraid that if I delete this app and re-install it, probably I loss my projects.
    Thanks for your help indicating how I can save my projects and see them for example in an iphone for assurance that data is not lost.
    Something that called my attention is part of the log that shows a big CPU processing, but the strange thing is I killed all applications.
    Incident Identifier: E73B0164-CDFA-4E9E-839E-A0C021BD17A2
    CrashReporter Key:   ed0ca1405ce83d4f80cb3cce063d7248d7b76e91
    Hardware Model:      iPad2,5
    Process:         WifiSurvey [139]
    Path:            /var/mobile/Applications/1BEEE35A-85FC-4BE4-B62A-39A930CB3CE2/WifiSurvey.app/Wi fiSurvey
    Identifier:      WifiSurvey
    Version:         ??? (???)
    Code Type:       ARM (Native)
    Parent Process:  launchd [1]
    Date/Time:       2013-08-08 19:01:13.476 -0500
    OS Version:      iOS 6.1.3 (10B329)
    Report Version:  104
    Exception Type:  00000020
    Exception Codes: 0x000000008badf00d
    Highlighted Thread:  0
    Application Specific Information:
    com.accessagility.wifisurvey failed to launch in time
    Elapsed total CPU time (seconds): 20.990 (user 20.990, system 0.000), 52% CPU
    Elapsed application CPU time (seconds): 19.954, 50% CPU

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I c

    I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I can do to repair it

    Please authorize ADE 3 with same credentials that you used with older version of ADE

  • Sorry but i dont speak a good english, i have a problem with my ipod the apps Twitter,Facebook not open but messenger(fb) music yes,I can do to make them work?

    helpme please,sorry but i dont speak a good english, i have a problem with my ipod the apps Twitter,Facebook not open but messenger(fb) music yes,I can do to make them work?

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Restore from backup. See:
    iOS: How to back up
    Restore to factory settings/new iPod

  • Hai Matt  I have a problem with download a new app. While I bought iphone5, I take iphone to shopkeeper for download some app and videos that he used his Apple ID . That's t problem now.. Not all the time his ID is appearing but some times hi

    Hai Matt
    I have a problem with download a new app. While I bought iphone5, I take iphone to shopkeeper for download some app and videos that he used his Apple ID . That's t problem now.. Not all the time his ID is appearing but some times his Apple ID is appearing that time I can't download app, videos, songs.. So please guide me to remove that ID or how to solve that..
    Regards
    Babu

    Check Settings/iTunes and AppStore/AppleID and make sure that your AppleID is filled in. If not , sign out and sign in with the correct info.
    To make sure that no other apps or videos are on your device than the one you bought, set it up as new device, explained here: How to back up your data and set up as a new device
    Content that is not bought with your ID can't be used on your phone, that's why his ID and password is asked when you try to use those apps downloaded in the store.

  • Problems with AppleScript Editor.app in Snow Leopard

    I have been using the Satimage.osax scripting addition with Script Editor.app in Leopard without problem. After I upgraded to Snow Leopard, the Script Editor.app was replaced by AppleScript Editor.app in which the following one-line script
    change "," into "." in "3,1416"
    compiles without error but it gives an error when I try to run it: as if AppleScript Editor.app was not able to load the ScriptingAdditions (despite the fact that it correctly shows the dictionary for the Satimage.osax scripting addition).
    When I decided to get back the old "Script Editor.app" and use it in Snow Leopard to run the above script, I found... no error! It ran correctly.
    Anybody observed similar problems with the AppleScript Editor.app and ScriptingAdditions?
    Can anybody offer a solution other than trash the new AppleScript Editor.app and stick to the old Script Editor.app?

    Post to the AppleScript forum under OS X Technologies and send a message to Satimage.

  • Problems with Lync integration in App-V Package for Office 365 ProPlus

    We have problems with setting Lync 2013 to automatic start after Windows start with Office 365 ProPlus App-V Package made by Office Deployment Tool. We use latest version for both (ODT and download package) at Windows 7 Enterprise 64 bit.
    We have done this for Lync 2010 and also for Lync 2013 (MSI installations) and it works correctly.
    User can choose to start Lync automatically, but this settings is ignored and in virtual registry is set wrong. We look for possible ways to set this by GPO (in ADMX is not this option available) by inserting in virtual registry with Package ID and user
    SID in registry path.

    Usually setting apps to auto start sets a registry key under HKCU\Software\Microsoft\Windows\CurrentVersion\Run, but since this registry key is inside the virtual environment, Windows does not read it at logon.
    The workaround is to either set this key in the native registry (perhaps by an App-V script), or easier still, just copy the shortcut to the Start Menu\Programs\Startup folder. Since you can't really modify Office 2013 packages with the sequencer, you'd
    have to add this shortcut by modifying the deployment config file.
    Dan Gough - UK App-V MVP
    Blog: packageology.com
    Twitter: @packageologist
    LinkedIn

  • Massive problems with BlackBerry ID/BIS/App World after provider switch

    Hi,
    I recently switched providers and got a bunch of different problems since then. The old provider deleted my BIS account, which of course also disabled the push mail functionality on my BlackBerry. I tried to register a new account with my new provider, which didn't work for unknown reasons. After several calls to my new providers hotline they finally suggested to reset my BB to factory default and try registering again. After the reset, pretty much the very first thing I was prompted with was the BlackBerry ID login. I used my old login and right after that, in the mail setup dialog, got the error again that there's a problem with the applications server and I can't create or login with a BIS account. I wondered how it could know my BIS account, so I did another factory reset and this time created a new BlackBerry ID. This time everything went fine, the new BIS account was created within seconds and a test mail was delivery to my device immediately. I was pretty happy, until I noticed that I couldn't restore all my data from BlackBerry Protect because of the new BlackBerry ID. Also all my apps were gone from App World, which is linked to the BlackBerry ID as well. So what I'm wondering now is
    1) why is my BIS account linked to my BlackBerry ID,
    2) how can I unlink it and use my new BIS account with my old BlackBerry ID and
    3) if I can't, how do I get my BlackBerry Protect data and App World purchases back?
    I'd prefer having the first two questions answered, because I'm sure switching providers and therefore BIS accounts is a pretty common thing, so there must be some do this right, right? I hope there's some way to fix it, because if I have to choose between "keep apps but live without email" and "have push mail and repurchase all apps", I'd probably choose Android instead.
    PS: I also tried to find a way to contact RIM, so they could somehow unlink my old BIS account from my BlackBerry ID, but there's really not such a thing as "BlackBerry Support". The only thing I found was a button on the App World page for refunds etc, but even there the link was dead.
    Solved!
    Go to Solution.

    I have no insight into if the carrier you are using should or should not be on that list. All I have is what you reported (that they can't escalate) coupled with that list...which leads me to conclude that they are not a fully authorized BB carrier. They would seem to be somehow affiliated though, since indeed you were able to set up BIS services with them. But, I do know of other carriers that are not listed...and as I recall they are something of a sub to a fully authorized carrier, and somehow provide services through that other carrier (who has the formal contract with RIM). I'm really guessing here as I have absolutely no insight into anything authoritative on this matter.
    Regarding the contractually required formal support model...it works like this. You contract with a carrier for services. As part of that contract, you agree to a support model, and that support model starts with them (normally...as I said earlier, some models in some regions use service centers instead...you must review your specific documentation to know what the actual support model is for your specific contract). Consequently, all service-related support needs that you have must start with your carrier (or service center)...contractually, you are not allowed to bypass them and seek formal help direct from RIM. Hence the cost of the direct-to-RIM Incident Support system...you are electing to bypass your contract, and doing so is not "free". (There are also contracts between the carriers and RIM which further require that the carriers provide that front-line support to their end users, and provide the carriers with certain controls over some things that the end users are allowed access to...but that's just in support of the contract between you and your carrier.)
    Now, in some situations (yours included, sadly), it gets even more complex. What I said above applies solely to the services you receive on your BB (voice, data, email, etc.). But, that has nothing to do with support for the device itself (e.g., warranty)...that's a separate contract, and was executed at the time of purchase between you and your place of purchase. That place of purchase (or assigned service center) is responsible for all support for the device itself (warranty, etc.). Again, this servicing (e.g., warranty) is delegated from RIM to the resellers...RIM provides zero front line support for devices, services, etc...none...all of that is contractually delegated down from RIM to various other entities (the carriers, resellers, service centers, etc.). RIM provides warranty and such, but the servicing of such is provided by others from a front line perspective...again, escalation into RIM is available to those front-line entities, but not to end users (save for the fee-based Incident Support model).
    In your case, this could get quite messy. All too often, a service related issue is ignored by the carrier if they discover that they also did not originally sell the device to the end user (if they sold both the device and service, they would be responsible for all support for everything). They have a sad tendency to "blame the device" when it's really a service issue, and ignore the plea from the end user. Despicable, yes...but it happens all too often. And it get's worse...the device support entity will often likewise blame the service entity. The sad part of this bad scenario is that it's the end user who is left out in the cold with no service nor support from anyone that will actually aid their situation. Hopefully, this really poor outcome happens only rarely...but I know 100% (from reports on this forum) that it does happen more than 0%. I hope it does not come to pass for you, but I thought I'd warn you about it just in case so that you can be prepared for it.
    All in all, I think what I'd suggest is that you press 1udn1 for support and escalation on this. Get them to tell you why they have no escalation path since, as far as you understand, they are 100% responsible for all of your service-related support, and that is exactly what this situation is, and they need to resolve it for you one way or another. Escalate with them to managers with them...the front line folks you reach likely won't have any authority to do anything "off script"...and you'll likely need that. Stress to them that you PAY THEM for your services and service-related support...and right now they are delivering neither to you, yet you continue to PAY THEM. Get them to reveal why they have no escalation capability...and see if they will reveal that they are sub to another carrier who does have that capability, and see if you can escalate that way.
    You also may want to contact your former carrier...perhaps they did not fully release something related to your BB/BIS account, and that is what is preventing it from migrating to your new device? It is quite normal to migrate a BIS account from device to device (15 in one year, as I recall), so that one can retain their AW purchase records and such. This holds true crossing carriers...indeed, I've had one BIS account for years, and it started on one carrier and is now on a different one, and all my things are properly intact. Something is wrong "inside" preventing yours from doing so, and that needs attention "inside" to resolve for you.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Small problem with applescript

    Hello Again,
    Every day I use a morning script to launch my programs I have to use... and some more things...
    Aldo I have a problem with Golive.
    When I try to type activate in the editor it makes a bigg A.
    Also with cut and past.
    and when i run the applescript-program it does all I need ( The golive part is at the end... but when I place it in the middle it's just stops.
    I get this fault message : Can't continue <event Coreactv>
    and i guess it has something to do with the A-ctivate
    Is this a bugg? Or can someone explain this?
    I would like to do more after launching Golive..
    tell application "Extensis Suitcase X1"
    activate
    end tell
    tell application "Mail"
    activate
    end tell
    tell application "Adobe Photoshop CS"
    activate
    end tell
    tell application "QuarkXPress Passport"
    activate
    end tell
    tell application "Adobe GoLive CS"
    Activate
    end tell

    Some apps don't respond well to tell blocks. I don't have that app to test, but you could try using something like launch "TextEdit" or tell app "Finder" to open posix file "/Applications/TextEdit.app" to improve your results. Sometimes an ignoring application responses block can help too.

  • Problem with downloading and installing apps

    When I start download or install new apps after few second whole operation slow down or stop. I have same problem when I start update old version of aplications. Can you please help.
    I do not have problem with cnnection to internet.

    Try this
    Make sure IOS is updated to latest version
    (How to update your iOS device
    http://support.apple.com/kb/HT4623)
    Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
    If that doesn't work then reset the device by going to settings/general/reset/reset all settings  (or for network connection issues 'reset network settings').
    (no media or data will be deleted from the device, this will only take a minute).

  • Problem with roaming for specific apps

    Hi :)
    I have a problem with my iPhone 4s:
    When i use roaming on my iPhone 4s i try to save some money by turning off roaming for specific apps, but one day for ca. 3 weeks ago it stopped working!
    Some apps can use roaming but some can't ;(
    There are like 10 apps always turned on, but if i try turning roaming off for an app that is on already it wont work!
    If i close settings and reopen it, the app is now denied using roaming!
    If i try allowing an app it changes but still wont work and after some time it gets in the same possission i cant change!
    I have never experienced this before and i could't find an answer on google ;(
    If you know how to fix it please respond to me here :)
    ~somonekilledme
    P.S: Im really sorry if there are bad english here, but im mot english sooooo..... yeah

    You are on the right track suspecting DHCP conflicts.
    To configure your "roaming network" connect your "slave" Extreme to your main Internet router - either directly or through a switch - and place it in "bridge mode". That will work.
    A router will be distributing IP addresses using DHCP. Anything connected to it should be configured as a bridge, the essential difference being that a bridge does not distribute IP addresses.
    I do not believe your "slave" Extreme will function connected as it is to the "main" Extreme, but may work if you assign it a static IP address. It is not unusual for it to retain this static IP after having been changed to DHCP if its lease is still valid.
    The OK article you referenced must be terribly outdated if it is referring to AirPort Admin Utility. That has not been used in about a decade. Read this one:
    Wi-Fi base stations: Extending the range of your wireless network by adding additional Wi-Fi base stations
    Unfortunately its screenshots refer to AirPort Utility 5.6, which has been replaced with the prettier, though less useful 6.2.

  • Problem with steps in health app!!

    Hello guys, i have problem with my health app, i enable steps in the app but it doesnt count even a single step, it says "No Data". I searched in the Internet the way i can enable steps and did exactly what it says but nothing. Can someone help?

    you can use 3rd party apps to monitor your activity, but this will drain you iPhone Battery significantly more than if using the integrated Motion coprocessor.

  • Problem with rules in mail.app

    I've just started having a problem with my rules in mail.app that I just don't understand. I have several rules that I've had working for quite a while now, over a year. All of a sudden beginning about a month ago, some of them -- different ones at different times -- stop working and the incoming mail goes into my main mail box and don't get distributed according to the rules to the appropriate mail boxes.
    When I check the rules, all of which are basically the same: If any of the following conditions are met, From contains XXX, Perform the following actions: Move message to mailbox xxx, I see that mailbox XXX has changed from what it should be to some other mailbox name which is a valid name but not the one that I originally put in the rule.
    To make it a bit more strange, the rule with the wrong mailbox name is not executed and the mail winds up in my main mailbox.
    When I edit the rule and change the mailbox name and am asked whether I want to apply the rule and I respond yes, the rule executed and the mail that landed in the main mailbox gets distributed the way it should.
    But then anywhere from a day to a week later the same thing happens, that is, the mailbox name in the rule somehow gets changed again.
    Has anyone seen this behavior before and/or have any suggestions for fixing it?

    Are you really on 10.8.1 as per your profile - maybe updating to 10.8.3 might help.
    Have you tried rebuilding the mailbox? It sometimes helps sort out Mail problems:
    http://support.apple.com/kb/PH11811

Maybe you are looking for

  • I7 3770K vs i7 3820 - Video Card suggestion?

    My use : 90% Photoshop / LightRoom , 5% Premiere , 5% other, do NOT game at all. Hi Guys, My Budget for CPU is around $300-350 , what do you guys recommend? 2011 socket or 1155 that can be over clocked? I have another problem with Graphic card, I wan

  • Java.sql.SQLException: No suitable driver problem

    Hello all. Firstly, i am new to programming java apps that connect to SQL databases. I have set up a MySQL server on my computer, which i can successfully access through my command prompt on my pc (so i know its up and running). Now im trying to crea

  • How to correct design view?

    I got a strange problem in Design View:  I set up Foundation 3. Works fine, shows exactly as it should be in a browser preview. But it shows horrible in design. Normally I work in the split view. Code on top, design below. Right now I might as well w

  • Light Detailed Navigation Vs Heavy Detailed Navigation

    Hi All, What are the advantages/ disadvantages light detailed navigation have compared to normal detailed navigation. Is there any comparison chart available? Using normal Detailed Navigation, I could not see the URL's in my browser ( its always http

  • Mini Problem error (-9972)

    Over the last few weeks my mini has been freezing and the only way to shut it down was to pull out the power cord. The power button wasn't working either. Two days ago my mini turned on but then before entering the desktop it went to message saynig r