Skip to content

Latest commit

 

History

History
194 lines (169 loc) · 13 KB

README.md

File metadata and controls

194 lines (169 loc) · 13 KB

Script Interface Controls

Interface Controls allow you to dynamically interact with a script.

Controls must be placed in one or more dedicated interface [Sections] and cannot be mixed with other commands.

Controls

The following control types are support by PEBakery.

Click on the control's name in the table below for details on each control.

ID Name Description
0 Text Box An input box that accepts a single line of text.
1 Text Label Displays a line of text.
2 Number Box An input box that accepts a number between a given minimum and maximum range.
3 Check Box A box that can be "checked" or "unchecked".
4 Combo Box A drop-down list allowing you to select a single value.
5 Image Displays an image embedded within the script.
6 Text File Displays a text file embedded within the script.
8 Button A simple button that can be used to run a section of code within the script.
10 Web Label A hyperlink that will open a webpage in the default browser.
11 Radio Button A circular button that can have only one radio button selected on the interface at a time.
12 Bevel A rectangular frame used to organize controls.
13 File Box An input box with a browse button that allows you to select a file or directory.
14 Radio Group A group of radio buttons. Only one radio button per group may be selected at a time.

Remarks

Z-Index: PEBakery draws controls in the order they are defined in the interface section. Controls defined further down the section have a greater stack order and are always placed in front of controls with a lower stack order.

Related

AddInterface, RefreshInterface, ReadInterface, WriteInterface

Examples

Example 1

The following script shows examples of each control.

[main]
Title=Interface Controls
Description=Interface Controls Example
Author=Homes32
Level=5
Version=1

[variables]

[process]

[ShowSelectedControl]
System,Cursor,Wait
Run,%ScriptFile%,HideEverything
If,%RG_SelectControl%,Equal,0,WriteInterface,Visible,%ScriptFile%,Interface,TextBox1,True
If,%RG_SelectControl%,Equal,1,Begin
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel1,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel2,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel3,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel4,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel5,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel6,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel7,True
End
If,%RG_SelectControl%,Equal,2,Begin
  WriteInterface,Visible,%ScriptFile%,Interface,NumberBox1,True
  WriteInterface,Visible,%ScriptFile%,Interface,NumberBox2,True
End
If,%RG_SelectControl%,Equal,3,WriteInterface,Visible,%ScriptFile%,Interface,CheckBox1,True
If,%RG_SelectControl%,Equal,4,WriteInterface,Visible,%ScriptFile%,Interface,ComboBox1,True
If,%RG_SelectControl%,Equal,5,WriteInterface,Visible,%ScriptFile%,Interface,Image1,True
If,%RG_SelectControl%,Equal,6,WriteInterface,Visible,%ScriptFile%,Interface,TextFile1,True
If,%RG_SelectControl%,Equal,7,Begin
  WriteInterface,Visible,%ScriptFile%,Interface,Button1,True
  WriteInterface,Visible,%ScriptFile%,Interface,Button2,True
End
If,%RG_SelectControl%,Equal,8,WriteInterface,Visible,%ScriptFile%,Interface,WebLabel1,True
If,%RG_SelectControl%,Equal,9,Begin
  WriteInterface,Visible,%ScriptFile%,Interface,RadioButton1,True
  WriteInterface,Visible,%ScriptFile%,Interface,RadioButton2,True
  WriteInterface,Visible,%ScriptFile%,Interface,RadioButton3,True
End
If,%RG_SelectControl%,Equal,10,WriteInterface,Visible,%ScriptFile%,Interface,Bevel2,True
If,%RG_SelectControl%,Equal,11,Begin
  WriteInterface,Visible,%ScriptFile%,Interface,FileBox1,True
  WriteInterface,Visible,%ScriptFile%,Interface,FileBox2,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel6,True
  WriteInterface,Visible,%ScriptFile%,Interface,TextLabel7,True
End
If,%RG_SelectControl%,Equal,12,WriteInterface,Visible,%ScriptFile%,Interface,RadioGroup1,True
If,%RG_SelectControl%,Equal,13,Run,%ScriptFile%,ShowEverything
System,Cursor,Normal

[HideEverything]
WriteInterface,Visible,%ScriptFile%,Interface,TextBox1,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel1,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel2,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel3,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel4,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel5,False
WriteInterface,Visible,%ScriptFile%,Interface,NumberBox1,False
WriteInterface,Visible,%ScriptFile%,Interface,NumberBox2,False
WriteInterface,Visible,%ScriptFile%,Interface,CheckBox1,False
WriteInterface,Visible,%ScriptFile%,Interface,ComboBox1,False
WriteInterface,Visible,%ScriptFile%,Interface,Image1,False
WriteInterface,Visible,%ScriptFile%,Interface,TextFile1,False
WriteInterface,Visible,%ScriptFile%,Interface,Button1,False
WriteInterface,Visible,%ScriptFile%,Interface,Button2,False
WriteInterface,Visible,%ScriptFile%,Interface,WebLabel1,False
WriteInterface,Visible,%ScriptFile%,Interface,RadioButton1,False
WriteInterface,Visible,%ScriptFile%,Interface,RadioButton2,False
WriteInterface,Visible,%ScriptFile%,Interface,RadioButton3,False
WriteInterface,Visible,%ScriptFile%,Interface,Bevel2,False
WriteInterface,Visible,%ScriptFile%,Interface,FileBox1,False
WriteInterface,Visible,%ScriptFile%,Interface,FileBox2,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel6,False
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel7,False
WriteInterface,Visible,%ScriptFile%,Interface,RadioGroup1,False

