Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Error in Applescript, CONNECTION IS INVALID error? [delay script]

Error in Applescript, CONNECTION IS INVALID error? [delay script]
Thread Tools
badtz
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Aug 7, 2007, 02:05 AM
 
delay 10
run application "primary:Applications:SafariDepot:Scripts:Uplo ad Safari Bookmarks.app"
end run
end delay
I created the code above to run the "upload safari bookmarks.app" application. The program runs fine and dandy.

Here's the problem, at the end of running the application I get a "connection is invalid" error, I click on "OK" and that's it.

Why is this popping up? Is there any way to automatically click on that "OK"? Or maybe I wrote the small script wrong?

Suggestions?
     
numero
Junior Member
Join Date: Mar 2000
Location: Salem, OR, USA
Status: Offline
Reply With Quote
Aug 8, 2007, 01:14 AM
 
I downloaded SafariDepot just to have the executable, but didn't configure it.

Try this on for size:

code:
try
tell application "Mac HD:Applications:SafariDepot:Scripts:¬
Upload Safari Bookmarks.app"
activate
end tell
end try


-numero
     
badtz  (op)
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Aug 9, 2007, 01:38 AM
 
NUMERO! THANK YOU!!! Works perfectly!

I have no idea what the "try" command is for, but that made the difference I've tried using "tell" before, but that didn't work for me.

     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:13 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,