to avoid unexpected behaviour it’s not recommended to use filenames and passwords including special characters,
especially on file servers. Anyway, there is no way to escape a parenthesis (actually there is no need to) but you can put
almost everything into a variable in AppleScript
set user_name to "u_n"
set pass_word to "(p_w)"
set file_server to "22.214.171.124"
set server_volume to "myVolume"
set s to "afp://" & user_name & ":" & pass_word & "@" & file_server & "/" & server_volume
tell application "Finder" to mount volume s -- works better with targetting the Finder
Stefan, tks for your reply. I am trying to avoid changing the password as I will have to change it in several places. As the world is full of script kiddies trying to invade servers, I tried to make the password as hard to break as possbile.
Bad news: your solution doesn’t work. I removed the “tries” and got "The volume was not found. How do I output the value of “s” in the above example?