User Tools

Site Tools


scripting_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting_examples [2024/09/22 13:18] – [Changes the font colour of a specific text field depending on a numerical value (SetTextColour)] peteraelligscripting_examples [2024/10/04 09:27] (current) – [Fetches the color of a shape from a GTtitle and then performs an action based on the color] peteraellig
Line 776: Line 776:
  
     ' depending on a value, it changes the color of the text     ' depending on a value, it changes the color of the text
 +    ' you can use any logical funktion like:
 +    ' If numericvalue < 10 Then
 +    ' If numericvalue > 10 Then
 +    ' If numericvalue < 100 Or numericvalue > 200 Then (all from 100 to 199)
 +    ' If numericvalue Mod 2 = 0 Then  (only even number)
 +    ' If numericvalue Mod 10 = 0 Then (only 10,20,30....)
 +    ' etc....
 +    
     If numericvalue = 10 Then     If numericvalue = 10 Then
         API.Function("SetTextColour", Input:="Title 0- The Classic Blue.gtzip", Value:="#FF0000", SelectedName:="Description.Text")         API.Function("SetTextColour", Input:="Title 0- The Classic Blue.gtzip", Value:="#FF0000", SelectedName:="Description.Text")
Line 813: Line 821:
  
 This is a script that shows how to read the color of a shape from a title and then perform an action based on the color. The script must be started and runs in the background as a loop.  This is a script that shows how to read the color of a shape from a title and then perform an action based on the color. The script must be started and runs in the background as a loop. 
-the title used in the example can be downloaded {{ ::textshape.gtzip |here}}. +the title used in the example can be downloaded {{ ::textshape.gtzip |here}}.\\ 
-{{:gsc3.jpg?200|}}\\+{{:gsc3.jpg?600|}}\\
  
 gets the color value of a shape in a gtzip-title:\\ gets the color value of a shape in a gtzip-title:\\
scripting_examples.1727003927.txt.gz · Last modified: by peteraellig

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki