Tuesday, 22 July 2014

Applescript Error in Xcode


hello there!

having slight problem applescript , simple test connect afp server application. basic @ moment, hope expand on it.

whenever try , input text 1 of textboxes, error:

code:
2012-03-03 16:32:38.391 test[7460:707] *** -[wfappdelegate buttonconnect:]: finder got error: «class rapw» doesn’t understand stringvalue message. (error -1708)
i don't have clue how solve this.

error not appear when remove following line code below:

code:
set passwordvalue password's stringvalue()
code:
--  --  wfappdelegate.applescript  --  test  --  --  created furnell on 02/03/2012.  --  copyright (c) 2012 furnell virtual. rights reserved.  --    script wfappdelegate  	property parent : class "nsobject"  	  	on applicationwillfinishlaunching_(anotification)  		-- insert code here initialize application before files opened   	end applicationwillfinishlaunching_              property serverid : missing value      property network_share1 : missing value      property username : missing value      property password : missing value                      on buttonconnect_(sender)                                tell application "finder"                                          set serveridvalue serverid's stringvalue()               set usernamevalue username's stringvalue()               set passwordvalue password's stringvalue()                            try                  set network_share1 "afp://" & usernamevalue & ":" & passwordvalue & "@" & serveridvalue & "/shared"                  if not (exists network_share1)                      mount volume network_share1                      else                      eject network_share1                      mount volume network_share1                  end if                  on error                  display dialog "could not conect server specified. did enter correct credentials? if in doubt, contact system administrator." buttons "ok" default button "ok"              end try          end tell                              end buttonconnect_              	on applicationshouldterminate_(sender)  		-- insert code here housekeeping before application quits   		return current application's nsterminatenow  	end applicationshouldterminate_    end script
thanks in advance :)
 

the term password reserved, either need choose name or enclose variable name in pipes.
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment