Update screen during lengthy process

Andre Garzia andre at andregarzia.com
Wed Jan 12 08:22:37 EST 2011

On Wed, Jan 12, 2011 at 7:22 AM, Scott Rossi <scott at tactilemedia.com> wrote:
> In addition to the other suggestions, another option is to hand off the
> AppleScript launch to a separate LiveCode application.  This way your
> hot-folder app remains independent of the launch app that gets locked up by
> the AppleScript process.  Depending on what tasks are being completed, you
> may not be able to show specific progress, but at least your hot-folder app
> can show that it is operation (using an animation or similar), you can keep
> your hot-folder app responsive, and you can kill the AppleScript app if
> necessary.
> This may sound a bit extreme, but I've done it before with installers that
> needed to interact with other processes that would normally lock up
> LiveCode.

a more extreme version of this is to use the 3.5 command line engine
(aka cgi engine) and some scripts for the processing. This way, when
your application wants to process a file it opens a new process to the
script and executes it. You application will not lock and you will
avoid launching another application and bloating the dock....

Same thing explained in steps:

step #1: pick your processing code and refactor it into a text script
file to be executed by 3.5 engine
step #2: bundle engine and script with your app
step #3: main application finds a new file
step #4: main application uses a loop with open process and read/write
to process to interact with script
step #5: user is happy and you can even process more than one file at
the same time.

> Regards,
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
> Recently, tkuypers at telenet.be wrote:
>> Hi gang...
>> I've created a hot-folder based app, that executes a few scripts when a file
>> if dropped into a specific folder.
>> But these scripts can take up to 4 minutes to end and during that period
>> LiveCode is locked.
>> I'm using a send command to watch the folder every few seconds, is a file is
>> found then it is processed, but I want to show some kind of progress on screen
>> to show the app is working.
>> I've tried firing off a second event, to show a counter, but that doesn't do
>> anything.
>> And of course clicking on the "Stop Processing" button doesn't work as well
>> :-(
>> Any suggestions on how to show a progress, and how to make the "Stop" button
>> to work during the execution of an applescript?
>> Any suggestions are welcome.
>> Met vriendelijke groeten,
>> Ton Kuypers
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

http://www.andregarzia.com All We Do Is Code.

More information about the Use-livecode mailing list