September 25, 200322 yr Is it possible to run a script in the background? Like constantly looping waiting for an event to occur?
September 26, 200322 yr Author A file showing up in a folder. I tried taking my KICKER script and incorporating it into the CHART file but since it loops constantly waiting for a file to show up in the folder, it locks everything else up.
September 26, 200322 yr I don't know how FMP can tell if a file exists in a folder, but the general principle would be: Loop Exit Loop If [file exists] End Loop This scrip will loop around at an enormous, CPU-hogging speed so it might be wise to put a pause in there... Loop Exit Loop If [file exists] Pause/Resume Script [1 sec] End Loop Do you know that FMP is single threaded? While this script it looping aound you won't be able to do anything else in FMP, even in another database.
September 26, 200322 yr Author That was what I figured. So I have to either put long pauses in the script or keep it away from the main application. Oh, and the way it works for the file is to attempt to IMPORT the file. If there is an error it starts over otherwise it sends control to another script.
September 26, 200322 yr You could probably do this with applescript or winbatch depending on your platform.
September 29, 200322 yr Author I am trying to do an interface with winbatch and Cold Fusion. I will let CF detect the incoming file and then have it call a bat file that starts a FM script that calls the export scritp. whew. The only reason I am going that meandering route is because I want it all on the same machine. And I can't get the FM script to actually call the external script for some reason when it is on FMS. It works great when everything is in FMP but I put the main app back onto FMS and it stops working.
September 29, 200322 yr Are you running FMP on the FM Server? The server does nothing more than manage the databases. You need to be running a client on a separate machine to interface with the dbs. This could explain some of your problems that have been incomprehensible to us thus far.
September 30, 200322 yr Author No, I have a small exe app that opens the DBs as guests on the client machines. That works fine for the most part. I still can't get another client app to execute an external script on the FMS app tho. That is all part of this. I see the biggest part of getting FM down is understanding how the db/files communicate and work together. Like each client opening the dbs as guests. Now these guest dbs must communicate with the main db otherwise data would be corrupted left and right. This dawned on me during the discussion about session management. Each client is given a "marker" when it opens up and that is kept on the client and passed to the server db whenever anything is done. The server keeps track of what each client is doing in this way. Nobody could explain that, so I had to figure it out on my own.
September 30, 200322 yr What type of exe app and what is it doing? Again, no scripts run on the server; they are client-based. Therefore any exe's running should be client-based.
September 30, 200322 yr Author The exe was created by the FM3.0 SDK. It is all messed up but the people paying my salary don't want me to fix it since "everyone is used to it" after 5 years.
Create an account or sign in to comment