[ShowEverything]
WriteInterface,Visible,%ScriptFile%,Interface,TextBox1,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel1,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel2,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel3,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel4,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel5,True
WriteInterface,Visible,%ScriptFile%,Interface,NumberBox1,True
WriteInterface,Visible,%ScriptFile%,Interface,NumberBox2,True
WriteInterface,Visible,%ScriptFile%,Interface,CheckBox1,True
WriteInterface,Visible,%ScriptFile%,Interface,ComboBox1,True
WriteInterface,Visible,%ScriptFile%,Interface,Image1,True
WriteInterface,Visible,%ScriptFile%,Interface,TextFile1,True
WriteInterface,Visible,%ScriptFile%,Interface,Button1,True
WriteInterface,Visible,%ScriptFile%,Interface,Button2,True
WriteInterface,Visible,%ScriptFile%,Interface,WebLabel1,True
WriteInterface,Visible,%ScriptFile%,Interface,RadioButton1,True
WriteInterface,Visible,%ScriptFile%,Interface,RadioButton2,True
WriteInterface,Visible,%ScriptFile%,Interface,RadioButton3,True
WriteInterface,Visible,%ScriptFile%,Interface,Bevel2,True
WriteInterface,Visible,%ScriptFile%,Interface,FileBox1,True
WriteInterface,Visible,%ScriptFile%,Interface,FileBox2,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel6,True
WriteInterface,Visible,%ScriptFile%,Interface,TextLabel7,True
WriteInterface,Visible,%ScriptFile%,Interface,RadioGroup1,True

[Interface]
RG_SelectControl="Choose a Control",1,14,4,5,120,290,"Text Box","Text Label","Number Box","Check Box","Combo Box",Image,"Text File",Button,"Web Label","Radio Button",Bevel,Filebox,"Radio Group","Show All",13,_ShowSelectedControl_,True
Bevel1=Bevel1,1,12,128,8,414,287
TextBox1=TextBox,1,0,138,179,171,21,abc..
TextLabel1="Normal Text Label",1,1,138,18,103,20,8,Normal
TextLabel2="Bold Text Label",1,1,137,36,99,20,8,Bold
TextLabel3="Italic Text Label",1,1,137,53,94,18,8,Italic
TextLabel4="Underline Text Label",1,1,136,71,97,18,8,Underline
TextLabel5="Strike-Thru Text Label",1,1,136,89,106,18,8,Strike
NumberBox1=pNumberBox1,1,2,473,31,56,22,0,0,256,1,"__Increment positive number by a factor of 1"
NumberBox2=pNumberBox2,1,2,473,60,55,22,0,-256,256,2,"__Increment or decrement number by a factor of 2"
CheckBox1=CheckBox,1,3,137,110,104,20,False
ComboBox1="Option 1",1,4,136,134,115,21,"Option 1","Option 2","Option 3"
Image1=FAQ.gif,1,5,265,30,71,60,http://www.google.com,"__Search for more info"
TextFile1=TextFile.txt,1,6,135,209,175,76,
Button1=Button,1,8,361,27,98,25,pButton1,0,False
Button2="Image Button",1,8,360,66,99,25,pButton2,if_hammer_screwdriver_11945.bmp,False
Weblabel1="Search Google",1,10,264,103,69,18,http://www.google.com
RadioButton1=RadioButton1,1,11,324,124,100,20,True
RadioButton2=RadioButton2,1,11,324,144,100,20,False
RadioButton3=RadioButton3,1,11,324,164,100,20,False
FileBox1=,1,13,330,219,172,20,file
FileBox2=,1,13,330,262,172,20,dir
TextLabel6="Browse for File",1,1,331,202,179,18,12,Normal
TextLabel7="Browse For Directory",1,1,332,245,202,18,7,Normal
Bevel2=Bevel,1,12,250,19,104,82,8,Bold
RadioGroup1=RadioGroup,1,14,433,115,90,69,Option1,Option2,Option3,1

[InterfaceEncoded]
TextFile.txt=99,132
FAQ.gif=2066,2755
if_hammer_screwdriver_11945.bmp=643,858

[EncodedFile-InterfaceEncoded-TextFile.txt]
lines=0
0=eJzzSM3JyVcIzy/KSVHk5fIgiwcA61sVjnic4wlJrShxy8xJ1SupKGEYBSMNuEBpSRzyN1W/mTEwAQAtYwdJj9s6pwEAAAACAAAAJgAAABkAAAAAAAAAAQAAAAAAAAAAAAAA

[EncodedFile-InterfaceEncoded-FAQ.gif]
lines=0
0=R0lGODlhQQAZAPcAAAAAADY8LDg+MC1GCS5ICjBLCjZIFzdUDTtUEj9RHz1KKD1DM0FeE0RdHUhfHUBKLklbKE1aNVNfPEpnF09wFVFtHFd3G0xkIU9iL09lMFFkK1FsK1JjO1VwLl91JVt6Jl1yOGF4KmVyNGJ7Omx+NUtTQVZiQVpmRVxoRl5pS2JuSmRvVGp5S2p1Vnd9THF8Wl2AHGKFHWOJHGiKH2eTHGmRH2eEImaJI2iAKGqNIWyJKm2TIW+QKHOHN3KJNnWMOHCVInOULHSbI3aYK3ieJXqcK3WSMnmROn2dM3agI3ujJnylKX6oJ3+oKHCGSHGMSXuHTHiLQHmEXHyIYoCmLICpJoOsKYmvL4CgNIShO4erNImtO4GwJoawKomzK426LImxMY+zOI67NJC9LZO7O4KHXoGZRYaTV4SbXIucVICMaIiUaYqVcZKWaZKeYpWTc5Cbdpufcpy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