GUI Initialization Automation
This is instructions on creating a file that will open multiple GUIs and place them around the screen (NOTE: these instructions were made with only the Windows OS in mind).
Start by opening up a new note in the notepad application
Ensure LVstarter.vi is running
Open Master Control and choose the experiment that will hold devices for desired GUIs
The structure of a batch file is fairly simple. Prefix + Application File Path + Pixel Coordinates. A file can have multiple lines, meaning multiple file opens. Each line will follow the same ingredients and structure.
Prefix:
Every line will start with this: start /min cmd /c
Application File Path:
This requires opening the device GUI up in Master Control
The system command to open the GUI will be recorded in the LVstarter window
LVstarter has three output textboxes, but we only care about the one labeled 'Command Array', which should be last box on the application window.
The command text will be updated when a new application is run on the computer
Will look something like this:
"N:\Software\GEECS\Active Version\builds\Interface builds\General GUIs\Device GUIs\GUI_Cameras\GUI_Cameras.exe" -- CAM-LT-Preamp 25 75
Copy and paste this line in the space following the prefix mentioned above.
Pixel Coordinates:
This step is less necessary. The line copied from LVstarter contains the pixel location on the screen in which the GUI will open to
In the example, it's the two numbers at the end ("25 75")
If this isn't updated, then every application called out in the batch file will all open on top of one another in the same screen location, meaning the user will need to rearrange the screen to their desired orientation.
The screen organization can be decided in the batch file, however
While there's not an easy non-third party software way to find the pixel coordinates on a screen (that I've so far discovered) but we do have an old plotter software that does show pixel coordinates.
Can be found on N drive at this location: "N:\Software\GEECS\batch files\192_168_14_15 tony\StartupMCplotter.bat"
Run batch file and navigate to 'setup' tab. The 'Screen Position' textboxes should update when the GUI is moved around the screen with the new coordinates of the top left corner
Save notepad textfile as "[YOURFILENAME].bat". The file extension is a critical step here to ensure the file type is a batch file. Save to whichever favorable file folder location and run to ensure GUIs open up as desired.
Congratulate yourself on a job well done!