[Galaxy Note GT-N7000 Themes and Apps] tkari4:
Second part complex Aroma Installer usage

Some information:

checkbox items can be used from item.x.1 to item.x.infinite

(more, then 7 items is not the best, because by scrolling can select, or deselect items)

selectbox items can be used from selected.x 1 to selected.x infinite

(Tested it already with 97 items)

1.) How to use checkbox with more groups on one screen

# STEP 1 - How to use checkbox with more groups (more item can be selected)

checkbox("","<b>Add your selection title here</b>","@alert","checkbox.prop",
[COLOR="blue"]"Select what you want", "", 2, [/COLOR] # <- Group the items with this line
"<b>Check 1</b>", "This is the first selectable item", 0,
"<b>Check 2</b>", "This is the second selectable item", 1,
"<b>Check 3</b>", "This is the third selectable item", 0[COLOR="blue"],[/COLOR] # <- Don't close this line with: ); use instead: ,
[COLOR="Red"]"Select what you want", "", 2,[/COLOR] # <- Group the next items with this line
"<b>Check 4</b>", "This is the fourt selectable item", 1,
"<b>Check 5</b>", "This is the fifth selectable item", 0,
"<b>Check 6</b>", "This is the sixth selectable item", 0[COLOR="red"]);[/COLOR] # <- Close the second (or last) selection with: );

Group one

Group two

result:

Now if Check 1, Check 2, or Check 3 selected, then it will open one new selection screen in the Aroma Installer.

# STEP 3 - Open new screen if items are selected from the first checkbox group

# If in the first selection Check 1 selected then we will open one new selection menu

# Sub Menu items are in selectbox

if prop("[COLOR="Blue"]checkbox.prop[/COLOR]","[COLOR="blue"]item.1.1[/COLOR]")=="1" then # This menu will be activated if Check 1 selected
selectbox("","<b>Add your selection title here</b>","@alert","submenu1.prop",

"<b>Sub menu item 1</b>", "This is the first selectable item", 0,
"<b>Sub menu item 2</b>", "This is the second selectable item", 1);

endif; # Close the Query with endif;

As you see I'm using one new .prop file "submenu1.prop" and I'll use for each sub menu one new .prop file name.

Second sub menu use submenu2.prop, third sub menu use submenu3.prop, etc.

result:

The items are without group in selectbox => selected.0

updater-script:

# Start the Query with the trigger for the Sub Menu

# Sub Menu under Check 1

[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1" # First the trigger (from STEP 1 in aroma-config)
then # Don't close it yet with: endif;
ui_print("Installing Sub Menu items, because Check 1 was selected");
if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "1"
then # Second the selection for sub menu (Step 3 in aroma-config)
ui_print("Sub menu item 1");
# Do something, extract, delete...
endif; # Close the first sub menu item with: endif;
if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "2"
then
ui_print("Sub menu item 2");
# Do something, extract, delete...
endif; # Close the second sub menu item with: endif;
endif; # Close the trigger Query with: endif;

# Sub Menu under Check 2

if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.2") == "1"
then
ui_print("Installing Sub Menu items, because Check 2 was selected");
if
file_getprop("/tmp/aroma-data/submenu2.prop", "selected.0") == "1"
then
ui_print("Sub menu item 3");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu2.prop", "selected.0") == "2"
then
ui_print("Sub menu item 4");
# Do something, extract, delete...
endif;
endif;

# Sub Menu under Check 3

if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.3") == "1"
then
ui_print("Installing Sub Menu items, because Check 2 was selected");
if
file_getprop("/tmp/aroma-data/submenu3.prop", "selected.0") == "1"
then
ui_print("Sub menu item 5");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu3.prop", "selected.0") == "2"
then
ui_print("Sub menu item 6");
# Do something, extract, delete...
endif;
endif; [/COLOR]

[COLOR="Red"]# Calling the selected items from second group (STEP 1 in aroma-config)

if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.2.1") == "1"
then
ui_print("Check 4");
package_extract_dir("sample/check4/system", "/system");
ui_print("Done");
endif;

if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.2.2") == "1"
then
ui_print("Check 5");
package_extract_dir("sample/check5/system", "/system");
ui_print("Done");
endif;

if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.2.3") == "1"
then
ui_print("Check 6");
package_extract_dir("sample/check6/system", "/system");
ui_print("Done");
endif;[/COLOR]

When you add the Query to the updater-script, then never add it only for the sub menu.

If the upper level not selected, then you will have an error.

Example (easy way):

1.) Check 1 selected, or not ?

