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.

Qestion for the smart guys!

Featured Replies

I am using the troi File Plug in to copy files from a disk, and then launch them, and then gather information from them but I am having some problems.

I will only be doing this with .zip and .sit files.

I copy down the file, and tr_Launch it, which is the same as double clicking on it, that then decompresses it, after that, I am going through the whole decompressed folder getting information about the files contained inside of it.

My problem, is that My script runs faster than a file can decompress, as such, when I try to read it, i get a -43 error meaning the directory doesn't exist yet. I need to be able to wait until the file is unzipped. However, I can't just use a Pause script step, because the file could take forever, or no time at all to unzip and this has to be fast.

My only other solution that I can see is to create a looping script that checks to see if the new folder is in that directory or not, then continueing when it finds it. Is there no other way to do this? Thanks for any help you can provide.

Out of all of the plugins I've purchased over the time, the Troi File is certainly the most handy.

I use it to create zip files (using WinZip command line interface), then create self-extracting exe files. Kinda the opposite of what you are doing.

The looping idea of your might work, but maybe with these sugguestions -

If you only look for the directory(folder) being created, that doesn't mean that the file(s) are done decompressing. The directory is the first thing it decompresses, supposing there is one. Supposing that there are multiple files in the zip , you would have to know what the last file to be decompressed is to determine exactly when it's done.

Also, this might cause memory errors, or for it to simply fail if it takes too long, because if I'm not mistaken - when FM "senses" it's in an infinite loop, it'll exit out, or the computer will run out of free memory trying (not cool!). Certainly give it a try, and please post back here with the results. I would be interested.

Another idea I've got, but you may not like it - Break the script down into a two-step process. First script starts to unzip. Once you visually see it's completed, run step two.

How about a Loop that checks for the file(s) over and over, using a counter, so that it gives up on that operation if you reach the counter before the file exists? You're pretty much stuck with waiting in intervals of 1 second (plus the millisecond to check if the file exists).

As far as other ways to do it, you could use AppleScript, which would tell the Finder to open the file (or use command line). Then use a "repeat" loop, with a "delay 1" (or less, 0.1), and an "if exists" test, with an "exit repeat". It would be pretty much the same thing though. I don't think it can "tell" if something's done except for checking over and over. It's not a FileMaker script (which, we take for granted, will finish one step before starting another).

set zipFile to "Macintosh HD:Users:fej:Desktop:mobile 7 doc bugs.zip"

set theFile to "Macintosh HD:Users:fej:Desktop:mobile 7 doc bugs"

tell application "Finder"

  • Author

I ended up just using the loop, and its working fine. A note to Bent however, It seems that Trio File reads a temp folder ".nameofzipfile.zip" until the file has finished unzipping. Making my job much easier. My loop is pretty simple. ListFolder ( -Folders

Substitute anything that starts with a "." and see if there is a folder there or not. Since I create the folder that the zip files go into for decompressing, that makes this work like a charm.

Fenton:

Applescript would make this so much easier, however, this needs to be a cross platform client application, making Applescript not possible.

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.