UI Scripting of FileMaker [reply to Nov 20, 2003 post]
UI Scripting of FileMaker [reply to Nov 20, 2003 post]
- Subject: UI Scripting of FileMaker [reply to Nov 20, 2003 post]
- From: Steven Sanders <email@hidden>
- Date: Sun, 30 Nov 2003 23:26:22 -0700
I have a method to type into FMP. I haven't tried it with dialog boxes
but I can enter ScriptMaker and goto a particular Script.
I would presume that it could be extend to quickly going to a
field definition. I attach the Script to a QuicKeys sequence to
store & recall which Script I want to visit.
You need to buy "Extra Suites for $10:
http://www.kanzu.com
email@hidden
I think you could do a lot of what OneClick did for OS9 however
I think timing won't be as nice.
The following Script is a snipet of what I use.
To try it, just set "showScript" to the name of a Script you have in
the
frontmost FMP database. Run the Script & it will:
1. Open ScriptMaker...
2. Go to the script with the text in showScript
3. Open the script.
You can automate this. I have another Script which stores to into a
file -
DB Name & Script name. The the full script of below shows me
a list of the last 20 Scripts I have visited to choose from.
The FMP UI is is timing-dependent, so you might have to adjust the
delay before the "enter" command.
It is important to have this be stored as an application because
it must type while FMP is in ScriptMaker and AppleScript
will hang if originates via FMP's "Perform AppleScript"
If anyone has further interest, please respond & I'll post both Scripts.
-- This is the name of YOUR Script
set showScript to "10 Set Globals"
-- FMP Menu: ScriptMaker
if my FMP_Wont_Activate() then return
try
with timeout of 1 second
-- FMP WILL NOT FINISH THIS STEP -- MUST TIME-OUT
tell application "FileMaker Pro"
activate -- FMP must be activate to do the script
do menu menu item "ScriptMaker" of menu "Scripts"
end tell
end timeout
end try
set wont_type_char to "" -- this needs to be typed as
'option-*' ????
set theOffset to offset of wont_type_char in showScript
set tempLength to length of showScript
if theOffset > 0 then
set showScript to text from character 1 to (theOffset - 1) of
showScript
-- display dialog showScript
end if
--delay 1
tell application "Extra Suites" to type key "tab"
--delay 1
--beep
if showScript = "" then return
tell application "Extra Suites" to type string showScript
delay 1
--beep 2
-- Put in here tab, copy to clipboard, compare to what it
should be; if error -- goto next script & type again?
--tell application "Extra Suites" to type key "return"
tell application "Extra Suites" to type key "enter" -- THIS NEVER
EXECUTES ANYMORE
on FMP_Wont_Activate()
return false
-- if FMP is busy, this allows Script to abort
-- Assumption: FMP is in 'Define Scripts'
-- Without this, Script will hang & QuicKeys needs to reboot
-- the ONLY solution around it would be to use a Dameon that stays
open & stores its own local variable.
-- Here, QuicKeys must jump to Browse Mode before activating this.
try
with timeout of FMP_wait_time seconds
tell application "FileMaker Pro"
activate
end tell
end timeout
on error
beep 2
return true
end try
return false
end FMP_Wont_Activate
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.