Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6972 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Having only recently started to use custom functions the impossibility (as far as I know) of moving a CF from one database to another becomes irritating. So I have put together a custom function database together with an external script which allows those with Filemaker Pro 8 Advanced and Windows the opportunity to construct a library of CFs with the possibility of transferring a CF into any other FP database with a minimum of effort.

This is a first effort and please use it, extend and improve it as you wish.

The attachment consists of four files. CFList,fp7, a database into which you can place the definitions of your custom functions, there is a limit of 5 parameters but that is easily lifted; TestCFPaste.fp7 a file to practice on before committing to your own files; a compiled AutoIt script OpenCFDialog.exe and the source of that script OpenCFDialog.au3. When you unzip it it is easiest if you put the complied script into the root of your hard drive and then edit its location in SendEvent in the one and only script Transfer.

I make no guarantees with this set what's the phrase "use at your own risk"

CFList.zip

Posted

Unfortunately I have never used 7 Dev. However, it should be easy to make changes (if any) to the AutoIt script which directly manipulates Filemaker Pro by keyboard simulation.

I've put the script below with descriptions of what it is doing at each step. These may need to be changed to fit 7 Dev's dialog boxes.

AutoItSetOption("WinTitleMatchMode",2) //set to match words in window titles

WinActivate($CmdLine[1]) //Make active Filemaker window (with the window to which the CF is going)

Send("!FDC") // Alt-F D C opens File>Define>Cu stom functions via keyboard (underlined) shortcuts

Send("{ENTER}") // activates the New Custom Function dialog box

WinWaitActive("Edit") //Waits for Edit to appear in the Window title

Send($CmdLine[2]) // Sends the name of the CF to the first edit box

Send("{TAB}") // then tabs to the next -parameters

For $i = 4 to $CmdLine[3] Step 1 //Adds the parameters one by one

Send($CmdLine[$i])

Send("{ENTER}")

Next

Send("{TAB 2}") // two tabs to the main definition edit box

Send("^v") //drop the clipboard into that box

Send("!a{TAB}{ENTER}") //Close the edit box

Send("{TAB}{ENTER}") // Close the Custom Function box

Of course, if changes have to be made then you will have to download AutoIt v3 (free) to redo the compiling.

This topic is 6972 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.