Вверх ↑
Ответов: 698
Рейтинг: 143
#1: 2020-07-08 22:35:14 ЛС | профиль | цитата
andrestudio, В моём примере я хотел показать, что в загруженном XLS-файле работают формулы на любом листе (Ванна, Туалет, Комната, Кухня), меняем «Количество» или «Стоимость» меняются «Сумма» и «Итоги», потом это всё можно сохранить. Для этого выложил архив с примером.
Для себя я часто использую в схемах нестандартные компоненты (которые удобны в некоторых случаях) но для форума я стараюсь использовать только стандартные.

С удивлением узнал, что данная библиотека доступна через DDE.
Add(MainForm,15775911,112,70)
{
Width=616
Caption="DDE команды для зарегистрированных программ"
}
Add(VBJScript,5432892,350,77)
{
@Hint=#16:Query SQL Server|
WorkPoints=#6:doWork|
EventPoints=#6:onRead|7:onClear|5:onCol|
Script=#0:|23:Dim arrKeys, arrSubKeys|18:Dim blnFullCmdOnly|8:Dim i, j|18:Dim objDic, objReg|50:Dim strCommand, strDDEApp, strDDEExec, strDDETopic|48:Dim strFileType, strKey, strSubKey, strSubSubKey|1: |23:Const HKCR = &H80000000|0:|23:Sub doWork(Data,Index) |22:blnFullCmdOnly = False|0:|15:sys.onClear nil|1: |42:ColName = "Extension=40" & ";" _|38: & "File Type=150" & ";" _|38: & "Shell Command=100" & ";" _|38: & "DDE Server Command=700" & ";" _|37: & "DDE Application=80" & ";" _|37: & "DDE Topic=80" & ";" _|30: & "DDE Client Command=250"|18:sys.onCol ColName |1: |97:Set objReg = GetObject( "winmgmts:{impersonationLevel=impersonate}!//./root/default:StdRegProv" )|51:Set objDic = CreateObject( "Scripting.Dictionary" )|1: |32:objReg.EnumKey HKCR, "", arrKeys|1: |30:For i = 0 To UBound( arrKeys )|36: If Left( arrKeys(i), 1 ) = "." Then|57: objReg.GetStringValue HKCR, arrKeys(i), "", strFileType|41: objDic.Item( strFileType ) = arrKeys(i)|7: End If|34: strSubKey = arrKeys(i) & "\shell"|43: objReg.EnumKey HKCR, strSubKey, arrSubKeys|30: If IsArray( arrSubKeys ) Then|35: For j = 0 To UBound( arrSubKeys )|69: strSubSubKey = arrKeys(i) & "\shell\" & arrSubKeys(j) & "\ddeexec"|59: objReg.GetStringValue HKCR, strSubSubKey, "", strDDEExec|22: ' DDE commands only|40: If IsNull( strDDEExec ) Then Exit For|69: strSubSubKey = arrKeys(i) & "\shell\" & arrSubKeys(j) & "\command"|59: objReg.GetStringValue HKCR, strSubSubKey, "", strCommand|81: strSubSubKey = arrKeys(i) & "\shell\" & arrSubKeys(j) & "\ddeexec\Application"|58: objReg.GetStringValue HKCR, strSubSubKey, "", strDDEApp|75: strSubSubKey = arrKeys(i) & "\shell\" & arrSubKeys(j) & "\ddeexec\Topic"|60: objReg.GetStringValue HKCR, strSubSubKey, "", strDDETopic|25: If blnFullCmdOnly Then|42: If IsNull( strDDEApp ) Then Exit For|42: If IsNull( strDDETopic ) Then Exit For|9: End If|43:strFileType = Split( strSubSubKey, "\" )(0)|43:strOut = objDic.Item( strFileType ) & ";" _|27: & strFileType & ";" _|27: & arrSubKeys(j) & ";" _|27: & strCommand & ";" _|27: & strDDEApp & ";" _|27: & strDDETopic & ";" _|16: & strDDEExec|29:sys.onRead strOut |14: |6: Next|7: End If|16: arrSubKeys = ""|4:Next|1: |20:Set objDic = Nothing|20:Set objReg = Nothing|1: |8:End Sub |
UseName=0
link(onRead,2269637:doAdd,[])
link(onClear,2269637:doClear,[])
link(onCol,9744198:doEnum,[(424,97)(424,104)])
}
Add(StringTable,2269637,518,77)
{
Top=20
Width=600
Height=241
Align=5
ClearAll=0
Point(doAddColumn)
}
Add(Str_Enum,9744198,434,98)
{
link(onEnum,2269637:doAddColumn,[])
}
Add(Menu,2924481,189,70)
{
Menu=#5:Поиск|
Point(onSelectNum)
link(onSelectNum,16262240:doEvent,[])
}
Add(IndexToChanel,16262240,252,77)
{
link(onEvent1,5432892:doWork,[])
}


карма: 15

0
Редактировалось 1 раз(а), последний 2020-07-08 22:37:21