October 23, 200520 yr 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
October 24, 200520 yr Author 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.
Create an account or sign in to comment