proc retrieve_scripts {script} {
set buffer [ GuidoExecServer inSiteGetScripts {} ]
set status [GuidoGetParamBufferValue $buffer status]
$script removeAllItems
if {$status >= 0} {
$script setInputAllowed true
set scriptCount [ GuidoGetParamBufferValue $buffer "scriptCount" ]
if {$scriptCount > 0} {
for {set i 0} {$i < $scriptCount} {incr i} {
set next "script($i)"
$script addItem [ GuidoGetParamBufferValue $buffer $next ]
if {$i == 0} {
$script setCurrentValue [ GuidoGetParamBufferValue $buffer $next ]
}
}
$script setExclusive true
} else {
GuidoMessage warning INSITE_NO_SCRIPTS
$script setInputAllowed false
}
} else {
GuidoMessage warning INSITE_NO_SCRIPTS
$script setInputAllowed false
}
}
GuidoForm frm00103 {
-default_buttons
-label "Run InSite Script"
-layout CentreLineLayout
-tip INSITE_EXPORT_FORM_TIP
GuidoComboBox script {
-display_length 20
-label "Script"
-max_length 255
-null false
-tip INSITE_EXPORT_SCRIPT_TIP
-exclusive false
-value_in "Retrieving scripts from InSite..."
-default "Retrieving scripts from InSite..."
-input false
}
-action initial {[retrieve_scripts $script]}
}
