Applescript Error Code 1728
Contents |
enter a title. You can not post a blank message. Please type your message and try again. Manuel Federanko Level 1 (0 points) Q: Apple Script error number -1728 Hello guys i have a little applescript finder error 1728 problem with my script i hope you can help mescript:tell application "Finder" display
Applescript Fehler 1728
dialog "Bitte wählen Sie den Ordner, in welchem sich ihre minecraft_server.jar befindet." set serverfolder to quoted form of POSIX apple script error 1728 path of (container of (choose file)) tell application "Terminal" set cd to "cd" & " " & serverfolder set mehrram to "java -Xmx2048M -Xms2048M -jar minecraft_server.jar" do script cd delay 0.25 do script
Applescript On Error Continue
mehrram in window 1 end tellend tellI think its the 3 line also: set serverfolder to quoted form of POSIX path of (container of (choose file))whats wrong with this line?here is error code:error "„Finder" hat einen Fehler erhalten: „POSIX path of folder \"BTW Server 1.3.2\" of folder \"Server\" of folder \"Minecraft\" of folder \"Documents\" of folder \"manuelfederanko\" of folder \"Users\" of startup disk" kann nicht gelesen werden." applescript error handling number -1728 from POSIX path of folder "BTW Server 1.3.2" of folder "Server" of folder "Minecraft" of folder "Documents" of folder "manuelfederanko" of folder "Users" of startup diskThanks for helping me Apple Script, Mac OS X (10.7.3) Posted on Aug 30, 2012 2:19 AM I have this question too by Niel,Solvedanswer Niel Level 10 (313,129 points) Mac OS X A: Here:set serverfolder to quoted form of POSIX path of ((container of (choose file)) as alias)(69303) Posted on Aug 30, 2012 8:55 AM See the answer in context Close Q: Apple Script error number -1728 All replies Helpful answers by Niel,Solvedanswer Niel Aug 30, 2012 8:55 AM in response to Manuel Federanko Level 10 (313,129 points) Mac OS X Aug 30, 2012 8:55 AM in response to Manuel Federanko Here:set serverfolder to quoted form of POSIX path of ((container of (choose file)) as alias)(69303) Helpful (0) Reply options Link to this post by Frank Caggiano, Frank Caggiano Aug 30, 2012 3:41 PM in response to Manuel Federanko Level 7 (25,796 points) Aug 30, 2012 3:41 PM in response to Manuel Federanko AppleScript questions are best asked in Mac OS X TechnologiesI've asked the hosts to move this there. Help
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Applescript Error User Canceled
site About Us Learn more about Stack Overflow the company Business Learn
Applescript Error 10810
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question applescript error 1721 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up POSIX https://discussions.apple.com/thread/4252644?start=0&tstart=0 File Error - Extraneous double quotes? up vote 1 down vote favorite This applescript works set myFile to (POSIX path "/Users/fred/Documents/data.dat") This applescript doesn't work set myFileName to "/Users/fred/Documents/data.dat" set myFile to (POSIX path myFileName) It fails with the error get POSIX file "/Users/fred/Documents/data.dat" --> error number -1728 Result: error "iTunes got an error: Can’t get POSIX file \"/Users/fred/Documents/data.dat\"." number -1728 from file "Macintosh http://stackoverflow.com/questions/15297731/posix-file-error-extraneous-double-quotes HD:Users:drew:Desktop:Music:DIY:DIY-01.mp3" It looks as if when using the variable, POSIX path is including the double quotes as explicit characters in the file name. What am I doing wrong? The script below reproduces the problem. tell application "Finder" set newFileName to "/Users" set newFile to POSIX file newFileName end tell Thanks osx applescript share|improve this question edited Mar 8 '13 at 17:00 asked Mar 8 '13 at 15:40 drew 1,2061920 ... so why not just remove them? –Carl Norum Mar 8 '13 at 15:41 ...because the set myFileName to "/Users/fred/Documents/data.dat" needs them –drew Mar 8 '13 at 15:58 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted OK - I've found out what I should be doing. The script below works - you just need to coerce the variable rather than pass it to POSIX file tell application "Finder" set newFileName to "/Users" set newFile to (newFileName as POSIX file) end tell Result... file "Macintosh HD:Users" Thanks for your assistance. Andrew share|improve this answer answered Mar 8 '13 at 17:27 drew 1,2061920 add a comment| up vote 1 down vote
ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload https://forums.adobe.com/thread/1139960 this page. Please enter a title. You can not post a blank message. Please http://macstuff.beachdogs.org/blog/?p=28 type your message and try again. More discussions in Illustrator Scripting All CommunitiesIllustratorIllustrator Scripting 1 Reply Latest reply on Jan 22, 2013 5:26 PM by nellbern error number -1728 Applescript & some issues with spotToProcess nellbern Jan 22, 2013 5:21 PM I have been working on this script for weeks. Basically I would like to batch (using script error AS) illustrator files. (open, find spot colors, change to process, save, close). So far I'm able to open files but the part when is supposed to change them into process is falling giving me an error number -1728 from document 1 of document 1. I tried to put as many --comments on the scriptI want to clarify my knowlege in AS is basic. What is this error? I search specifically for applescript error code this error number with no success. What I have was pieced together and modified from 2 scripts I found. I'm challenging myself with not too much success but If I don't to ask, I don't learn. Can you anyone guide me to a solution?property file_types : {"EPSf", "EPSP"}property file_extensions : {"eps"}--Would like just Illustrator eps files not Photoshop eps. How can you do this? currently if in the folder there are Photoshop eps files the script is opening those filesset the_folder to (choose folder with prompt "Select the files containing Illustrator docs to change spot to process colors:")set the_images to get_folder_list(the_folder, file_types, file_extensions, true, false)if the_images = {} then beep display dialog "No valid Illustrator found in chosen folder." buttons {"OK"} default button 1 with icon 0 giving up after 10 returnend ifon openLegacyFile(fileToOpen) --Open a file with automatic update of legacy text --(I found this in the ADOBE ILLUSTRATOR CS4SCRIPTING REFERENCE) tell application "Adobe Illustrator" activate open POSIX file fileToOpen as alias with options {update legacy text:true} end tellend openLegacyFiletell application "Adobe Illustrator" activate --set user interaction level of script preferences to never interact --Will ignore any dialogs when opening files. Currently NOT working with files with embedded color profiles I'm getting a message: Your current settings discard CMYK profile
tricks and tips Posts RSS Comments RSS 48 Posts and 150 Comments till now Trapping error codes in AppleScript If you use AppleScript you know sometimes when you try to do things such as mount a remote volume things can go wrong. Then you get a error message with number telling (hopefully) what went wrong. But you might not want that error message to show up. Maybe if that error happens you want your script to do something. If so then you have to trap that error first. To catch an error you need to wrap the part of your script that is doing the action in a try statement. So, if I wanted to open a file I might use something like this: Code blocktry tell application "Finder" open file "Hard Drive:Users:joe:oops.txt" end tell on error errmsg end try The script trys to run that command and if there is a problem the error message gets put into the variable errmsg. Then we can handle that error another way, perhaps with a dialog box. Code blocktry tell application "Finder" open file "Hard Drive:Users:joe:oops.txt" end tell on error errmsg display dialog errmsg buttons {"Oops"} end try That works great for generic errors but what if we know the error code of a specific error, such as the file doesn't exist ,which happens to be -1728. Then we can add the number property to our on error trap and do something specific for that error. Code blocktry tell application "Finder" open file "Hard Drive:Users:joe:oops.txt" end tell on error errmsg number errNum if errNum is -1728 then display dialog "Hey, that file doesn't exist!" buttons {"Doh!"} else display dialog errmsg buttons {"Oops"} end try Now we can give the user specific feedback on certain errors and just display the error message for all other errors. Be Sociable, Share! Tweet admin :: May.10.2007 :: Applescript, Scripts :: No Comments » Comments are closed. Trackback this post | Categories Applescript Automator Management Scripts Server shell scripts System Terminal Training Uncategorized Widgets Please help support this site: Pages About this site Contact Me Mavericks 10.9 Apple Certification and Training Books Mountain Lion 10.8 Apple Certification and Training books Recommended AppleScript Books for Beginners Admin sites AFP548 MacEnterprise.org Blogroll Infinite Loop Mind the explanatory gap The Joy of Tech Help sites Macfixit macosxhints.com MacResearch News Mac Rumors Ma