December 13, 200421 yr Newbies FM 6 would default to *.usr when using export script in runtime solution Now you are offered tab as the first option and have to scroll to the last selection before you are offered usr. potentially confusing for users. is there any way of forcing usr to be offered.also would be nice to create automatic backup on desktop unfortuantley filemaker does not let you specify desktop current user as option. I suppose vb scripting might do it but that is beyond me! there are some commercial solutions (like fm exporter, but these are expensive and my solution is free, users donate to charity any help would be great
December 13, 200421 yr Why don't you script the whole export? That way you can hard code the format and the location. Then use a simple one-line command line to move the file from the hard coded location to where you want it to be.
December 13, 200421 yr Author Newbies thankyou I know hard to hard script for instance to C:/backup.usr not sure how you can then make filemaker send a command to copy this to desktop sorry to be thick
December 14, 200421 yr In a filemaker Send Message (or Send Event in 7) script step, add the following text to be sent: cmd /c move /y c:backup.usr %userprofile%desktopmyFile.usr This will move (and if you want, rename) the file to the current user's desktop. Note that this whole syntax can be calculated in a field or through a script if you need it to be dynamic. The source of the Send Event can either be hard coded text like above or taken from the value of a field. Breakdown of the syntax: 'cmd /c' calls the Windows command interpreter and tells it to quit when the command is done. For best results, uncheck the 'bring target application to the foreground' option in the Send Event script step. This will make sure the black 'dos' box does not come to the foreground while the command is being executed. 'move /y' explains itself. The 'y' switch is to automatically answers yes to overwrite an existing file on the desktop if there is one '%userprofile%' is a Windows environment variable that holds the path to where the user's settings and special folders are, including the desktop.
December 15, 200421 yr Author Newbies FANTASTIC i HAVE BEEN STRUGGLING TO MAKE THIS SCRIPT WORK hAVE NEARLY got your solution.....but not quite! A great help, you are very kind rob
Create an account or sign in to comment