Elipse Knowledgebase

View Articles by Category

There are no sub categories
Add an article to this category

Category » Scriptsrss button

(Page 1 of 13)      Prev | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Next

There were 249 articles found in this category:

  1. questionKB-32203: Window for file selection and execution
    Question: How can I open a window to select and execute a file from the HD? Solution: To do so, use Viewer's (Application) ShowFilePicker method, and create the following script in a button on screen: Application.ShowFilePicker True, application Application.ExecuteExternalApp aplicativo, "", "", ...
  2. questionKB-15050: Activating Windows Script Debugger
    Question: How can I activate Windows Script Debugger? Solution: Scripts can be debugged in E3 both in the server and in the Viewer. To do so, you must install the Microsoft Script Debugger and enable “Just-in-time Debugger” by setting 1 as the value of two keys on the REGEDIT: - HKEY_CURRENT_USE ...
  3. questionKB-32715: Script error message not displayed
    Question: How can I set up the script error messages not to be displayed on screen? Solution: To do so, use On Error Resume Next command at the beginning of the script. There are examples of this use in E3's Scripts Manual. However, it is import to highlight that the error is not fixed - it will ...
  4. questionKB-38309: Adding columns to the ListBox object
    Question: Can I add columns to the ListBox object? Solution: Yes, you can. For example: Screen.Item("ListBox1").ColumnCount = 3 Screen.Item("ListBox1").Clear() Screen.Item("ListBox1").AddItem "Row 1, Col 1" Screen.Item("ListBox1").List(0, 1) = "Row 1, Col 2" Screen.Item("ListBox1").List(0, 2) = ...
  5. questionKB-32656: User name and user group retrieval via scripts
    Question: How can I retrieve, via scripts, both user name and user group to which this user belongs? Solution: To do so, you can use Viewer's User property to capture the name of the user currently logged in, and IsUserMemberOfGroup method to return True if the logged in user belongs to the grou ...
  6. questionKB-32611: Creating a Modal Screen
    Question: How can I create modal screens? Solution: There are two possible ways to create modal screens in your project: 1 - Viewer's DoModal method; or 2 - Open Modal Screen pick on Scripts tab in any E3 object.
  7. questionKB-32719: Extracting characters from the left or from the right with VBScript
    Question: How can I extract a certain amount of characters from a script's left or right? Should I use VBScript's Mid function, or is there another way? Solution: There is no need to use Mid function for this: VBScript has two functions, called Left and Right, which are responsible for extractin ...
  8. questionKB-32594: External application
    Question: How can I execute an application that is external to E3? Solution: To do so, use Viewer's ExecuteExternalApp method.
  9. questionExtracting ZIP files via scripts
    Question: Can I extract a ZIP file via scripts? Solution: Yes, you can. For example: 'ZIP file to be extracted: pathToZipFile="C:\Folder1\MyZIPfile.zip" 'Folder of destination: extractTo="C:\Folder2\" 'Tests if the file exists set fso2 = CreateObject("Scripting.FileSystemObject") if fso2.FileEx ...
  10. questionReturning items sorted alphabetically
    Question: On an application, a script is used to return all objects that are in a data folder. For example: For each obj in Application.GetObject("Data") MsgBox obj.name Next Why are the items not returned in alphabetical order when executing this script? Question: This happens because whe ...
  11. questionKB-38178: Closing a computer's process via E3
    Question: Can I close a computer's process via E3? Solution: To do so, you must write a script. For example: ProcessName = "notepad.exe" PID = 2536 Set service = GetObject("winmgmts:\\.\root\cimv2") 'Closes the process via PID (Process ID) 'Set results = service.ExecQuery(" Select * from Win32_P ...
  12. questionAccessing all tags of a Driver
    Question: How can I access all tags of a Driver if it has several subfolders? Solution: To do so, you must write a script using recursion. For example: Sub CommandButton1_Click() set Driver = Application.GetObject("DriverModbus") FuncRecursion(Driver) End Sub Sub FuncRecursion(folder) ...
  13. questionKB-28054: Changing the initial screen by scripts
    Question: How can I change the initial screen or frame by scripts? And how can I set the Frame1 name if it is in a folder named Screens? Solution: To change the initial screen, you must edit the Viewer object's InitialScreen property in the desired event. To set the Frame1 name, write the follo ...
  14. questionKB-32674: Compacting an Access database
    Question: Why do Access files not reduce their sizes after its records are deleted? Is there another way to make them release this space? Solution: This is Access' normal behavior. When records are deleted, file size remains the same. So, it is necessary to compact the database, which can be don ...
  15. questionKB-37197: Creating options to a filter by date on the E3Browser
    Question: How can I make it possible for the user to set an initial and final date to a Query's filter on the E3Browser? Solution: To do so, you must insert two SetPoints on screen, and write the following script in their Click() events: ' Calls the Calendar function PosX = Screen.ToPixelX(X) Po ...
  16. questionKB-36903: Using Set command to increase a script's performance
    Question: How does the Set command help to increase a script's performance? Solution: In addition to improving the organization and making it easier to analyze scripts, the Set command optimizes the script's performance by avoiding the frequent use of the GetObject() and Item() methods, which pe ...
  17. questionKB-26956: Splitting DWord tags
    Question: How can I split DWord tags received by an OPC driver to individually access each word or byte? Solution: To do so, we recommend that you split the tags directly in the CLP, because on E3, you must repeat the process for each tag. So, on E3, you must create Internal Tags to receive each ...
  18. questionKB-27284: Starting a SetPoint with the current time
    Question: How can I configure a SetPoint to be opened with the current time? Solution: To do so, you must create a script in the SetPoint's OnStartRunning event and insert the following line: Value = now.
  19. questionKB-26887: Opening a pop-up screen that does not keep focus
    Question: How can I open a pop-up screen that does not keep focus? Solution: To do so, you must use the following method to call the screen: Application.GetFrame("test").OpenScreen("PopUpScreen"), 0 The test parameter must be any text, in order to open a new frame. To set the screen's size, yo ...
  20. questionKB-26730: Message Box on E3
    Question: How can I create a message box on E3? How can I configure a certain screen to be closed according to what is returned by the message box? Solution: The easiest way to create a message box is by using the VBScript's MsgBox method on an E3's event. You must set the buttons parameters acc ...
(Page 1 of 13)      Prev | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Next