Page 1 of 1

Select specific file on startup

Posted: 24 Aug 2009, 21:44
by jeffr
We are using freestyler to manage lights in our meeting hall. I have several different users each with their own location file. It appears that what ever location file is selected when the program is closed will be the location for anyone who opens the program next. I have setup a shortcut in the startup folder of that user. I have a location with the lights setup the way I want. The idea is to automate it enough so that a person would only need to login and the lights would activate for their needs. The shortcut is set up like this by default:
"C:\Program Files\FreeStyler\FreeStyler512.exe"

Is their a way to add a variable/parameter similar to something like this:
"C:\Program Files\FreeStyler\FreeStyler512.exe" /F=jeff-test.flf --- Or something similar?

Re: Select specific file on startup

Posted: 25 Aug 2009, 12:02
by remco_k
Not that I know of.

Maybe another way to get te result what you need. Might not be as pretty, but it will work:

Say you have 3 locations, each have a different .flf file, something like this:
c:\jeffrs_docs\location1.flf
c:\jeffrs_docs\location2.flf
c:\jeffrs_docs\location3.flf

Create a batch file wich takes a path and filename parameter and makes a copy of the needed file to a fixed destination:

Code: Select all

REM Echo the parameter (filename) on screen, just for debugging purposes
@echo Parameter: %1
REM Copy the file to current_session.flf
copy %1 c:\jeffrs_docs\current_session.flf
REM Start FreeStyler
"C:\Program Files\FreeStyler\FreeStyler512.exe"
(Rules starting with REM are just comments, you may leave them out).

Now make 3 shortcuts on your desktop to the batch file:
1. "c:\somepath\startFS.bat" c:\jeffrs_docs\location1.flf
2. "c:\somepath\startFS.bat" c:\jeffrs_docs\location2.flf
3. "c:\somepath\startFS.bat" c:\jeffrs_docs\location3.flf

Now you can start one of those shortcuts. FreeStyler will start with the last open flf.
Just the first time you'll have to manually load the c:\jeffrs_docs\current_session.flf file.
Close FreeStyler.

And then restart using one of the shortcuts again. This should work now. I hope. Did'nt test it.

Keep in mind that everytime a user starts FreeStyler, that the current_session.flf gets overwritten by one of the 3 location files.
So if a user saves changes to the current_session.flf, they will get lost when restarting.
Under some cirumstances this could become handy.

Another way to start FreeStyler with different flf files is using a windows macro recorder. Maybe this option is even better, because changes are saved to the original file then.

Re: Select specific file on startup

Posted: 01 Sep 2009, 09:50
by remco_k
And? Did it work out?