I don't know much about Applescripts.
I only played with one script.
It does process while the FM script is running, when being put into a loop.
So it may have something to do with your DoScript not having time to process? I don't know. Possibly include a delay so it does have time.
How do you have your loop structured?
I can understand the issue that you are experiencing, having come across exactly this situation in the past, and there is a simple explanation for it.
All FileMaker Pro client software products are single threaded.
FileMaker cannot handle user interaction from two inputs at the same time - it only has one input channel.
Your script is running in a loop, taking over the single input channel, so when you call your AppleScript, FileMaker is busy and can't respond.
Once the loop has finished running, then the channel is open for AppleScripts (or direct user) input.
If you are intent in running this loop, then you have to construct it in a different way.
You have to let the FileMaker script directly call your AppleScript and write the loop in your AppleScript, allowing the calling FileMaker Script to complete before the AppleScript starts.
Once the AppleScript has control, it can call FileMaker Scripts, because AppleScript understands it has to wait for them to complete, before continuing execution.
So you need to look at the problem from the point of view of AppleScript, which is controlling FileMaker, rather than the other way round, which you are doing now.
I also politely suggest that you needed to make it clearer, earlier in this thread that most times you used the word 'Script', you were talking about AppleScript and not a FileMaker Script. Only by providing us all with unambiguous information, can we be expected to resolve your issues with the minimum number of exchanges.
Best wishes - Alan Stirling, London UK.
Alan ! Thanks !
Sorry about my terminolgy.
Yes i felt it something to do with ...
one can't GO unless one is STOP.
ok... so i am going outside FileMaker
when wanting to accomplish my routine
So i m on the wrong path ?
There seems specifically, "only two paths here" ?
And the first path is to get it to work all inside FileMaker
and forget AppleScript. i am not interested at this time
in getting invoved with source codes outside FileMaker:
so, sounds like i should forget using FileMakers AppleScript Do Script
step and find another way to RUN my scripts from FileMaker field.
Running all my IF Statements / scripts from field works of course outside
my Loop Structures.
After what you confirmed and at this time, i am still Teeter Tottering
which way to go ? if i incorporate using AppleScript then i should see
if i can find AppleScript code that can somehow break FileMakers
thread, do the script and simply return to where it left off in the thread ?
hummmm ... much to think about.
rob 'jesus Land Tidd' lewis
Structures From Silence — Earths Dynamic Air Waves Changes All
i think possibly this is some bad programming of FileMaker !
in which FileMaker should have better cooperation of handling / controlling Script Executions.
Employing the FileMaker controls for script stack management when launching scripts via buttons.
An argument accepted by the Perform Script [ ] button command controls the fate of any currently running script
when the new script begins, providing you with the option to halt, exit, resume, or pause the current script.
If FileMaker can have all this script management then also FileMaker
can better manage how to handle the execution of a AppleScript.
Manage Scripts provides a meta-command framework — a series of script commands that give you control
of the way other commands are executed. Using these process controls enables you to set up scripts
to repeat (that is, looping and recursion ) or to conditionally omit or insert sequences of commands within a process.
So i think .. theres a flaw here with FileMakers interaction with external code.
USING CONDITIONAL STATEMENTS
We always require our one main script to perform the same sequence of actions — consistently and uniformly.
However as our databases evolves we want more and more, set up, of scripts that take account of different circumstances and respond accordingly.
Personally i think FileMaker should very well consider "Loop Handlers" and "Idle Handlers !
And personally I think you should use black text and not produce repeated entire posts in obnoxious colors.
I also think you should at least learn what you are doing in FileMaker ( would requires a LOT more time and effort than you've given ) before you blast FileMaker for faults ( complete lack of understanding ) which YOU posses.
its hard for me to mark this as the Correct Answer
That's okay if you can't mark my post as the correct answer. Points do not ( and never have ) motivated me. In fact, sometimes speaking out is worth 1,000 MINUS points as in this case. ;-)
Who knew the Singularity would be FileMaker-based?
well .. i have to admit,
i do things entirely different
from the general stream.
my scripts in up in Value List.
When certain criteria and conditionals are met
then that value list for specific scripts are activated.
What do you mean ?
You actually had a Filemaker OSX script step called AppleScript Do Script perform, while from inside a loop without having to exit first ?
STRUCTURES FROM SILENCE --Earths Dynamic Airwaves Changes All
OK HERES A SUMMARY OF EVERYTHING IN THIS POST
i want to avoid IF Statement's.
My scripts names get set into a global as a list. i cycle through this list. In a Loop.
There's only one IF statement for activating any one of multiple scripts and that is .. IF i select one of the script names from the global field.
Filemaker script step, perform script does not allow you to run a script name that's in a field .
i want to say...
Perform script [ NAMEofFIELD ]
Filemakers script step AppleScript can do it using a calculated AppleScript ...
Perform script [ NAMEofFIELD ]
As long as the calculation formats it inside quotations.
But it's inside a Filemaker loop. And won't execute !!
i have to exit loop and complete the currently running script before Filemaker executes Her calculated AppleScript.
Literally months !!! Months stuck on this problem !!
Alan Stirling advice hits it right on the head !
FileMaker Pro is single threaded.
Your script is running in a loop, taking over so FileMaker's Calculated AppleScript can't respond.
Appears i shoud not be using FileMakers Calculated AppleScript Step. In order to stay in Loop.
i did find 360Works.com has a plugin called ScriptMaster.
ScriptMaster's 'Call Script Immediately' module will allow you to execute a script
based on the value in a field, and in combination with OnObjectModify
it will allow you to execute scripts without hardcoding script names.
Sounds like this may work !!
But my other option is to simply restructure my script sequences:
perform the AppleScript ( do the task)
return to Loop.
sorry i am so esoteric ... high above the normal main stream of things.
Fortunately i not have to relate to it cause i am retired.
my solution "The IAM PROGRAM NAVIGATION" concepts is a personal Homebase spiritual inspiration
i been working on over many years tired of Window and mouse navigations.
feel free to use or alter my files.
i only wish FileMaker would let you perform script ( FieldName ).
Robert, I agree that perform script by a calculation would be a nice feature. What I don't understand is why such an aversion to If statements. Instead of spending months on something that doesn't work, you could write a script in less than 5 minutes with one If statement and 13 Else If statements to make your solution work. You would also get the added benefit of using it on Macs, iPads and PCs instead of just Macs.
Thank you rGordon for this consideration.
why ? Because i use this in many other Loop sequences.
if I started using IF Statements in one area then have to apply
it in all my other areas. Yea there's always the call to use
IF Statements where they are needed for one shot areas but
when multiple lines of IF Statements are called for and in many
areas then another approach is needed . Thanks