2.) Yes, then do something!

3.) No, do nothing!

Now with updater-script language:

1).

if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1"
then

Don't close the query yet.

2.)

if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "1"
then
do something...
endif;

Now the query can be closed:

endif;

In one Piece:

[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1"
then
ui_print("Installing Sub Menu items, because Check 1 was selected");[/COLOR]
[COLOR="Green"]if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "1"
then
ui_print("Sub menu item 1");
# Do something, extract, delete...
endif; [/COLOR]
[COLOR="Red"]if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "2"
then
ui_print("Sub menu item 2");
# Do something, extract, delete...
endif;[/COLOR]
[COLOR="blue"]endif; [/COLOR]

If the query starts with the submenu1.prop and Check 1 isn't selected, then you will have an error in the updater-script, because submenu1.prop will not exist!

2.) How to use selectbox with more groups on one screen

# STEP 2 - How to use selectbox with more groups(only one item can be selected in each group)

selectbox("","<b>Add your selection title here</b>","@alert","selectbox.prop",
[COLOR="Blue"]"Select what you want", "", 2, [/COLOR] # <- Group the items with this line
"<b>Select 1</b>", "This is the first selectable item", 0,
"<b>Select 2</b>", "This is the second selectable item", 1,
"<b>Select 3</b>", "This is the third selectable item", 0[COLOR="blue"], [/COLOR] # <- Don't close this line with: ); use instead: ,
[COLOR="Red"]"Select what you want", "", 2, [/COLOR] # <- Group the next items with this line
"<b>Select 4</b>", "This is the fourt selectable item", 1,
"<b>Select 5</b>", "This is the fifth selectable item", 0,
"<b>Select 6</b>", "This is the sixth selectable item", 0[COLOR="red"]);[/COLOR]

Group one

Group two

result:

Opening new screen if Select 4 selected:

if prop("[COLOR="Blue"]selectbox.prop[/COLOR]","[COLOR="blue"]selected.2[/COLOR]")=="[COLOR="blue"]1[/COLOR]" then # This menu will be activated if Select 4 selected (STEP 2)
checkbox("","<b>Add your selection title here</b>","@alert","submenu4.prop",

"<b>Sub menu item 7</b>", "This is the seventh selectable item", 1,
"<b>Sub menu item 8</b>", "This is the eighth selectable item", 0);

endif;

result:

updater-script:

[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "1"
then
ui_print("Select 1");
package_extract_dir("sample/select1/system", "/system");
ui_print("Done");
endif;

if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "2"
then
ui_print("Select 2");
package_extract_dir("sample/select2/system", "/system");
ui_print("Done");
endif;

if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3"
then
ui_print("Select 3");
package_extract_dir("sample/select3/system", "/system");
ui_print("Done");
endif; [/COLOR]

[COLOR="Red"]if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "1"
then
ui_print("Installing Sub Menu items, because Select 4 was selected");
if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 7");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 8");
# Do something, extract, delete...
endif;
endif;

if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "2"
then
ui_print("Installing Sub Menu items, because Select 5 was selected");
if
file_getprop("/tmp/aroma-data/submenu5.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 9");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu5.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 10");
# Do something, extract, delete...
endif;
endif;

if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "3"
then
ui_print("Installing Sub Menu items, because Select 6 was selected");
if
file_getprop("/tmp/aroma-data/submenu6.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 11");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu6.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 12");
# Do something, extract, delete...
endif;
endif; [/COLOR]

updater-script (only for one sub menu)

[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "1"
then
ui_print("Installing Sub Menu items, because Select 4 was selected");[/COLOR]
[COLOR="SeaGreen"]if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 7");
# Do something, extract, delete...
endif;[/COLOR]
[COLOR="Red"]if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 8");
# Do something, extract, delete...
endif; [/COLOR]
[COLOR="blue"]endif; [/COLOR]

result with the default settings:

Install the attached aroma-complex-template.zip from CWM recovery.

Won't modify anything, only writes text on your screen.