AppleScript error on Tiger only: "can't make file into type alias"

Hi,
I'm successfully using this smart TextWrangler applescript from this webpage for opening files on the same folder as the current document:
http://blog.ampli.fi/textwrangler-open-file-from-directory-of-current-file/
It works fine on Mountain Lion.
However, when I try it on Tiger 10.4.11, this error dialog appears: "TextWrangler got an error: Can't make [file] into type alias".
The script basically gets the path of the current document in TextWrangler and posts a file chooser on such path.
I guess these are the lines that Tiger doesn't like:
  set current_path to POSIX path of current_file
  set new_file to choose file default location (current_path) with multiple selections allowed
open new_file
After googling for the error "can't make [] into type alias", I tried to change such lines to:
  set current_path to (POSIX path of (current_file as alias))
  set new_file to choose file default location (current_path) with multiple selections allowed
open new_file
But, however, the same error remains.
Do you have any idea on how could this work?
Thanks!

wow, 10.4...
try this:
set current_path to current_file
set new_file to choose file default location (current_path) with multiple selections allowed
open new_file
I'm not certain when the standard applescript dialogs were updated to accept posix paths, but it may have been 10.5.

Similar Messages

  • Please help explain the error "Can't make «script» into type Unicode text"

    i am writing an applescript for my eyetv installation that handles recorded shows. i have posted in their forums, without reply, so thought maybe i could get some understanding of the technicalities of the fault to try to fix myself!!
    i have a sub-routine:
    to deleteeyetvrecording(theRecordingID)
    set theScriptLibrary to load script file "Macintosh HD:Library:Scripts:ScriptLibraryv1.scpt"
    tell application "EyeTV"
    theScriptLibrary's log_event("RecordingDone", "Deleting EyeTV recording: " & (get title of theRecordingID), 2)
    try
    delete theRecordingID
    on error theErrorMessage number theErrorNumber from theErrorObject
    theScriptLibrary's log_event("RecordingDone", "deleteeyetvrecording: " & theErrorNumber & ": " & theErrorMessage & ". Object: " & theErrorObject, 2)
    end try
    end tell
    end deleteeyetvrecording
    even though the line above the error works fine and retrieves the Title property of the eyetv recording, the delete command on the next line outputs to the log file:
    Sunday, October 26, 2008 09:50:51 [ 1 ] Error deleting file (4/4): -1700: Can’t make «script» into type Unicode text.
    what does this error mean? what syntax changes are needed?
    note this sub-routine worked in v1 of my script - i only copy and pasted it to the v2 script! go figure!
    regards
    jingo_man

    Hello
    Without knowing what theRecordingID is, how deleteeyetvrecording() is called and what the actual code of log_event() is, I can only guess.
    The said error log is most likely not written by the code in the try block you provided, which should throw error by itself when theErrorObject cannot be coerced to string. I'd guess you have an enclosing try block where you call deleteeyetvrecording() and the said error log comes from there.
    As far as I can tell, you should not assume that you can always coerce theErroObject (that is obtained from 'from' parameter of 'on error' statement) to text.
    Too little information to go any further.
    H

  • Can't make «class ctnr» of alias - error message in script

    I'm trying to take Apple's own "Add To File Names" script from a few years back and get it to work in 10.6.x but keep getting this error:
    Can’t make «class ctnr» of alias "Macintosh HD:Library:Scripts:add to names.scpt" into type text.
    I'm not an AppleScript expert by any stretch of the imagination. I'll paste the entire script unedited from Apple:
    Add Prefix-Suffix to File Names
    This script is designed to add a prefix or suffix to files in the front window of the desktop.
    If no folder windows are open, the script will effect items on the desktop.
    Copyright © 2001 Apple Computer, Inc.
    You may incorporate this Apple sample code into your program(s) without
    restriction. This Apple sample code has been provided "AS IS" and the
    responsibility for its operation is yours. You are not permitted to
    redistribute this Apple sample code as "Apple sample code" after having
    made changes. If you're going to redistribute the code, we require
    that you make it clear that the code was descended from Apple sample
    code, but that you've made changes.
    -- The following line is disabled due to a Menu Manager bug
    --set the source_folder to (choose folder with prompt "Pick the folder containing the files to rename:")
    try
    tell application "Finder" to set the source_folder to (folder of the front window) as alias
    on error -- no open folder windows
    set the source_folder to path to desktop folder as alias
    end try
    set the prefixorsuffix to ""
    repeat
    display dialog "Enter the prefix or suffix to use:" default answer the prefixorsuffix buttons {"Cancel", "Prefix", "Suffix"}
    copy the result as list to {the prefixorsuffix, the button_pressed}
    if the prefixorsuffix is not "" then exit repeat
    end repeat
    set the item_list to list folder source_folder without invisibles
    set source_folder to source_folder as string
    repeat with i from 1 to number of items in the item_list
    set this_item to item i of the item_list
    set this_item to (source_folder & this_item) as alias
    set this_info to info for this_item
    set the current_name to the name of this_info
    if folder of this_info is false and ¬
    alias of this_info is false then
    if the button_pressed is "Prefix" then
    set the newfilename to the (the prefixorsuffix & the current_name) as string
    else
    set the newfilename to the (the current_name & the prefixorsuffix) as string
    end if
    my setitem_name(thisitem, the newfilename)
    end if
    end repeat
    beep 2
    on setitem_name(thisitem, newitemname)
    tell application "Finder"
    --activate
    set the parentcontainerpath to (the container of this_item) as text
    if not (exists item (the parentcontainerpath & newitemname)) then
    try
    set the name of this_item to newitemname
    on error the error_message number the error_number
    if the error_number is -59 then
    set the error_message to "This name contains improper characters, such as a colon (:)."
    else --the suggested name is too long
    set the error_message to error_message -- "The name is more than 31 characters long."
    end if
    --beep
    tell me to display dialog the error_message default answer newitemname buttons {"Cancel", "Skip", "OK"} default button 3
    copy the result as list to {newitemname, button_pressed}
    if the button_pressed is "Skip" then return 0
    my setitem_name(thisitem, newitemname)
    end try
    else --the name already exists
    --beep
    tell me to display dialog "This name is already taken, please rename." default answer newitemname buttons {"Cancel", "Skip", "OK"} default button 3
    copy the result as list to {newitemname, button_pressed}
    if the button_pressed is "Skip" then return 0
    my setitem_name(thisitem, newitemname)
    end if
    end tell
    end setitemname

    Any idea how to fix that?
    Try replacing the following three lines:
    else
    *set the newfilename to the (the current_name & the prefixorsuffix) as string*
    *end if*
    with these ones:
    else
    *set name_extension to the name extension of this_info*
    *set P to offset of name_extension in current_name*
    *if P > 0 then*
    *set current_name to text 1 through (P - 2) of current_name*
    *set name_extension to "." & name_extension*
    else
    *set name_extension to ""*
    *end if*
    *set the newfilename to the (the current_name & the prefixorsuffix & name_extension) as string*
    *end if*

  • Error "Can't make every file of ... into type alias list" - please help!

    Hi
    I am trying to adapt a script that uses Max (an audio conversion tool) to convert files in a folder to another format. The original script which I found on a forum asked the user to choose the folder with the files in which need to be converted, but I want to specify the folder in the script so that it can be automated. So I changed the line:
    set sourceFolder to choose folder
    to
    set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:"
    However I then get the error (this is the only line in the script I changed and the original script works fine):
    error "Can’t make every file of "Macintosh HD:Users:nick:Desktop:test:" whose name extension = "m4a" into type alias list." number -1700 from every file of "Macintosh HD:Users:nick:Desktop:test:" whose name extension = "m4a" to «class alst»
    Could someone let me know why I am getting this error and how I can sort it. The full script is below.
    Thanks
    Nick
    tell application "Max" to activate
    tell application "Finder"
    set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:"
    set theFiles to (every file of sourceFolder) as alias list
    repeat with aFile in theFiles
    tell application "Max"
    convert aFile
    end tell
    delay 1
    tell application "System Events"
    tell process "Max"
    click button "Convert" of tool bar of window "File Conversion"
    set encoderOpen to true
    repeat while encoderOpen is true
    try
    window "Encoder"
    on error
    set encoderOpen to false
    end try
    end repeat
    end tell
    end tell
    end repeat
    end tell

    nick_harambee wrote:
    set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:"
    This saves a string (Macin...) under the variable sourceFolder. You then try and use sourceFolder as an alias which doesn't work. To fix the situation try saving sourceFolder as an actual alias in itself. For example...
    set sourceFolder to folder "Macintosh HD:Users:nick:Desktop:test:"
    or perhaps
    set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:" as alias
    Either of those should correct your problem.
    When using "(choose folder)" you get an alias returned which is why the original script worked fine.

  • Live cycle ES2 can covert Frame maker file into PDF??

    Hi All
    good day!!
    I have read that live cycle can covert farme maker files into pdf .
    is it true . we are using live cycle ES2 and we are going to upgrade FM 8 (unix) to FM 11 .
    can we convert frame maker files into pdf using Live cycle ES2????
    you response highly appiciate!!
    thank you
    ramesh babu

    Possibly, but ES2 is only specified to convert FM7.2 & FM8 files. FM11 might work, but you would have to test it and it's most likely not supported by Adobe in this mode. See: http://www.adobe.com/products/livecycle/pdfgenerator/formats.html
    If you only need to create PDF output from existing FM files, then Datazone's DZbatcher or Omni Systems fmbatch (part of the mif2go product) utilities may suffice.

  • Error in invoking target install of make file /opt/oracle/product/9.0.1/ctx/lib/ins_c

    I am trying to install Oracle 9i database release 2 on Linux RedHat 7.3. I got error message from OUI during the linking Oracle database
    error in invoking target install of make file /opt/oracle/product/9.0.1/ctx/lib/ins_ctx.mk
    Any input is greatly appreciated.

    Pl identify exact version of "10g" you are trying to install. Are you following all of the steps in the Install Guide ? Pl post the last 50 lines from the install log file
    HTH
    Srini

  • 'Error in invoking ntcontab.o of make file' RH 6.2

    Error in invoking ntcontab.o of make file /u01/..../lib/ins_net_client.mk
    Get this while running universal intaller.
    Any know how to fix?

    i did not have the egcs or cpp packages installed - to answer my own question

  • Oracle 9.0.1on RH 9: "Error in involking target install of make file"

    I have complete 100% for install Oracle 9.0.1 i on RH 9
    But the problem happen during second step, is Oracle Configuration. when I finished 62% the error message occure. It is
    "Error in involking target install of make file
    /opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
    I try to solve this solution by set LD_SELF_CONTAINED=""
    in z/opt/oracle/product/9.0.1/bin/genclntsh file.
    after that i run /opt/oracle/product/9.0.1/bin/genclntsh
    the error is: "cp: cannot stat '/DISCARD/'"
    Please help me...

    I don't remember where on OTN I found this, but if you haven't already, you need to install binutils-2.11.90.0.8-13.i386.rpm. Also, make sure you have K shell installed, make a symbolic link (ln -s /sbin/fuser /bin/fuser), have /usr/bin as the first entry in your $PATH. All of the above should be stated on the first 'popup window' during the install.

  • Why java only can display GIF file not jpeg and BMP ??

    Did anyone know why java only can display GIF file not in jpeg and BMP ?? This is because the quality of GIS is not as good as Jpeg and BMP
    any code to load the display process ??
    thx guys !!!

    you can do jpegs but im not sure about bmps.
    The only thing ive noticed is that java cant support transparent jpegs, only transparent gifs
    Jim

  • HT201363 I can not make purchases into my itunes because I do not remember the security question what can I do live in Greece

    I can not make purchases into my itunes because I do not remember the security question what can I do live in Greece
    I press reset and there comes the message

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (100647)

  • Can't put files into nested folders in dock

    Whenever I try to put a file into a folder I have in my dock, it will only let me put it in the first level of the folder. Ideally, I would want the folder to pop open and show the next level of folders so I can navigate through levels of nested folders to put the file in the exact place I want deep within my folder hierarchy. I know I can hold down Control on a folder in the dock to show my nested folders, but how can I drag files into those nested folders? I thought this was supposed to be automatic in Tiger. Please help.

    Yes- Easy!
    When you have your Creative Media Explorer open and your portable device connected, you will see your Zen V Series Media Explorer in the SOURCE window in the upper LH corner. Click on the "+" in front of the Zen V Series icon and it will display the list of folders on the device.
    Right click on the main folder for the category you want to put the sub folder in and you will get a drop down menu.
    Select "New folder" and you will get the "New Folder" box asking you what name you want for your new folder. It's that easy.

  • Can't move files into folders more than one time.

    I'm having a strange problem.  If I try and drag a file into a folder then it will allow me to do that, but only once.  If I try to drag another file into the same folder then it is locked.  I can drag it into a different folder, but the same thing happens, I can move a file into the new folder but not a 2nd file, but it is locked.  I have to restart to "unlock" these folders, but the same things happens over and over again.  I can move a single file into a folder, but after that it locks up and I have to restart.
    Any ideas why this is happening?  It only happens in bridge, I'm able to move files freely in Finder.
    Thanks!

    I can't find a permission setting that would only allow a single file to be moved to a folder
    Don't know if you already tried but use a check and repair permissions on your Mac using either Apple Disk Utility (applications / utilities) or a third party like Cocktail.
    If still the same happens restart bridge holding down option key and choose reset preferences.
    When the problem still exist please provide more details about OS and Bridge versions as well as computer specs.

  • Can't load files into Library

    I recently purchased an iPod and dl'd and installed iTunes. But when I tried to add my music folder into iTunes library, it runs an error message and auto closes.
    Here's what's happening:
    1. It opens that Adding Files dialog box and starts processing files
    2. It opens the message box telling me that I have some .wma files, and I have the option of converting them to .aac
    3. No matter if I hit "Convert" or "Skip", it runs for a few more seconds, then Windows pops up with an "iTunes has encountered a problem and needs to close" message.
    I can load single files into the Library fine, but I can't load my full music folder into it.
    What's going on?

    From what you posted, one file or album is perhaps messing up the whole import.
    Try adding less files at once, instead of the entire folder.
    What a pain, I know!
    Maybe put the wma files in a separate folder?
    Then add everthing else.

  • Nothing shows up on my Desktop. I can put a file into the Desktop folder but it will not appear on the DTop. The HarDrive is not on the DTop either.

    Nothing appears on my Desktop. The Finder seems to work, so I can place a file into the DTop folder, but nothing appears on the DTop, not even the HarDrive.

    You can temporarily hide the crap on your desktop. Edit the CreateDesktop key in com.apple.finder:
    defaults write com.apple.finder CreateDesktop -bool false && killall Finder
    Then, to get my clutter back:
    defaults write com.apple.finder CreateDesktop -bool true && killall Finder

  • Looking for a Notes app that I can import CSV files into?

    As the title says, I'm looking for a good notes application for my iPhone that I can import CSV files into. I have tried both Appigo and Notespark, but I can't easily scroll through them, as I have 2,000+ notes. Is there any app that I can import my notes into and also scroll through quickly? I'd like something that works similarly to how you scroll through songs on the iPhone/iTouch, with the column on the right where you can skip to songs (notes, in this case) that start with a certain letter.
    Thanks!

    Hi Tx Tar Heel,
    I've been using Office2HD: https://itunes.apple.com/us/app/office2-hd/id364361728?mt=8
    Its cheaper than Numbers and it also works for Word and PowerPoint files too. I like the Dropbox integration. I can start on my Office docs (Word, Excel, PowerPoint) in the office and then edit those files with Office2HD when I'm out of the office. Files saves right back to Dropbox so that when I get back to the office the files are already updated. Not bad for a $7.99 app!
    Hope this helps!
    ~Joe

Maybe you are looking for

  • Append or combine multiple IDOCs into a single IDOC file

    Hi All, We are implementing multiple new payment types that will generate IDOC files for us to send to the bank.  To keep the cost to the minimum, the requirement is to combine multiple IDOCs to a single file. I'd like to know the most efficient way

  • Query regarding grouping of 11i baseline patches

    Hello, Application : 11.5.10.2 DB : 10.2.0.4 OS : AIX 6.1 We are thinking of applying the 11i baseline patches in two groups/phases as mentioned below. We have in total 33 baseline patches (plus pre and post reqs too) to apply. Keeping in mind the fu

  • Opening a WordPerfect Document

    I recently switched to Mac and transfered all my documents over from my PC. Some of the documents were created in WordPerfect (which isn't even installed on that computer anymore) and I can't figure out how to open them on my Mac. Does anyone have an

  • How do I tell if we have DFS on our network

    Hi, I have inherited a network and have heard rumors that we have DFS installed somewhere on it. I am having difficulty finding any server where this is installed. Does anyone know of a good and quick way for find out where it installed like a networ

  • Next working date

    HI, Can anyone help me with a function to find the next working date excluding holidays from a table 'holidays' The input to the function would be a date and output as well. Thanks