Example how to create a user input form

Share your macros, knowledge, solutions, services, ...
Post Reply
Petr
Posts: 106
Joined: Tue Oct 18, 2016 1:12 pm

Example how to create a user input form

Post by Petr » Fri Nov 25, 2016 1:09 pm

This example shows how to create a user input form and how to use the data user entered to the form.

Code: Select all

<#> Start of the macro
<#> Only commands takes effect in the macro, new lines and other text is ignored
<cmds>

<#> Define Combo box with Item1-5, variable vItem 
<form_item>("f1","Items:","LIST","Item1|Item2|Item3|Item4|Item5","vItem")

<#> Define Edit box (text) for variable vame
<form_item>("f1","Your name:","EDIT","","vName")

<#> Define Check box for variable vLikeIt 
<form_item>("f1","I like it!","CHECK","YES","vLikeIt")

<#> Write only info text (label)
<form_item>("f1","This is just a sample.","TEXT","","")

<#> Show form with defined controls 
<form_show>("f1","Sample Form","shell32.dll",2)

<#> If Esc or Cancel pressed, exit macro
<if_str>("_vCanceled == 1") <exitmacro> <endif>

<#> Show entered variables 
<msg>(-100,-100,"In the form you have selected:

Item: %vItem%
Your name: %vName%
I like it: %vLikeIt%
","Form Results",1)

<#> End of the macro

Post Reply