I have been working on a method for my team and I would like to enhance it by adding a user interface (UI) element. The UI has options for selecting certain settings and adding files.
I have already created the HTML part of the UI, but I am unsure how to link it to the backend functionality. Specifically, I want the method to start when the user clicks the “Start” button and abort when the “Abort” button is clicked. However, I am not sure which variables or parameters need to be passed in order to make this happen.
I would appreciate any guidance or assistance you can provide in connecting the frontend UI to the backend functionality. Thank you.
See this post. I have attached a link to download the UI. You can edit it as you wish.
Also, I have a picture named “BFXNAME” that will export the variable to Biomke.
Regarding the “Start” and “Abort” buttons, ensure the functions in the HTML code (JavaScript) are written correctly.
If you edit the attached UI, it should work fine for you. If not, just send me the link to your UI, and I will edit it and send it back to you
If you have a constant folder that you always choose the file from, there is another alternative I like to work with.
You can replace the “Choose File” button with a text input field. This way, the user can write only the name of the file (or scan the plate barcode if it’s the same as the file name).
Then, on Biomek, add this script:
Option Explicit
Dim FileLoc
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject") ' Initialize FileSystemObject
FileLoc = "C:\Users\Public\Documents\LF Inputs\Transfection\ExportFile\" & BRC1 & ".csv"
' The global variable is being set to the file location
If Not objFSO.FileExists(FileLoc) Then
' Displaying an error message and aborting the activity if the file doesn't exist
World.Globals.PauseGenerator.btnPromptUser "Please check the Input File " & BRC1, Array("Abort"), "Abort"
World.Globals.ErrorGenerator.AbortRun 0, "LeftPod", True ' Assuming LeftPod is a correct parameter
Else
World.Globals.PropertyChanger.SetGlobal "FileLoc", FileLoc
End If
Set objFSO = Nothing ' Release the object
In the previous post, I have attached a download link. It contains VBScript code and HTML for the UI. You do not need to modify the VBScript code; you only need to edit the HTML and JavaScript code.
Hi thank you so much for this!
Any idea where I can find this document, this would help a lot for all the scripting we have been trying to implement in our lab.