Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I have an AppleScript snippet that is the following:

tell application "StuffIt Deluxe

What happens if you move the "With timeout..." outside of the "Tell" like this:

code:


With Timeout of 1200 seconds

tell application "Stuffit Deluxe"

.

.

.

end tell

end timeout


  • Author

Nope, that didn't work. Here's the full script, FileMaker and AppleScript:

code:


Perform Script [ Sub-scripts, "Script Start"]

If [ "MainMenu~gContant#gConstant::gPlatform != "Macintosh""]

Just a wild guess, but maybe Filemaker sets it's own timeout of 60 seconds no matter what you put in the applescript. How about breaking it into two applescripts, one to do the main part, and the other to quit Stuffit, something like this:

code:


Perform Applescript[

set clientsFolder to ....etc.

.

.

.

Ignoring application responses

tell application "Stuffit Deluxe"

.

.

.

.

end tell

end ignoring

-- end of applescript

]

Pause/resume Script [ 1200 seconds]

Perform Applescript [quit application "Stuffit Deluxe"]


  • Author

Interesting idea, but it wouldn't quite work that way. The nice thing about the timeout is that it won't wait the entire time if it's not necessary. I don't think any of the archives are going to take 20 minutes to create, which is why I used such a high number. Maybe if I can find a way to check the status of StuffIt to see if the archive is done, and if it is, quit the program, that might be a valid workaround.

For instance, when the system is stuffing something, there is the dialog visible that displays the process. Perhaps something like this:

code:


Loop

I was going to suggest something like that, but I've never tried scripting Stuffit. So, I don't know how you would test it to see when it's finished. You might try:

code:


tell app "Finder"

-- see if stuffit has created the archive

If exists ( file "MyStuffitArchive.sit" of folder "MacHD:MyArchiveFolder") then

set Stuffit_Is_Done to true

else

set Stuffit_Is_Done to false

end if

end tell


I've used this code successfully to find out when an application has completed its printing task by checking for the existence of the print file in the desktop printer container (that's why I used the goofy file name syntax in the example). But, I don't know whether the existence of the archive file would indicate that Stuffit is finished. Maybe you can also check to see if the archive file is still open.

[ May 30, 2001: Message edited by: BobWeaver ]

  • Author

Having it check to see if the archive exists wouldn't work, because it exists as soon as it starts stuffing. And checking to see if it is open wouldn't work because it would only close when it's finished, and I can't get my script to get to that part.

But I'll do some experimenting and see what happens. I'll post my results here on the forum, in case anyone else ever needs something like this.

Chuck

  • 2 months later...
  • Newbies

Hi list, i had a similar applescript timeout problem if i try to download something with "URL Access Scripting" from a Perform AppleScript script step that take longer than 60-70 seconds.

The only workaround that i've found is the same suggested from Bob:

"Ignoring application responses

tell application "URL Access Scripting"

.

.

.

end tell

end ignoring"

But obviously, this way i can't manage any errors that can occurr.

bye

  • 1 month later...

I think the solution is to use an AppleEvents to launch the script externally. It has been my experience that timeouts are messed up by FM when launched internally.

(Sometimes adding a

Tell me to ...

will help, especially when you have a dialog.)

FMP can be fussy about AppleScript. The easiest solution is to convert your AppleScript to an application that does your stuffing -- you can make the timeout as wildly long as necessary.

The, use FMP to OPEN your AppleScript application. Example in FMP:

Tell application "MyCoolStuffitScript"

activate

end tell

Oops! I forgot the "test" in my previous post frown.gif" border="0

Your AppleScript application will quit when it's done so just get a list of processes and look for your script. Loop through this periodically until your Script is not running using a conditional.

set AppsRunning to ((the name of every application process) as string)

if AppsRunning does not contain "SomeApplication" then do this stuff

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.