Error Number 1700
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 site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question 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 AppleScript error “Can’t make \”“ into type integer.” number -1700 up vote 0 down vote favorite I know this error has been covered here but I have been searching through the answers for days now and when I think I have cracked it I end up breaking the code somewhere else. I am trying to run AppleScript in Xcode to make a backup of a folder on a set network machine. The problem I am having is that the backup is date stamped and in a sub folder on the users Desktop. I am trying to avoid using hard POSIX paths to make the final app universal. All the solutions I have found don't take this in to account. I apologize for the messy code but I am still learning AppleScript and so end up hashing different bits of code together. my code is set catFolder to "Catalyst AA" set bckup to "Backups" set myDesktop to path to desktop folder as alias set main_folder to ((path to desktop folder) & "Backups") as string tell application "Finder" if not (exists folder (bckup) in myDesktop) then set main_folder to (make new folder at desktop with properties {name:bckup}) as alias else if not (exists folder (catFolder) in main_folder) then set cat_folder to (make new folder at folder main_folder with properties {name:catFolder}) as alias end if end if end tell try mount volume "afp://10.0.0.1/Content SSD AA/Catalyst/Catalyst 4.40_m373_HD" set d to (year of (current date) as text) & "-" & (month of (current date) as integer as text) & "-" & (day of (current date) as text) & "-" & (time string of (current date)) tell application "Finder" set f to make new folder at POSIX file "~/Desktop/Backups/Catalyst AA" with properties {name:d} duplicate POSIX file "/Volumes/Content SSD AA/Catalyst" to f end tell try tell application "Finder" eject disk "Content SSD AA" end tell end try
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 site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question 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 Applescript http://stackoverflow.com/questions/21766733/applescript-error-can-t-make-into-type-integer-number-1700 Error -1700, cant make ~/Desktop/ into an alias up vote 2 down vote favorite set source to (choose folder default location ("~/Desktop/") with multiple selections allowed) repeat with filetocopy in source set n to (quoted form of (POSIX path of filetocopy)) & " " set dir to do shell script "dirname " & n set bn to do shell script "basename " & n http://stackoverflow.com/questions/30723237/applescript-error-1700-cant-make-desktop-into-an-alias set n2 to "." & bn set n3 to dir & "/" & n2 do shell script "mv " & n & space & quoted form of n3 end repeat display dialog "Folders Hidden!" buttons {"OK"} default button 1 It refuses to make ~/ into an alias. However, I can't hard-code the path with my username as I am releasing this for friends. Any simple solutions? osx applescript share|improve this question edited Jun 9 '15 at 5:18 200_success 4,01811433 asked Jun 9 '15 at 4:50 Recon 324 possible duplicate of Relative file paths with Applescript –200_success Jun 9 '15 at 5:00 @200_success thanks! Will try this out. –Recon Jun 9 '15 at 5:22 stackoverflow.com/questions/30778426/… –user3577225 Jun 11 '15 at 10:37 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted You don't need the ~/. Use (Path to desktop) instead. set source to (choose folder default location (path to desktop) with multiple selections allowed) share|improve this answer answered Jun 9 '15 at 7:05 NGAFD 452313 add a comment| Your Answer draft saved draft discarded Sign up
von GoogleAnmeldenAusgeblendete FelderBooksbooks.google.de - AppleScript in a Nutshell is the first complete reference to AppleScript, the popular programming language that gives both power users and sophisticated enterprise customers the https://books.google.com/books?id=rW5k0w_wC3MC&pg=PA132&lpg=PA132&dq=error+number+1700&source=bl&ots=ogFf7W0kz_&sig=hwmNL25OK67_2mP7hRpOOHX6PfU&hl=en&sa=X&ved=0ahUKEwj3n6vh4M_PAhWLVT4KHe5jBOYQ6AEIPDAE important ability to automate repetitive tasks and customize applications. As the Macintosh continues to expand and solidify...https://books.google.de/books/about/AppleScript_in_a_Nutshell.html?hl=de&id=rW5k0w_wC3MC&utm_source=gb-gplus-shareAppleScript in a NutshellMeine BücherHilfeErweiterte BuchsucheE-Book anzeigenNach Druckexemplar suchenO'ReillyAmazon.deBuch.de - €33,50Buchkatalog.deLibri.deWeltbild.deIn http://www.ibm.com/support/knowledgecenter/SSY2VQ_2.0.0/com.ibm.aix.pli.doc/ibmc2mst25.htm Bücherei suchenAlle Händler»AppleScript in a Nutshell: A Desktop Quick ReferenceBruce W. Perry"O'Reilly Media, Inc.", 2001 - 499 Seiten 2 Rezensionenhttps://books.google.de/books/about/AppleScript_in_a_Nutshell.html?hl=de&id=rW5k0w_wC3MCAppleScript in a Nutshell is the first complete error number reference to AppleScript, the popular programming language that gives both power users and sophisticated enterprise customers the important ability to automate repetitive tasks and customize applications. As the Macintosh continues to expand and solidify its base in the multimedia and publishing industries, AppleScript is the tool of choice on this platform for creating error number 1700 sophisticated time- and money-saving workflow applications (applets). These applets automate the processing and management of digital video, imaging, print, and web-based material. AppleScript is also gaining a foothold in scientific programming, as technical organizations adopt G4 CPU-based systems for advanced computing and scientific analysis. Finally, "power users" and script novices will find that AppleScript is a great everyday Mac programming tool, similar to Perl on Windows NT or Unix.In this well-organized and concise reference, AppleScript programmers will find: Detailed coverage of AppleScript Version 1.4 and beyond on Mac OS 9 and Mac OS X. Complete descriptions of AppleScript language features, such as data types, flow-control statements, functions, object-oriented features (script objects and libraries), and other syntactical elements. Descriptions and hundreds of code samples on programming the various "scriptable" system components, such as the Finder, File Sharing, File Exchange, Network scripting, Web scripting, Apple System Profiler, the ColorSync program, and the numerous powerful language extensions called "osax" or scripting additio