As far as I know, you can't click another button while a script is running. (you can if it is paused, but that's not the case here.)
You can abort the scritp by pressing the esc (Windows) or Command-Period (mac) as long as the script does not disable user aborts.
You could also probably use Get ( ModifierKeys ) inside your script to check for whether a specific modifier key such as shift, ctrl, caps lock, etc. is down and use that to halt your script.
This is what I have begun to suspect. (sigh) The script is running slow as it is.
As I am on a Macintosh ... the Command - Period keystroke can not cleanly work because it stops the script the moment it is struck on the keyboard. At times this produces a unfinished record. In turn it takes a few minutes to do the clean up from that type of abort. I am hoping to find a means to do a clean abort during the run process.
I have not used the Get(modifierkeys) function. What is the philosophy behind that function and how might i impliment the logic on that in this situation?
If you have a loop in your script, you can put it inside an If step to test to see if a specific modifier key is down. If it is, then your script can gracefully halt the script as you are now halting your script in a known spot in your code. This then is much like your original idea for testing a variable, but insided you're checking for a specific key being held down.
FileMakerPro Aavanced 10 does not have the Get(modifierkeys) function but it does have the Get(AllowAbortState). I am wondering if the later function might be implimented somehow to get a similar effect? Anyone have any ideas?
Addeneum: just noticed your rssponse above about the Get(ModifierKeys) function. I would guess that would do the trick; I do have loops all over the place in the scripts (he he he he). The Get(modifierKeys) fucntion seems to be new to FMA11 (sigh).
Peter Kelley, St. Paul, MN USA
Silly mistake on my part. The function is named: Get(ActiveModifierKeys)
I was testing this
I held down the Shift Key till it looped enough
Set Variable [ $n; Value:1 ]
Set Variable [ $n1; Value:1 ]
If [ Get ( ActiveModifierKeys ) = 1 ]
Show Custom Dialog [ Title: "Stop"; Message: "You have successfully stopped the script"; Buttons: “OK”, “Cancel” ]
Exit Script [ ]
Go to Layout [ “Visual Aids” (Visual Aids) ]
Set Variable [ $n; Value:$n + 1 ]
Set Variable [ $n1; Value:$n1 + 1 ]
Exit Loop If [ $n1 > 1000000 ]
Set Field [ Visual Aids::Helptext; "Endloop - " & $n ]
YES YES the function Get(ActiveModifierKeys) does exist in FMAdv10!
... and the Get(ActiveModifierKeys) = 2 is the shift (I think I remember quickly reading)
... and in theory if an "IF" statemen were added to look for this conditon then
... an controlled Abort could occur.
I think this ought to work! If any one has any last comments now is the time say them - before I blow up my Mac Mini!
What an awsome thought.
St, Paul, MN USA
P.S. (blink) you mean FM now is in a Windows flavor?
Now in windows flavor?
FileMaker has been a dual platform application for many many years. One of it's main selling points is that you can move files from one system to the other and they (most always) will work with little or no modification.
I must have missed an annouchment along the way about FM being available in WIndows format.
(smirk) now I can have MORE fun!
And on that note the "The Mystery of the Unresponsive Button ..." has been solved and working well I might add.
Stay tuned for the next thrilling installment of Coder's Complex ...
St. Paul, MN USA