May 17, 200619 yr Hi: I have a script that reads a folder of images and then creates a text file containing the image name information. That file is then imported into a table. That table is used to create a dynamic value list that the user can select from via a drop down menu on the main table. Question is how will the script know when the text file is finished before importing that file. The folder can contain varying amounts of images. Hence the need for a dynamic value list. Right now I have put a pause with a duration of 4 seconds. But depending on the anount of files the command line can take a longer or shorter duration to read the folder. Send Event [open document/application: "cmd /c dir b/ Z: > outputfile.txt"] Pause Resume Script [Duration (seconds):4] Perform Script ["Import Image Info"] Go to Layout ["MainLayout"] Commit Records/Requests [No dialog] Note: Thanks to Wim Decorte for the command line script
May 17, 200619 yr You could use the free Shell Plugin to execute the command line and the script will wait till the command is complete. No pause required.
May 17, 200619 yr Or check out the VBscript plugin at http://grokittools.com. With using a VBscript and that plugin you could return the list directly back to a FM field without having to import at all. The demo file for the VBscript includes an example of just that.
May 17, 200619 yr Before anyone accuses me of pushing my own products A VBscript approach without the plugin would work too (but would be a lot more complex). Your FM script would stop right after executing the VBScript, the VBscript would need to include code to call the import script (using the FM activeX interface). That would solve the timing issue.
May 17, 200619 yr I am certain that the VBScript Plugin has considerably more power, and I hope to give it a try soon... but for the record, the Shell plugin will also return the text to a field without import. One consideration the user must take into account is that the return in Shell plugin is limited to 64k. I expect that is not the case with the VBScript Plug.
Create an account or sign in to comment