home *** CD-ROM | disk | FTP | other *** search
Wrap
INI File | 1994-08-14 | 18.1 KB | 1,423 lines
[ver] 4 [sty] [files] [charset] 82 CHINESEBIG5 (Windows) [revisions] 0 [prn] QMS-PS 810 [port] LPT1: [lang] 1 [desc] º╓│t¡p║Γ¼Y╝╞¬║ª╕ñΦ«┌íC 773106233 18 734142332 227 6 0 0 0 0 1 [fopts] 0 1 0 0 [lnopts] 2 Body Text 1 [docopts] 5 2 [GramStyle] [ParaNum] 1 [tag] Body Text 2 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 2 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Body Text 0 0 [tag] Body Single 3 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Body Single 0 0 [tag] Bullet 4 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 288 288 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 <*0> 360 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Bullet 0 0 [tag] Bullet 1 5 [fnt] Times New Roman 240 0 49152 [algn] 1 1 288 288 288 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 <*5> 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Bullet 1 0 0 [tag] Number List 6 [fnt] Times New Roman 240 0 49152 [algn] 1 1 360 360 360 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 <*:>. 360 1 1 0 16 0 0 [nfmt] 272 1 2 . , $ Number List 0 0 [tag] Subhead 7 [fnt] Times New Roman 240 0 49155 [algn] 1 1 0 0 0 [spc] 33 273 1 72 72 1 100 [brk] 68 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 1 0 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Body Text 0 0 [tag] Title 8 [fnt] Arial 360 0 16385 [algn] 4 1 0 0 0 [spc] 33 446 1 144 72 1 100 [brk] 16 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 272 1 2 . , $ Title 0 0 [tag] Header 9 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Header 0 0 [tag] Footer 11 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Footer 0 0 [lay] Standard 516 [rght] 16833 11908 1 576 720 1 1080 576 0 1 0 1 0 2 1 576 11329 12 1 720 1 1440 1 2160 1 2880 1 3600 1 4320 1 5040 1 5760 1 6480 1 7200 1 7920 1 8640 [hrght] [lyfrm] 1 11200 0 0 11908 1080 0 1 3 1 0 0 0 0 0 0 0 0 1 [frmlay] 1080 11908 1 1440 72 1 288 1440 0 1 0 1 1 0 1 1440 10465 2 2 4680 3 9360 [txt] Peyton McManus Lotus WPD > [frght] [lyfrm] 1 13248 0 16113 11908 16833 0 1 3 1 0 0 0 0 0 0 0 0 2 [frmlay] 16833 11908 1 1440 648 1 16185 1440 0 1 0 1 1 0 1 1440 10465 2 2 4680 3 9360 [txt] > [elay] [l1] 0 [pg] 6 51 0 4 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 82 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 132 0 29 0 0 1 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 138 0 5 512 3 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 187 0 37 0 0 1 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 222 0 10 1025 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 [edoc] <:#284,10753>' Example macro to calculate x raised to the y power <:#284,10753> <:#284,10753>Define NumDec 2 <:#284,10753> <:#284,10753>Declare FontDlg(Action, Hdlg, id) <:#284,10753>Declare CellEngine(Value) <:#284,10753> <:#284,10753>Define AnswerHolder 8002 <:#284,10753>Define CopyButton 3 <:#284,10753> <:#284,10753> <:#284,10753><:X3,-32768;Include "Amixlate.sam!qkroot">Define Desc "Enter a base value (a) and the root (b) to which you want it raised." @Outline3@<:#284,10753>Define Round_Answer "@Round(({x})^(1/{y});2)"<:X~3,-32768;Include "Amixlate.sam!qkroot"> <:#284,10753><:X3,-32768;Include "Amixlate.sam!common">Define NotFound "LTSCE01.DLL not found. Copy the dll to your windows directory" @Outline3@<:#284,10753>Define ErrorMessage "The ltsce01.dll could not be loaded. Please copy the dll to the Ami Pro directory."<:X~3,-32768;Include "Amixlate.sam!common"> <:#284,10753> <:#284,10753> <:#284,10753>Define EM_SetSel 1025 <:#284,10753> @Subhead@<:#284,10753>Function Main() <:#284,10753>Mac = GetRunningMacroFile$() <:#284,10753>FontDlg(1,0,0) <:#284,10753>CellEngine(1)' Start the dll and allocate a global var <:#284,10753>FillEdit(1000,"QKRoot.bmt") <:#284,10753>FillEdit(1002, Desc) <:#284,10753>FillEdit(8001,"2") <:#284,10753>FillEdit(AnswerHolder,"8") <:#284,10753> <:#284,10753>SetDlgCallBack(8000,"{Mac}!CallBack") <:#284,10753>SetDlgCallBack(8001,"{Mac}!CallBack") <:#284,10753>SetDlgCallBack(0,"{Mac}!InitDlg") @Outline3@<:#284,10753>DlgKeyInterrupt(112, "{mac}!DisplayHelp") @Outline3@<:#284,10753> <:#284,10753>Box = DialogBox(".","Power") <:#284,10753>If Box = CopyButton <:#284,10753> Answer = GetDialogField$(AnswerHolder) <:#284,10753> ClipBoardWrite(Answer, 1) <:#284,10753>Endif <:#284,10753> <:#284,10753>FontDlg(4,0,0) <:#284,10753>CellEngine(0) ' Shut down the engine <:#284,10753> <:#284,10753>End Function <:#284,10753> <:#284,10753> @Subhead@<:#284,10753>Function InitDlg(Hdlg, id, value) <:#284,10753>IgnoreKeyBoard(2) <:#284,10753>HourGlass(on) <:#284,10753>For x = 1001 to 1006 <:#284,10753> FontDlg(3, Hdlg, x) <:#284,10753>Next <:#284,10753>FontDlg(3, Hdlg,8000) ' these editboxes will use the small font. <:#284,10753>FontDlg(3, Hdlg, 8001) <:#284,10753>SetDlgItemText(Hdlg, 8000,"64") <:#284,10753>' this message selects the first 2 characters in the 8000 editbox <:#284,10753>AppSendMessage(GetDlgITem(Hdlg, 8000),EM_SetSel,0,131072) <:#284,10753>HourGlass(off) <:#284,10753>End Function <:#284,10753> @Subhead@<:#284,10753>Function CallBack(Hdlg, id, value) <:#284,10753>IgnoreKeyBoard(2) <:#284,10753>x = GetDlgItemText(Hdlg, 8000) <:#284,10753>y = GetDlgItemText(Hdlg, 8001) <:#284,10753>Answer = CellEngine(Round_Answer) <:#284,10753>SetDlgItemText(Hdlg, AnswerHolder, Answer) <:#284,10753>End function <:#284,10753> <:#284,10753> @Subhead@<:#284,10753>function DisplayHelp() @Outline2@<:#284,10753>' two defines needed for help. The help name and panel number are defined above @Outline2@<:#284,10753>define FindWindowa() DllCall("user,FindWindow,HCC", %1, %2) @Outline2@<:#284,10753>define WinHelpa(hWnd, file, cmd, ptr) DllCall("user,WinHelp,HHCHJ", %1, %2, %3, %4) @Outline2@<:#284,10753>prohWnd = FindWindowa("AmiProWndA", 0) @Outline2@<:#284,10753>helpfile = strcat$(GetAmiDirectory$(), "HelpPack.hlp") @Outline2@<:#284,10753>PanelNum= 80 @Outline2@<:#284,10753>WinHelpa(prohWnd, helpfile, 0x0001, Panelnum) @Outline2@<:#284,10753>end function @Subhead@<:#284,10753> <:#284,10753> <:#284,10753> <:#284,10753> <:p<* >> @Subhead@<:#284,10753>Function FontDlg(Action, Hdlg, id) <:#284,10753>' 1 Create a font and allocvar <:#284,10753>' 2 Return the handle of the create font <:#284,10753>' 3 Set the id specified to the font <:#284,10753>' 4 Freeglobalvar and delete created object <:#284,10753> @Outline2@<:#568,10753>define CreateFontDLG() DllCall("gdi,CreateFont,HHHHHHHHHHHHHHC", %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14) @Outline2@<:#284,10753>define DeleteObjectDLG(handle) DllCall("gdi,DeleteObject,HH", %1) @Outline2@<:#568,10753>define SendMessageDLG(hwnd, msg, wpara, lparm) DllCall("user,SendMessage,HHHHJ", %1, %2, %3, %4) @Outline2@<:#284,10753> @Outline2@<:#284,10753> <:#284,10753>Switch Action <:#284,10753> Case 1 ' Create the font and store it @Outline2@<:#284,10753> Font = CreateFontDLG(13, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 32, "Helv") <:#284,10753> AllocGlobalVar("FontHandle",1) <:#284,10753> If Font <:#284,10753> SetGlobalVar("FontHandle",Font) <:#284,10753> Return Font <:#284,10753> Else <:#284,10753> Return 0; ' no font <:#284,10753> Endif <:#284,10753> Break; <:#284,10753> Case 2 ' Return the handle to the font <:#284,10753> Handle = GetGlobalVar$("FontHandle") <:#284,10753> If Handle <:#284,10753> Return Handle <:#284,10753> Else <:#284,10753> Return 0 <:#284,10753> Endif <:#284,10753> <:#284,10753> Case 3 ' Set the id to the font <:#284,10753> Handle = GetGlobalVar$("FontHandle") <:#284,10753> If Handle <:#284,10753> IdControl = GetDlgITem(Hdlg, id) <:#284,10753> SendMessageDlg(idControl, 0x30, Handle, 0) <:#284,10753> Return 1 <:#284,10753> Else <:#284,10753> Return 0 <:#284,10753> Endif <:#284,10753> Break; <:#284,10753> <:#284,10753> Case 4 ' Delete the font and clear the var <:#284,10753> Handle = GetGlobalVar$("FontHandle") <:#284,10753> If Handle <:#284,10753> DeleteObjectDLG(Handle) <:#284,10753> Stat = 1 <:#284,10753> Else <:#284,10753> Stat = 0 <:#284,10753> Endif <:#284,10753> FreeGlobalVar("FontHandle") <:#284,10753> Return Stat <:#284,10753> Default <:#284,10753>EndSwitch <:#284,10753> <:#284,10753>End Function @Subhead@<:p<* >> @Subhead@<:#284,10753>Function CellEngine(Action) <:#284,10753>'Available Actions <:#284,10753>' 1 Start the engine and allocate globalvar <:#284,10753>' 2 Return the handle to the instance of the sheet <:#284,10753>' 0 Shut everything down <:#284,10753>' Default Expect a formula and return an answer <:#284,10753> <:#284,10753>' these defines may be useful at the beginning of your macro <:#284,10753>Define StartEngine 1 <:#284,10753>Define GetInstance 2 <:#284,10753>Define CloseEngine 0 <:#284,10753> <:#568,10753>Define CECREATEINSTANCE(LPHANDLE) DllCall("LTSCE01.DLL,CECREATEINSTANCE,HO",%1) <:#568,10753>Define CEDESTROYINSTANCE(HANDLE) DllCall("LTSCE01.DLL,CEDESTROYINSTANCE,HH",%1) <:#568,10753>Define CECALCNOW(HINSTANCE, lpFormula, lpOutPut) DllCall("LTSCE01.DLL,CECALCNOW,HHCC",%1,%2,%3) <:#284,10753> <:#284,10753>DefStr hInstance, Answer, Var; <:#284,10753>Mac = GetRunningMacroFile$() <:#284,10753>GlobalInstance = StrCat$(Mac,"hIstance") <:#284,10753> <:#284,10753>Switch Action <:#284,10753> Case 1 <:#284,10753> ' start the engine <:#284,10753> LibId = DLLLoadLib("LTSCE01.DLL","CECreateInstance","HO") <:#284,10753> If LibId = 0 <:#284,10753> Message(ErrorMessage) <:#284,10753> Return -1; <:#284,10753> Endif <:#284,10753> RetVal = CECREATEINSTANCE(&hInstance) <:#284,10753> AllocGlobalVar("{GlobalInstance}",1) <:#284,10753> AllocGlobalVar("{Mac}LibId",1) <:#284,10753> SetGlobalVar("{Mac}Libid",LibId) <:#284,10753> SetGlobalVar("{GlobalInstance}",hInstance) <:#284,10753> Return hInstance; <:#284,10753> Break; <:#284,10753> <:#284,10753> Case 2 <:#284,10753> ' return the handle to the instance of the sheet <:#284,10753> AllocGlobalVar("{GlobalInstance}",1) <:#284,10753> hInstance = GetGlobalVar$("{GlobalInstance}") <:#284,10753> Return hInstance; <:#284,10753> Break; <:#284,10753> <:#284,10753> Case 0 <:#284,10753> ' destroy the instance of the sheet and free the global var and libid <:#284,10753> AllocGlobalVar("{GlobalInstance}",1) <:#284,10753> AllocGlobalVar("{Mac}LibId",1) <:#284,10753> hInstance = GetGlobalVar$("{GlobalInstance}") <:#284,10753> LibId = GetGlobalVar$("{Mac}LibId") <:#284,10753> If hInstance <:#284,10753> CEDestroyInstance(hInstance) <:#284,10753> DllFreeLib(Libid) <:#284,10753> Endif <:#284,10753> FreeGlobalVar("{GlobalInstance}") <:#284,10753> FreeGlobalVar("{Mac}LibId") <:#284,10753> Break; <:#284,10753> <:#284,10753> Default <:#284,10753> ' Calculate the formula and return the answer <:#284,10753> AllocGlobalVar("{GlobalInstance}",1) <:#284,10753> hInstance = GetGlobalVar$("{GlobalInstance}") <:#284,10753> CECalcNow(hInstance,"{Action}",&Answer) <:#284,10753> Return Answer; <:#284,10753> Break; <:#284,10753>EndSwitch <:#284,10753>End Function @Subhead@<:#284,10753> <:#284,10753> <:#284,10753> <:#284,10753>DIALOG Power <:#284,10753>-2134376448 11 80 33 153 67 "" "AmiDialog" "QuickRoot" <:#284,10753>FONT 8 "Helv" <:#284,10753>76 36 26 12 8000 1350631424 "edit" "" 0 <:#284,10753>76 50 26 12 8001 1350631424 "edit" "" 0 <:#284,10753>109 3 40 14 1 1342373889 "button" "Done" 0 <:#284,10753>109 19 40 14 3 1342373888 "button" "Copy" 0 <:#284,10753>3 37 41 23 1000 1342177290 "static" "filename.bmt" 0 <:#284,10753>33 38 43 10 1001 1342177280 "static" "Base value (a):" 0 <:#284,10753>33 52 43 9 1003 1342177280 "static" "Root (b):" 0 <:#284,10753>117 42 27 9 1004 1342177280 "static" "Answer:" 0 <:#284,10753>107 51 40 9 8002 1342177281 "static" "" 0 <:#284,10753>6 4 83 25 1002 1342177280 "static" "text" 0 <:#284,10753>106 36 43 25 20 1342308359 "button" "" 0 <:#284,10753>END DIALOG > [Embedded] 00014875 > [macsum] 7 Main 0 0 4 19 InitDlg 437 3 2 45 CallBack 736 3 4 59 DisplayHelp 894 0 4 68 FontDlg 1079 3 5 82 CellEngine 1876 1 8 138 Power 2802 0 -1 207 [macse] 14 Main 0 802 13 8 1 16 FontDlg 1 0 0 16 CellEngine 1 0 31 1000 "QKRoot.bmt" 0 31 1002 "Enter a base value (a) and the root (b) to which you want it raised." 0 31 8001 "2" 0 31 8002 "8" 0 41 8000 "{1}!CallBack" 0 41 8001 "{1}!CallBack" 0 41 0 "{1}!InitDlg" 0 47 112 "{1}!DisplayHelp" 0 26 "." "Power" 13 8 2 6 2 5 3 18 0 11 00000390 0 27 8002 13 8 3 0 1038 "{3}" 1 16 FontDlg 4 0 0 16 CellEngine 0 6 0 15 9 14 InitDlg 0 32 2 0 296 1 5 1001 8 4 5 1006 6 4 18 2 12 00000120 10 00000159 5 1 6 4 3 0 8 4 10 00000042 16 FontDlg 3 "{0}" "{4}" 10 00000087 16 FontDlg 3 "{0}" 8000 16 FontDlg 3 "{0}" 8001 0 43 "{0}" 8000 "64" 0 44 "{0}" 8000 13 0 1036 [X] 1025 0 131072 0 296 0 6 3 15 9 14 CallBack 0 32 2 0 42 "{0}" 8000 13 8 4 0 42 "{0}" 8001 13 8 5 16 CellEngine "@Round(({4})^(1/{5});2)" 13 8 6 0 43 "{0}" 8002 "{6}" 6 3 15 9 14 DisplayHelp 0 284 "user,FindWindow,HCC" "AmiProWndA" 0 13 8 1 0 798 13 0 16 [X] "HelpPack.hlp" 13 8 2 5 80 8 3 0 284 "user,WinHelp,HHCHJ" "{1}" "{2}" 1 "{3}" 6 0 15 9 14 FontDlg 5 1 6 0 18 0 11 00000255 0 284 "gdi,CreateFont,HHHHHHHHHHHHHHC" 13 0 0 0 400 0 0 0 0 0 0 0 0 "Helv" 13 8 4 0 271 "FontHandle" 1 6 4 11 00000217 0 264 "FontHandle" "{4}" 6 4 15 9 10 00000229 5 0 15 9 10 00000785 10 00000785 5 2 6 0 18 0 11 00000381 0 265 "FontHandle" 13 8 5 6 5 11 00000356 6 5 15 9 10 00000368 5 0 15 9 10 00000785 5 3 6 0 18 0 11 00000596 0 265 "FontHandle" 13 8 5 6 5 11 00000558 0 44 "{1}" "{2}" 13 8 6 0 284 "user,SendMessage,HHHHJ" "{6}" 48 "{5}" 0 5 1 15 9 10 00000570 5 0 15 9 10 00000785 10 00000785 5 4 6 0 18 0 11 00000785 0 265 "FontHandle" 13 8 5 6 5 11 00000730 0 284 "gdi,DeleteObject,HH" "{5}" 5 1 8 7 10 00000740 5 0 8 7 0 266 "FontHandle" 6 7 15 9 10 00000785 6 3 15 9 14 CellEngine 0 802 13 8 5 0 16 "{5}" "hIstance" 13 8 6 5 1 6 0 18 0 11 00000448 0 297 "LTSCE01.DLL" "CECreateInstance" "HO" 13 8 7 6 7 5 0 18 0 11 00000279 0 3 "The ltsce01.dll could not be loaded. Please copy the dll to the Ami Pro directory." 5 -1 15 9 0 284 "LTSCE01.DLL,CECREATEINSTANCE,HO" &2 13 8 8 0 271 "{6}" 1 0 271 "{5}LibId" 1 0 264 "{5}Libid" "{7}" 0 264 "{6}" "{2}" 6 2 15 9 10 00000914 10 00000914 5 2 6 0 18 0 11 00000552 0 271 "{6}" 1 0 265 "{6}" 13 8 2 6 2 15 9 10 00000914 10 00000914 5 0 6 0 18 0 11 00000801 0 271 "{6}" 1 0 271 "{5}LibId" 1 0 265 "{6}" 13 8 2 0 265 "{5}LibId" 13 8 7 6 2 11 00000744 0 284 "LTSCE01.DLL,CEDESTROYINSTANCE,HH" "{2}" 0 298 "{7}" 0 266 "{6}" 0 266 "{5}LibId" 10 00000914 10 00000914 0 271 "{6}" 1 0 265 "{6}" 13 8 2 0 284 "LTSCE01.DLL,CECALCNOW,HHCC" "{2}" "{0}" &3 6 3 15 9 10 00000914 6 1 15 9 DIALOG Power -2134376448 11 80 33 153 67 "" "AmiDialog" "QuickRoot" FONT 8 "Helv" 76 36 26 12 8000 1350631424 "edit" "" 0 76 50 26 12 8001 1350631424 "edit" "" 0 109 3 40 14 1 1342373889 "button" "Done" 0 109 19 40 14 3 1342373888 "button" "Copy" 0 3 37 41 23 1000 1342177290 "static" "filename.bmt" 0 33 38 43 10 1001 1342177280 "static" "Base value (a):" 0 33 52 43 9 1003 1342177280 "static" "Root (b):" 0 117 42 27 9 1004 1342177280 "static" "Answer:" 0 107 51 40 9 8002 1342177281 "static" "" 0 6 4 83 25 1002 1342177280 "static" "text" 0 106 36 43 25 20 1342308359 "button" "" 0 00014900