vbscript

VBScript Download flag SVG files from a website

Visual Basic Script Here is a VBScript script to download flag SVG files from a website and save them in a directory Set xml = CreateObject(“MSXML2.ServerXMLHTTP.6.0”) Set fso = CreateObject(“Scripting.FileSystemObject”) Set shell = CreateObject(“WScript.Shell”) urlTemplate = “https://commons.wikimedia.org/wiki/Special:FilePath/Flag_of_{country}.svg” outputFolder = shell.CurrentDirectory & “\flags” countries = Array(“Afghanistan”, “Albania”, “Andorra”, “Angola”, “Antigua and Barbuda”, “Argentina”, “Aruba”, _ “Bahamas”, […]

VBScript Download flag SVG files from a website Read More »

VTW Color Picker

Script Dim PosX, PosY Dim colorPicker Sub ImageMouseDown(Sender, Button, Shift, X, Y) PosX = X PosY = Y End sub Sub ImageOnClick(Sender) colorPicker = Sender.Canvas.Pixels(PosX, PosY) txtCCColor.Text = ConvertToCColor(colorPicker) txtRGBColor.Text = ConvertToRgb(colorPicker) txtRGBColor.Color = colorPicker txtCCColor.Color = colorPicker End sub Function ConvertToRgb(color) Dim red, green, blue, temp temp = color red = temp Mod &H100

VTW Color Picker Read More »

VTW Color Chart Selector

Script Sub InitForm loadColors() End Sub Class ColorsObj Public codeColor Public hexaColor Public rgbColor Public vtwColor End Class Dim arrColors() EmptyArray() Sub EmptyArray() ReDim arrColors(0) Set sObj = new ColorsObj sObj.codeColor = “” sObj.hexaColor = “” sObj.rgbColor = “” sObj.vtwColor = “” Set arrColors(0) = sObj End sub Sub loadColors() Erase arrColors Set XMLColors =

VTW Color Chart Selector Read More »

VTW Color Dialog Picker

Script Sub BtnColorsClick(Sender) If ColorDialog1.Execute then temp = ColorDialog1.Color red = temp Mod &H100 temp = temp \ &H100 green = temp Mod &H100 temp = temp \ &H100 blue = temp Mod &H100 rvb.Text = red & ” ” & green & ” ” & blue rvb01.Text = red/255 & ” ” & green/255

VTW Color Dialog Picker Read More »

Vizrt Set x and y coordinates to .txt file

dim x, y as Integer sub OnInitParameters() RegisterPushButton(“action”, “Get Childs position x y”, 1) end sub sub OnExecAction(buttonId As Integer) dim n As Integer dim StreamText as String dim TextPath as String = “<full path of .txt file>” for n = 1 To this.ChildContainerCount dim c as Container = this.GetChildContainerByIndex(n-1) c.GetScreenPositionOrtho(x, y) StreamText &= x

Vizrt Set x and y coordinates to .txt file Read More »

Vizrt Get x and y coordinates from .txt file

Dim NewCont As Container = this.PreviousContainer Dim filePath = “<full path of .txt file>” Dim text As String Dim i, xpos, ypos As Integer this.DeleteChildren() if System.LoadTextFile(filePath, text) then Dim lines As Array[String] Dim coord As Array[String] text.trim() text.split(Chr(10), lines) Dim cont As Container for i=lines.LBound to lines.UBound lines[i].Split(“;”, coord) ‘println CDbl(coord[0]) ‘println CDbl(coord[1]) xpos

Vizrt Get x and y coordinates from .txt file Read More »

Shopping Cart