home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 18 / 18.iso / w / w252 / 4.ddi / MACROS.CMZ / AMIMENUS.SMM < prev    next >
Encoding:
INI File  |  1993-11-20  |  51.7 KB  |  2,612 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     ~cdefaul.sty
  5. [files]
  6. [charset]
  7.     82
  8.     CHINESEGB2312 (Windows)
  9. [revisions]
  10.     0
  11. [prn]
  12.             PostScript Printer
  13. [lang]
  14.     1
  15. [desc]
  16.             Customize menus by adding new menu items for Ami Pro functions and macros. Assign shortcut key sequences to com
  17.             Lotus Word Processing D
  18.             Advanced
  19.             Define, AddMenu
  20.     
  21.     753831048
  22.     57
  23.     668987187
  24.     900
  25.     20
  26.     0
  27.     0
  28.     0
  29.     0
  30.     
  31.     
  32.     
  33.     
  34.     
  35.     
  36.     0
  37. [fopts]
  38.     0
  39.     1
  40.     0
  41.     0
  42. [lnopts]
  43.     2
  44.     Body Text
  45.     1
  46. [docopts]
  47.     5
  48.     2
  49. [tag]
  50.     Body Text
  51.     9
  52.     [fnt]
  53.         ╧╕╦╬╠σ
  54.         240
  55.         0
  56.         49152
  57.     [algn]
  58.         1
  59.         2
  60.         0
  61.         0
  62.         0
  63.     [spc]
  64.         17
  65.         0
  66.         2
  67.         0
  68.         0
  69.         2
  70.         100
  71.     [brk]
  72.         4
  73.     [line]
  74.         8
  75.         0
  76.         2
  77.         0
  78.         1
  79.         1
  80.         1
  81.         10
  82.         10
  83.         2
  84.     [spec]
  85.         0
  86.         0
  87.         
  88.         0
  89.         2
  90.         0
  91.         0
  92.         0
  93.         0
  94.         0
  95.     [nfmt]
  96.         24
  97.         1
  98.         2
  99.         .
  100.         ,
  101.         úñ
  102.     Body Text
  103.     0
  104.     0
  105. [l1]
  106.             Standard
  107. [pg]
  108.     20
  109.     41 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
  110.     76 0 17 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
  111.     112 0 54 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
  112.     153 0 44 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
  113.     174 0 17 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
  114.     202 0 17 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
  115.     243 0 8 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
  116.     278 0 75 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
  117.     312 0 17 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
  118.     353 0 17 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
  119.     376 0 17 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
  120.     404 0 17 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
  121.     428 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
  122.     467 0 57 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
  123.     482 0 6 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
  124.     522 0 17 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
  125.     556 0 17 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
  126.     587 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
  127.     633 0 0 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
  128.     669 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
  129. [edoc]
  130. ' CustMenu - Allow the user to add and delete menu item.sdeclare InitCombo(p1);
  131.  
  132.  
  133. ' Now some handy defines for window messages.
  134.  
  135. define      MF_BYPOSITION   0x400
  136.  
  137. define      CB_SETCURSEL    0x40E
  138.  
  139. define      CB_GETCURSEL    0x407
  140.  
  141.  
  142. ' Define Macros to actually make the Windows calls.
  143.  
  144.  
  145. define GetActiveWindow()
  146.  
  147.     DllCall("user,GetActiveWindow,H")
  148.  
  149. define      GetMenu(hWnd)
  150.  
  151.     DllCall("user,GetMenu,HH", %1)
  152.  
  153. define      GetMenuString(hMenu, offset, namep, max, flag)
  154.  
  155.     DllCall("user,GetMenuString,HHHFHH", %1, %2, %3, %4, %5)
  156.  
  157. define      GetMenuItemCount(hMenu)
  158.  
  159.     DllCall("user,GetMenuItemCount,HH", %1)
  160.  
  161. define      GetParent(hWnd)
  162.  
  163.     DllCall("user,GetParent,HH", %1)
  164.  
  165. define      GetSubMenu(hMenu, pos)
  166.  
  167.     DllCall("user,GetSubMenu,HHH", %1, %2)
  168.  
  169. Define      Dllname "User"
  170.  
  171. ' Now functions we call
  172.  
  173. declare ComboCallBack(p1, p2, p3);
  174.  
  175. declare LocateHmenu(p1);
  176.  
  177. Declare FindMenu(p1, p2)
  178.  
  179. declare LoadTheBox(p1, p2)
  180.  
  181. declare FindAutoExec();
  182.  
  183. declare AddAccelStuff(p1, p2);
  184.  
  185. declare ShowAccel(p1);
  186.  
  187. declare DetermineAccel();
  188.  
  189. <:>declare AddAccelerator<:>(amifuncnt, amifuns, menuids)
  190.  
  191. declare     LoadMenus(p1)
  192.  
  193. declare LoadAmiFuns(p1, p2)
  194.  
  195. declare GetAmiPro(p1, p2)
  196.  
  197. declare GetMacro()
  198.  
  199. <:><:>declare AddToAutoexec(p1, p2, p3, p4, p5, p6, p7)
  200.  
  201. declare     AddItem(p1, p2, p3, p4, p5, p6)
  202.  
  203. declare DelMenu(p1)
  204.  
  205.  
  206. <:p<* >>
  207.  
  208. <:#302,9025><:ZCustMenu>FUNCTION CustMenu<:Z~CustMenu>()
  209.  
  210. <:#302,9025>'singlestep(0)
  211.  
  212. <:#302,9025>dim menus(20)                       ' Where to store the standard menu names
  213.  
  214. <:#302,9025>dim amifuns(100)                    ' Where to store ami function names
  215.  
  216. <:#302,9025>dim menuids(100)                    ' and there corresponding menuids
  217.  
  218. <:#302,9025><:><:>menucnt = LoadMenus(&menus)   ' Get the menu names
  219.  
  220. <:#302,9025>amifuncnt  = LoadAmiFuns(&amifuns, &menuids)        ' And the amipro functions
  221.  
  222. <:#302,9025>StatusBarMsg("")
  223.  
  224. <:#302,9025>defstr      stat;
  225.  
  226. <:#604,9025>FillEdit(8000, &menus)              ' Load the list box with the menus for them to choose
  227.  
  228. <:#604,9025>While (1 << Assign(&stat, DialogBox("." "PickMenu")))       'Loop here until OK or Cancel
  229.  
  230. <:#302,9025>    menuname = GetDialogField$(9000)
  231.  
  232. <:#604,9025>    if ("" != menuname)                                     'Make sure they picked something
  233.  
  234. <:#302,9025>            ' Now determine which button caused the box to close.
  235.  
  236. <:#302,9025>            switch stat
  237.  
  238. <:#302,9025>                    case 5
  239.  
  240. <:#302,9025><:><:><:><:>                        hourglass(1)
  241.  
  242. <:#604,9025>                    AddItem(menuname, amifuncnt, &amifuns, &menuids, menucnt, &menus)
  243.  
  244. <:#302,9025><:><:><:><:>                        hourglass(0)
  245.  
  246. <:#302,9025>                    break
  247.  
  248. <:#302,9025>                    case 6
  249.  
  250. <:#302,9025><:><:><:><:>                        hourglass(1)
  251.  
  252. <:#302,9025>                    DelMenu(menuname)
  253.  
  254. <:#302,9025><:><:><:><:>                        hourglass(0)
  255.  
  256. <:#302,9025>                    break;
  257.  
  258. <:#302,9025>                    case 7
  259.  
  260. <:#302,9025><:><:><:><:>                        hourglass(1)
  261.  
  262. <:#302,9025>                    AddAccelerator(amifuncnt, &amifuns, &menuids)
  263.  
  264. <:#302,9025><:><:><:><:>                        hourglass(0)
  265.  
  266. <:#302,9025>                    break;
  267.  
  268. <:#302,9025>            endswitch
  269.  
  270. <:#302,9025>    endif
  271.  
  272. <:#302,9025><:><:><:><:>        FillEdit(8000, &menus)          ' Reload the box for next goround
  273.  
  274. <:#302,9025><:><:><:><:>wend
  275.  
  276. END FUNCTION<:p<* >>
  277.  
  278. <:#604,9025>' AddItem - This macro will add either an AmiPro function or macro to any of the standard
  279.  
  280. <:#604,9025>'   menus.    Because we can not pass anything to our callback routines we will keep
  281.  
  282. <:#302,9025>'   the information in global variables.
  283.  
  284. <:#302,9025>define      POSVAR  "Cust1"         ' Currently selected position
  285.  
  286. <:#302,9025>define      GHMENU  "Cust2"         ' Handle the menu in question.
  287.  
  288. <:#302,9025>
  289.  
  290. <:#302,9025><:ZAddItem>FUNCTION AddItem<:Z~AddItem>(menuname, amifuncnt, amifuns, menuids, menucnt, menus)
  291.  
  292. <:#302,9025>menuid = 0                          ' initialize all our variables
  293.  
  294. <:#302,9025>macroname = ""
  295.  
  296. <:#302,9025>itemname = ""
  297.  
  298. <:#302,9025>action = ""
  299.  
  300. <:#302,9025>Helptext = ""
  301.  
  302. <:#302,9025>temp = ""
  303.  
  304. <:#302,9025>itemnum = 0
  305.  
  306. <:#302,9025>pos = 0
  307.  
  308. <:#302,9025>accel = 0
  309.  
  310. <:#302,9025>hmenu = 0;
  311.  
  312. <:#302,9025>AllocGlobalVar(POSVAR, 1)
  313.  
  314. <:#302,9025>AllocGlobalVar(GHMENU, 1)
  315.  
  316. <:#604,9025>SetGlobalVar(POSVAR, 0)                     ' Position 0 indicates none selected (add to end)
  317.  
  318. <:#302,9025>SetGlobalVar(GHMENU, LocateHmenu(menuname));        ' get hMenu and save
  319.  
  320. <:#604,9025>stat = 2                                    ' Set stat so we execute dlgbox at least once
  321.  
  322. <:#604,9025>while (stat != 0 and stat != 1)             ' Do this till they cancel or ok it.
  323.  
  324. <:#302,9025>    FillEdit(1003, menuname)        ' Show em what we know so far.
  325.  
  326. <:#302,9025>    FillEdit(1005, action)
  327.  
  328. <:#302,9025>    FillEdit(8000, itemname)
  329.  
  330. <:#302,9025>    FillEdit(8001, helptext)
  331.  
  332. <:#302,9025>    FillEdit(8002, pos)
  333.  
  334. <:#302,9025>    ShowAccel(accel)
  335.  
  336. <:#604,9025>    ' For the "Insert Before Item" we really want to know what position on the menu to
  337.  
  338. <:#604,9025>    ' insert the new item.  We use a call back to simply determine which item was
  339.  
  340. <:#604,9025>    ' selected.  We dont sort the box so the CB_GETCURSEL will return the position
  341.  
  342. <:#604,9025>    ' we are intereted in.  Also we will use the special callback id == 0 to load this box.
  343.  
  344. <:#302,9025>    SetDlgCallBack(0, strcat$(GetRunningMacroFile$(), "!InitCombo"))
  345.  
  346. <:#604,9025><:><:>      SetDlgCallBack(9500, strcat$(GetRunningMacroFile$(),"!ComboCallback"))
  347.  
  348.     if (0 != Assign(&stat, DialogBox(".", "additem")))
  349.  
  350. <:#302,9025>            itemname = GetDialogField$(8000)        ' extract the item
  351.  
  352. <:#302,9025>            helptext = GetDialogField$(8001)        ' and help text
  353.  
  354. <:#604,9025>            pos = GetGlobalVar$(POSVAR)     ' get position from the global var
  355.  
  356. <:#302,9025>            accel = DetermineAccel()
  357.  
  358. <:#302,9025>    endif
  359.  
  360. <:#302,9025>    ' Now determine which button they pushed.
  361.  
  362. <:#302,9025>    switch stat
  363.  
  364. <:#302,9025>            case 4                                  ' Select macro
  365.  
  366. <:#604,9025>                    if ("" != Assign(&temp, GetMacro()))            ' Pick a macro
  367.  
  368. <:#302,9025>                            macroname = temp        ' yes update it
  369.  
  370. <:#302,9025>                            action = macroname
  371.  
  372. <:#302,9025>                            menuid = 0              ' And zero the menuid
  373.  
  374. <:#302,9025>                    endif
  375.  
  376. <:#302,9025>            case 3                                  ' AmiPro Function
  377.  
  378. <:#604,9025>                    if (0 != Assign(&itemnum, GetAmiPro(&amifuns, amifuncnt)))
  379.  
  380. <:#302,9025>                            macro = ""
  381.  
  382. <:#302,9025>                            menuid = *menuids(itemnum)
  383.  
  384. <:#302,9025>                            action = *amifuns(itemnum)
  385.  
  386. <:#302,9025>                    endif
  387.  
  388. <:#302,9025>    endswitch
  389.  
  390. <:#302,9025>wend
  391.  
  392. <:#302,9025>FreeGlobalVar(POSVAR);
  393.  
  394. <:#302,9025>FreeGlobalVar(GHMENU);
  395.  
  396. <:#604,9025>' If they have entered all information, make it take effect, then see if they want to make
  397.  
  398. <:#302,9025>' it permanent.
  399.  
  400. <:#302,9025>'
  401.  
  402. <:#302,9025>if ((stat) and (menuname != "") and ((menuid != 0) or (macroname != "")))
  403.  
  404. <:#604,9025>    if (accel)              ' if they made this an accelerator, add it to the itemname
  405.  
  406. <:#302,9025>            itemname = AddAccelStuff(itemname, accel)
  407.  
  408. <:#302,9025>    endif
  409.  
  410. <:#302,9025>    if (menuid != 0)                ' AmiPro Functoin?
  411.  
  412. <:#302,9025>            if (0 = pos)
  413.  
  414. <:#302,9025>                    AddMenuItem(1, menuname, itemname, menuid)
  415.  
  416. <:#302,9025>            else
  417.  
  418. <:#302,9025>                    InsertMenuItem(1, menuname, pos - 1, itemname, menuid)
  419.  
  420. <:#302,9025>            endif
  421.  
  422. <:#302,9025>            if (accel)
  423.  
  424. <:#302,9025>                    if getopenfilecount() << 1
  425.  
  426. <:#302,9025>                            new("~default.sty", 0, 0)
  427.  
  428. <:#302,9025>                    endif
  429.  
  430.                     Onkey(accel, menuid, "")
  431.  
  432. <:#302,9025>            endif
  433.  
  434. <:#302,9025>    else
  435.  
  436. <:#302,9025>            if (0 = pos)
  437.  
  438. <:#302,9025>                    AddMenuItem(1, menuname, itemname, macroname, helptext)
  439.  
  440. <:#302,9025>            else
  441.  
  442. <:#604,9025>                    InsertMenuItem(1, menuname, pos - 1, itemname, macroname, helptext)
  443.  
  444. <:#302,9025>            endif
  445.  
  446. <:#302,9025>            if (accel)
  447.  
  448. <:#302,9025>                    if getopenfilecount() << 1
  449.  
  450. <:#302,9025>                            new("~default.sty", 0, 0)
  451.  
  452. <:#302,9025>                    endif
  453.  
  454. <:#302,9025>                    OnKey(accel, 0, macroname)
  455.  
  456. <:#302,9025>            endif
  457.  
  458. <:#302,9025>    endif
  459.  
  460. <:#302,9025>    if (Decide("Keep settings for next session?"))
  461.  
  462. <:#604,9025><:><:><:><:>                AddToAutoexec(menuname, itemname, menuid, macroname, helptext, pos, accel)
  463.  
  464. <:#302,9025>    endif
  465.  
  466. <:#302,9025>elseif (1 = stat)           ' did they say ok but not specify enough stuff
  467.  
  468. <:#302,9025>    Message("Not all necessary information found")
  469.  
  470. <:#302,9025>endif
  471.  
  472. END FUNCTION<:p<* >>
  473.  
  474. <:#604,9025>' ComboCallBack - This gets called when the user has selected an item from the combo box.
  475.  
  476. <:#604,9025>'   we simply ask the combo box which one got selected, then we save that offset into
  477.  
  478. <:#302,9025>'   our global array.
  479.  
  480. <:#302,9025><:ZComboCallBack>FUNCTION ComboCallBack(hDlg, id, text)<:Z~ComboCallBack>
  481.  
  482. <:#604,9025>hCtrl = GetDlgItem(hDlg, id)                                ' Need HWND of the combo box
  483.  
  484. <:#302,9025>off= AppSendMessage(hCtrl, CB_GETCURSEL, 0, 0)      ' Ask him
  485.  
  486. <:#302,9025>SetGlobalVar(POSVAR, off)                                   ' Save it
  487.  
  488. <:#302,9025>END FUNCTION
  489.  
  490. <:#302,9025>'
  491.  
  492. <:#604,9025>' InitCombo - this is called before the dialog box is pulled up (SetDlgCallBack(0, InitCombo))
  493.  
  494. <:#604,9025>'   We get the menu handle from the global variale, then using windows calls, load the
  495.  
  496. <:#302,9025>'   combo box with items from that menu.
  497.  
  498. <:#302,9025><:ZInitCombo>FUNCTION InitCombo(hDlg)<:Z~InitCombo>
  499.  
  500. <:#302,9025><:><:>defstr        menuname;
  501.  
  502. <:#302,9025>hMenu = GetGlobalVar$(GHMENU)               ' Retrieve the handle to menu
  503.  
  504. <:#302,9025>SetDlgItemtext(hDlg, 9500, "")              ' Set a blank one at top
  505.  
  506. <:#302,9025>menucnt = GetMenuItemCount(hMenu)   ' Determin how many are on the menu
  507.  
  508. <:#302,9025>for i = 0 to menucnt - 1
  509.  
  510. <:#302,9025>    GetMenuString(hMenu, i, &menuname, 80, MF_BYPOSITION)
  511.  
  512. <:#302,9025>    if (0 << len(menuname))
  513.  
  514. <:#302,9025>            SetDlgItemText(hDlg, 9500,  menuname)
  515.  
  516. <:#302,9025>    else
  517.  
  518. <:#604,9025>            SetDlgItemText(hDlg, 9500, "------------------------------------")
  519.  
  520. <:#302,9025>    endif
  521.  
  522. <:#302,9025>next
  523.  
  524. <:#302,9025>' finally select one by position.
  525.  
  526. <:#604,9025>AppSendMessage(GetDlgItem(hDlg, 9500), CB_SETCURSEL, GetGlobalVar$(POSVAR), 0)
  527.  
  528. END FUNCTION<:p<* >>
  529.  
  530. <:#302,9025>
  531.  
  532. <:#604,9025>' AddAccelerator - Get either an amipro function or macro, and a key then make it an
  533.  
  534. <:#302,9025>'   accelerator.
  535.  
  536. <:#302,9025>'
  537.  
  538. <:#302,9025><:>FUNCTION <:ZAddAccelerator>AddAccelerator<:Z~AddAccelerator><:>(amifuncnt, amifuns, menuids)
  539.  
  540. <:#302,9025>menuid = 0
  541.  
  542. <:#302,9025>macroname = ""
  543.  
  544. <:#302,9025>action = ""
  545.  
  546. <:#302,9025>itemnum = 0
  547.  
  548. <:#302,9025>accel = 0
  549.  
  550. <:#302,9025>temp = ""
  551.  
  552. <:#302,9025>stat = 2
  553.  
  554. <:#604,9025>while (stat != 0 and stat != 1)             ' Do this till they cancel or ok it.
  555.  
  556. <:#302,9025>    FillEdit(1005, action)
  557.  
  558. <:#302,9025><:><:>      ShowAccel(accel)
  559.  
  560. <:#302,9025>    if (0 != Assign(&stat, DialogBox(".", "addaccel")))
  561.  
  562. <:#302,9025><:><:>              accel = DetermineAccel()
  563.  
  564. <:#302,9025>    endif
  565.  
  566. <:#302,9025>    switch stat
  567.  
  568. <:#604,9025>            case 4                                  ' They push the select macro
  569.  
  570. <:#604,9025>                    if ("" != Assign(&temp, GetMacro()))            ' Pick a macro
  571.  
  572. <:#302,9025>                            macroname = temp        ' yes update it
  573.  
  574. <:#302,9025>                            action = macroname
  575.  
  576. <:#302,9025>                            menuid = 0              ' And zero the menuid
  577.  
  578. <:#302,9025>                    endif
  579.  
  580. <:#302,9025>            case 3                                  ' AmiPro Function
  581.  
  582. <:#604,9025>                    if (0 != Assign(&itemnum, GetAmiPro(&amifuns, amifuncnt)))
  583.  
  584. <:#302,9025>                            macro = ""
  585.  
  586. <:#302,9025>                            menuid = *menuids(itemnum)
  587.  
  588. <:#302,9025>                            action = *amifuns(itemnum)
  589.  
  590. <:#302,9025>                    endif
  591.  
  592. <:#302,9025>    endswitch
  593.  
  594. <:#302,9025>wend
  595.  
  596. <:#302,9025>
  597.  
  598. <:#302,9025>if ((stat) and (accel != 0) and ((menuid != 0) or (macroname != "")))
  599.  
  600. <:#302,9025>    if getopenfilecount() << 1
  601.  
  602. <:#302,9025>            new("~default.sty", 0, 0)
  603.  
  604. <:#302,9025>    endif
  605.  
  606. <:#302,9025>    if (menuid != 0)
  607.  
  608. <:#302,9025>            Onkey(accel, menuid, "")
  609.  
  610.     else
  611.  
  612. <:#302,9025>            OnKey(accel, 0, macroname)
  613.  
  614. <:#302,9025>    endif
  615.  
  616. <:#302,9025>    if (Decide("Make this permanent?"))
  617.  
  618. <:#302,9025><:><:><:><:><:><:>          AddToAutoexec(0, 0, menuid, macroname, 0, 0, accel)
  619.  
  620. <:#302,9025>    endif
  621.  
  622. <:#302,9025>elseif (1 = stat)           ' did they say ok but not specify enough stuff
  623.  
  624. <:#302,9025>    Message("Not all necessary information found")
  625.  
  626. <:#302,9025>endif
  627.  
  628. <:#302,9025>END FUNCTION
  629.  
  630. <:#302,9025>
  631.  
  632. <:#604,9025>' DetermineAccel - turn the letter and the shift state check boxes into a number.
  633.  
  634. <:#302,9025>
  635.  
  636. <:#302,9025><:ZDetermineAccel>FUNCTION DetermineAccel()<:Z~DetermineAccel>
  637.  
  638. <:#302,9025>defstr      fkey;
  639.  
  640. <:#302,9025>accel = 0                                   ' Assume they did not hit any thing
  641.  
  642. <:#302,9025>key = GetDialogField$(8003)                 ' Get the letter
  643.  
  644. <:#302,9025>if ("" != key)                                      ' they type something?
  645.  
  646. <:#302,9025>    if (1 = len(key))                       ' Single letter?
  647.  
  648. <:#604,9025>                                                    ' The UCase is necessary because what
  649.  
  650. <:#604,9025>                                                    ' we really want is the virtual key.
  651.  
  652. <:#604,9025>            accel = asc(UCase$(Left$(key, 1)));     ' Yes, turn it into a virtual key
  653.  
  654. <:#302,9025>    else
  655.  
  656. <:#604,9025>            ' We only accept function keys here, they must be of the form "Fx" where the
  657.  
  658. <:#604,9025>            ' x is 1 - 12.  So first make sure that the first letter is a F.
  659.  
  660. <:#604,9025>            ' Then make sure the rest of it is numeric.  While we have it use assign to
  661.  
  662. <:#302,9025>            ' set fkey to that value.
  663.  
  664. <:#302,9025>            if ("F" = UCase$(Left$(key, 1)))
  665.  
  666. <:#302,9025>            AND IsNumeric(Assign(&fkey, Right$(key, Len(key) - 1)))
  667.  
  668. <:#604,9025>                    ' Set accel to the virtual key F0.  NOTE the BracketsToBin is
  669.  
  670. <:#604,9025>                    ' necessary because asc returns the value of the first character of its
  671.  
  672. <:#604,9025>                    ' input.  Since there is no F0, assign it to F1 then subtract 1.
  673.  
  674. <:#302,9025>                    accel = asc(BracketsToBin("<[>F1]")) - 1
  675.  
  676. <:#604,9025>                    accel = accel + fkey;                   ' Bump it up to the proper value
  677.  
  678. <:#302,9025>            else
  679.  
  680.                     Message("Invalid key.  It must be A - Z or F1 to F12");
  681.  
  682. <:#302,9025>                    return 0;
  683.  
  684. <:#302,9025>            endif
  685.  
  686. <:#302,9025>    endif
  687.  
  688. <:#302,9025>    if (GetDialogField$(21))                ' Now add in the shift states.
  689.  
  690. <:#302,9025>            accel = accel | 0x4000;
  691.  
  692. <:#302,9025>            endif
  693.  
  694. <:#302,9025>    if (GetDialogField$(22))
  695.  
  696. <:#302,9025>            accel = accel | 0x1000;
  697.  
  698. <:#302,9025>    endif
  699.  
  700. <:#302,9025>    if (GetDialogField$(23))
  701.  
  702. <:#302,9025>            accel = accel | 0x2000;
  703.  
  704. <:#302,9025>    endif
  705.  
  706. <:#302,9025>endif
  707.  
  708. <:#302,9025>
  709.  
  710. <:#302,9025>return accel;
  711.  
  712. <:#302,9025>END FUNCTION
  713.  
  714. <:#302,9025>'
  715.  
  716. <:#302,9025>' ShowAccel - given the accelerate prime the dialog box.
  717.  
  718. <:#302,9025>
  719.  
  720. <:#302,9025><:ZShowAccel>FUNCTION ShowAccel(accel)<:Z~ShowAccel>
  721.  
  722. <:#302,9025>if (0 != accel)
  723.  
  724. <:#604,9025>    FillEdit(21, accel & 0x4000);           ' Set the check boxes for ctrl, shift and alt
  725.  
  726. <:#302,9025>    FillEdit(22, accel & 0x1000);
  727.  
  728. <:#302,9025>    FillEdit(23, accel & 0x2000);
  729.  
  730. <:#302,9025>    accel = accel & 0xff;                   ' Strip off the shift states.
  731.  
  732. <:#302,9025>    lowf = asc(BracketsToBin("<[>f1]"))     ' Get virtual key for F1.
  733.  
  734. <:#302,9025>    if (lowf <<= accel AND accel <<= (lowf + 12))
  735.  
  736. <:#302,9025>            ' Create the "Fx" using strcat$.
  737.  
  738. <:#302,9025>            FillEdit(8003, strcat$("F", chr$(0x31 + (accel - lowf))))
  739.  
  740. <:#302,9025>    else
  741.  
  742. <:#302,9025>            FillEdit(8003, chr$(accel))
  743.  
  744. <:#302,9025>    endif
  745.  
  746. <:#302,9025>endif
  747.  
  748. END FUNCTION<:p<* >>
  749.  
  750. <:#302,9025>
  751.  
  752. <:#604,9025>' AddAccelStuff - given the itemname (what will show on the menu) add in a accelerator
  753.  
  754. <:#302,9025>'   key of the form CTRL+Z or ALT+F4
  755.  
  756. <:#302,9025>
  757.  
  758. <:#302,9025><:ZAddAccelStuff>FUNCTION AddAccelStuff(itemname, accel)<:Z~AddAccelStuff>
  759.  
  760. <:#302,9025>shift = "";
  761.  
  762. <:#302,9025>if (accel & 0x4000)
  763.  
  764. <:#302,9025>    shift = strcat$(shift, "Ctrl+")
  765.  
  766. <:#302,9025>endif
  767.  
  768. <:#302,9025>if (accel & 0x1000)
  769.  
  770. <:#302,9025>    shift = strcat$(shift, "Shift+");
  771.  
  772. <:#302,9025>endif
  773.  
  774. <:#302,9025>if (accel & 0x2000)
  775.  
  776. <:#302,9025>    shift = strcat$(shift, "Alt+");
  777.  
  778. <:#302,9025>endif
  779.  
  780. <:#302,9025>accel = accel & 0xff;                       ' Strip off the shift states.
  781.  
  782. <:#302,9025>lowf = asc(BracketsToBin("<[>f1]")) ' Get virtual key for F1.
  783.  
  784. <:#302,9025>if (lowf <<= accel AND accel <<= (lowf + 12))
  785.  
  786. <:#302,9025>    ' Create the "Fx" using strcat$.
  787.  
  788. <:#302,9025>    text = strcat$("F", chr$(0x31 + (accel - lowf)))
  789.  
  790. <:#302,9025>else
  791.  
  792. <:#302,9025>    text = chr$(accel)
  793.  
  794. <:#302,9025>endif
  795.  
  796. <:#302,9025>shift = strcat$(shift, text);
  797.  
  798. <:#302,9025>return strcat$(itemname, "  ", shift);
  799.  
  800. <:#302,9025>END FUNCTION
  801.  
  802. <:#302,9025>
  803.  
  804. <:#302,9025>' :LoadMenus - fill the callers array with top level menu names
  805.  
  806. <:#302,9025>'
  807.  
  808. <:#302,9025>FUNCTION <:ZLoadMenus>LoadMenus<:Z~LoadMenus>(menus)
  809.  
  810. <:#302,9025>
  811.  
  812. <:#302,9025>*menus(1) = "╬─╝■(&F)";
  813.  
  814. <:#302,9025>*menus(2) = "▒α╝¡(&E)";
  815.  
  816. <:#302,9025>*menus(3) = "▓Θ┐┤(&V)";
  817.  
  818. <:#302,9025>*menus(4) = "╬─╫╓(&T)";
  819.  
  820. <:#302,9025>*menus(5) = "╤∙╩╜(&S)";
  821.  
  822. <:#302,9025>*menus(6) = "░µ├µ(&P)";
  823.  
  824. <:#302,9025>*menus(7) = "═╝╬─┐≥(&R)";
  825.  
  826. <:#302,9025>*menus(8) = "╣ñ╛▀(&L)";
  827.  
  828. <:#302,9025>return 8
  829.  
  830. END FUNCTION<:p<* >>
  831.  
  832. <:#302,9025>'
  833.  
  834. <:#604,9025>' GetMacro - put up the macro list dialog box, and let the user pick a macro.
  835.  
  836. <:#302,9025>'   Return the macroname or a null string if they canceled out.
  837.  
  838. <:#302,9025><:><:ZGetMacro>Function GetMacro<:Z~GetMacro><:>()
  839.  
  840. <:#302,9025>onerror endit
  841.  
  842. <:#302,9025>oncancel endit
  843.  
  844. <:#302,9025>StatusBarMsg("One moment please...")
  845.  
  846. <:#604,9025>DOSchdir(GetMacPath$())             ' Change to macro directory before the dialogbox
  847.  
  848. <:#302,9025>FillEdit(9001, "*.smm")
  849.  
  850. <:#302,9025>StatusBarMsg("")
  851.  
  852. <:#302,9025>if (1 = DialogBox(".", "macrolst"))
  853.  
  854. <:#302,9025>
  855.  
  856. <:#604,9025>    ' GetDialogField will only return the filename, we want the entire path, so
  857.  
  858. <:#604,9025>    ' concatenate it with the current directory (the dialog box may have changed it)
  859.  
  860. <:#604,9025>    ' then lowercase everything so it looks better in the top level dialog box.
  861.  
  862. <:#302,9025>    macname = lcase$(strcat$(GetCurrentDir$(), GetDialogField$(8001)));
  863.  
  864. <:#302,9025>else
  865.  
  866. <:#302,9025>    macname = ""            ' cancel return null string.
  867.  
  868. <:#302,9025>endif
  869.  
  870. <:#302,9025>endit:
  871.  
  872. <:#302,9025>return macname;
  873.  
  874. <:#302,9025>StatusBarMsg("")
  875.  
  876. END FUNCTION<:p<* >>
  877.  
  878. <:#302,9025>' LoadAmiFuns - open the control file and load the two arrays.
  879.  
  880. <:#604,9025>'   This control file contains one line entries, each havig two fields.  The first is a
  881.  
  882. <:#302,9025>'   description of the function, the next it the MenuId.
  883.  
  884. <:#302,9025>'
  885.  
  886. <:#302,9025><:ZLoadAmiFuns>FUNCTION LoadAmiFuns<:Z~LoadAmiFuns>(names, menuids)
  887.  
  888. <:#302,9025>onerror endit
  889.  
  890. <:#302,9025>oncancel endit
  891.  
  892. <:#302,9025>StatusBarMsg("Loading control files...")    ' Tell en to wait
  893.  
  894. <:#302,9025>cnt = 0
  895.  
  896. <:#302,9025>hourglass(1)
  897.  
  898. <:#302,9025>defstr line. fid, line;
  899.  
  900. <:#604,9025>if (0 != Assign(&fid, fopen(strcat$(GetMacPath$(),"amifuns"), "r")))                ' File open ok?
  901.  
  902. <:#302,9025>    while (-1 != Assign(&line, fgets$(fid)))        ' Read till end of file
  903.  
  904. <:#302,9025>            cnt = cnt + 1                           ' bump the count
  905.  
  906. <:#302,9025>            name = StrField$(line, 1, "`")          ' grab out the
  907.  
  908. <:#302,9025>            num = StrField$(line, 2, "`");          ' name and number
  909.  
  910. <:#302,9025>            *names(cnt) = name;                     ' and stuff the arrays
  911.  
  912. <:#302,9025>            *menuids(cnt) = num;
  913.  
  914. <:#302,9025>    wend
  915.  
  916. <:#302,9025>    fclose(fid)
  917.  
  918. <:#302,9025>else
  919.  
  920. <:#302,9025>    Message("Failed to open function file AMIFUNS")
  921.  
  922. <:#302,9025>endif
  923.  
  924. <:#302,9025>endit:
  925.  
  926. <:#302,9025>hourglass(0)
  927.  
  928. <:#302,9025>StatusBarMsg("")
  929.  
  930. <:#302,9025>return cnt
  931.  
  932. END FUNCTION<:p<* >>
  933.  
  934. <:#302,9025>'
  935.  
  936. <:#302,9025>' GetAmiPro - let them pick an AmiPro function from the passed list
  937.  
  938. <:#302,9025>'   Return the index into the passed array or 0 if the user canceled.
  939.  
  940. <:#302,9025><:><:ZGetAmiPro>FUNCTION GetAmiPro<:Z~GetAmiPro><:>(names, cnt)
  941.  
  942. <:#302,9025>onerror endit
  943.  
  944. <:#302,9025>oncancel endit
  945.  
  946. <:#302,9025>StatusBarMsg("One moment please...")
  947.  
  948. <:#302,9025>hourglass(1)
  949.  
  950. <:#302,9025>FillEdit(8000, &names)
  951.  
  952. <:#302,9025>hourglass(0)
  953.  
  954. <:#302,9025>endit:
  955.  
  956. <:#302,9025>StatusBarMsg("")
  957.  
  958. <:#302,9025>i = 0                                               ' set default return status
  959.  
  960. <:#302,9025>if 1 = DialogBox(".", "funclst")            ' They hit OK?
  961.  
  962. <:#302,9025>    selected = GetDialogField$(9000)        ' Yes, get the text
  963.  
  964. <:#302,9025>    for i = 1 to cnt                        ' Now run through the array
  965.  
  966. <:#302,9025>            if selected = *names(i) ' to find the index
  967.  
  968. <:#302,9025>                    break
  969.  
  970. <:#302,9025>            endif
  971.  
  972. <:#302,9025>    next
  973.  
  974. <:#302,9025>endif
  975.  
  976. <:#302,9025>return i
  977.  
  978. <:#302,9025>END FUNCTION
  979.  
  980. <:p<* >>
  981.  
  982. <:#302,9025>'
  983.  
  984. <:#604,9025>' AddToAutoExec - Add lines to the autoexec.smm file that will add a new menu item
  985.  
  986. <:#302,9025>'
  987.  
  988. <:#604,9025><:ZAddToAutoExec>FUNCTION AddToAutoexec<:Z~AddToAutoExec>(menuname, itemname, menuid, macroname, helptext, pos, accel)
  989.  
  990. <:#302,9025>declare OpenAutoExec()
  991.  
  992. <:#302,9025><:><:>OpenAutoExec()                                ' open autoexec.smm and position
  993.  
  994. <:#302,9025>
  995.  
  996. <:#302,9025>if (accel != 0)                                     ' This one have an accelerator?
  997.  
  998. <:#302,9025>    type("accel = {accel}<[>enter]")
  999.  
  1000. <:#302,9025>    type("menuid = {menuid}<[>enter]")
  1001.  
  1002. <:#302,9025>    type("macroname = ""{macroname}""<[>enter]")
  1003.  
  1004. <:#302,9025>    type("OnKey(accel, menuid, macroname)")
  1005.  
  1006. <:#302,9025>endif
  1007.  
  1008. <:#302,9025>if (0 != menuname)
  1009.  
  1010. <:#302,9025>    type("menuname = ""{menuname}""<[>enter]")      ' make variable assignments
  1011.  
  1012. <:#604,9025>    type("itemname = ""{itemname}""<[>enter]")      ' so the AddmenuItem line wont be to long.
  1013.  
  1014. <:#302,9025>    if (0 != menuid)                                ' We adding an AmiPro Function?
  1015.  
  1016. <:#302,9025>            type("menuid = {menuid}<[>enter]")      ' Yes
  1017.  
  1018. <:#302,9025>            if (0 = pos)
  1019.  
  1020. <:#604,9025>                    type("AddmenuItem(1, {{menuname}, {{itemname}, {{menuid})")
  1021.  
  1022. <:#302,9025>            else
  1023.  
  1024. <:#302,9025>                    pos = pos - 1;
  1025.  
  1026. <:#302,9025>                    type("pos = {pos}<[>enter]")
  1027.  
  1028. <:#604,9025>                    type("InsertMenuItem(1, {{menuname}, {{pos}, {{itemname}, {{menuid})")
  1029.  
  1030. <:#302,9025>            endif
  1031.  
  1032. <:#302,9025>    else
  1033.  
  1034. <:#604,9025>            type("macroname = ""{macroname}""<[>enter]")            ' its a macro.
  1035.  
  1036. <:#302,9025>            type("helptext = ""{helptext}""<[>enter]")
  1037.  
  1038. <:#302,9025>            if (0 = pos)
  1039.  
  1040. <:#604,9025>                    type("AddmenuItem(1, {{menuname}, {{itemname}, {{macroname}, {{helptext})")
  1041.  
  1042. <:#302,9025>            else
  1043.  
  1044. <:#302,9025>                    pos = pos - 1;
  1045.  
  1046. <:#302,9025>                    type("pos = {pos}<[>enter]");
  1047.  
  1048. <:#302,9025>                    type("InsertMenuItem(1, {{menuname}, {{pos},");
  1049.  
  1050. <:#302,9025>                    type(" {{itemname}, {{macroname}, {{helptext})");
  1051.  
  1052. <:#302,9025>            endif
  1053.  
  1054. <:#302,9025>    endif
  1055.  
  1056. <:#302,9025>endif
  1057.  
  1058. Save()                                      ' and save it
  1059.  
  1060. <:#302,9025>FileClose()                         ' and close it
  1061.  
  1062. <:#302,9025>END FUNCTION
  1063.  
  1064. <:#302,9025>
  1065.  
  1066. <:#302,9025>' DelFromAutoExec - Add lines in the autoexec to delete a menu item.
  1067.  
  1068. <:#302,9025>
  1069.  
  1070. <:#302,9025><:ZDelFromAutoExec>FUNCTION DelFromAutoexec(<:Z~DelFromAutoExec>menuname, itemname)
  1071.  
  1072. <:#302,9025>declare OpenAutoExec()
  1073.  
  1074. <:#302,9025>OpenAutoExec()                              ' open autoexec.smm and position
  1075.  
  1076. <:#302,9025>type("menuname = ""{menuname}""<[>enter]")  ' make variable assignments
  1077.  
  1078. <:#604,9025>type("itemname = ""{itemname}""<[>enter]")  ' so the AddmenuItem statement wont be to long.
  1079.  
  1080. <:#302,9025>type("DeleteMenuItem(1, {{menuname}, {{itemname})")
  1081.  
  1082. <:#302,9025>Save()                                      ' and save it
  1083.  
  1084. <:#302,9025>FileClose()                         ' and close it
  1085.  
  1086. <:#302,9025>END FUNCTION
  1087.  
  1088. '<:p<* >>
  1089.  
  1090. <:#604,9025>' OpenAutoExec - Open-Create the autoexec.smm then position the insertion point just before
  1091.  
  1092. <:#302,9025>'   the first END FUNCTION
  1093.  
  1094. <:#302,9025>'
  1095.  
  1096. <:#302,9025><:ZOpenAutoExec>FUNCTION OpenAutoExec(<:Z~OpenAutoExec>)
  1097.  
  1098. <:#302,9025>defstr fid;
  1099.  
  1100. <:#302,9025><:ZMACUTEMP><:Z~MACUTEMP>auto = FindAutoExec();                     ' Determine where the autoexec is
  1101.  
  1102. <:#302,9025>if (0 = Assign(&fid, fopen(auto, "r")))     ' Does it exist?
  1103.  
  1104. <:#302,9025>    new("~default.sty", 0, 0)               ' No let ami create it.
  1105.  
  1106. <:#302,9025>    type("FUNCTION auto()<[>enter]")        ' And fill in an empty
  1107.  
  1108. <:#302,9025>    type("END FUNCTION<[>enter]")   ' Function - End Function Pait
  1109.  
  1110. <:#302,9025>    type("<[>ctrlhome]")                    ' Position at top of file
  1111.  
  1112. <:#302,9025>    saveas(auto, 32,"", "")                 ' Create it.
  1113.  
  1114. <:#302,9025>else
  1115.  
  1116. <:#302,9025>    fclose(fid)                             ' it existed. so close this
  1117.  
  1118. <:#302,9025>    FileOpen(auto, 1, "")                   ' let ami open
  1119.  
  1120. <:#302,9025>endif
  1121.  
  1122. <:#302,9025>Replace(0, 0, 24576, "End function", "")    ' position at first end function
  1123.  
  1124. <:#302,9025>type("<[>home]")                                    ' before the End
  1125.  
  1126. <:#302,9025>type("<[>enter]")                                   ' create a line
  1127.  
  1128. <:#302,9025>type("<[>up]")                                      ' position on that line
  1129.  
  1130. <:#302,9025>END FUNCTION                                ' that all folks
  1131.  
  1132. <:#302,9025>'
  1133.  
  1134. <:#604,9025>' FindAutoExec - determine where the autoexec.smm file is.  If we can find it in the macro
  1135.  
  1136. <:#302,9025>'   directory or the docs directory, return the amipro directory.
  1137.  
  1138. <:#302,9025>'
  1139.  
  1140. <:#302,9025><:ZFindAutoExec>FUNCTION FindAutoExec()<:Z~FindAutoExec>
  1141.  
  1142. <:#302,9025>defstr      fid;
  1143.  
  1144. <:#302,9025>auto = strcat$(GetMacPath$(), "autoexec.smm")       ' check macro dir first
  1145.  
  1146. <:#302,9025>if (0 = Assign(&fid, fopen(auto, "r")))     ' Does it exist?
  1147.  
  1148. <:#302,9025>    auto = strcat$(GetDocPath$(), "autoexec.smm")   ' Now the docs dir
  1149.  
  1150. <:#302,9025>    if (0 = Assign(&fid, fopen(auto, "r"))) ' Does it exist?
  1151.  
  1152. <:#604,9025>            auto = strcat$(GetAmiDirectory$(), "autoexec.smm")      ' lastly amipro dir
  1153.  
  1154. <:#302,9025>    else
  1155.  
  1156. <:#302,9025>            fclose(fid)
  1157.  
  1158. <:#302,9025>    endif
  1159.  
  1160. <:#302,9025>else
  1161.  
  1162. <:#302,9025>    fclose(fid)
  1163.  
  1164. <:#302,9025>endif
  1165.  
  1166. <:#302,9025>return auto
  1167.  
  1168. END FUNCTION<:p<* >>
  1169.  
  1170. <:#604,9025>' LocateHmenu Given a menuname (File, Edit etc) return the handle to that menu.
  1171.  
  1172. <:#302,9025>
  1173.  
  1174. <:#302,9025><:ZLocateHmenu>FUNCTION LocateHmenu(menu)<:Z~LocateHmenu>
  1175.  
  1176. <:#302,9025>hWnd = GetActiveWindow()                            ' Who is active
  1177.  
  1178. <:#302,9025>hPrevWnd = hWnd;
  1179.  
  1180. <:#604,9025>while 0 != Assign(&hWnd, GetParent(hWnd))   ' Go til we find a window with no parent
  1181.  
  1182. <:#302,9025>    hPrevWnd = hWnd;
  1183.  
  1184. <:#302,9025>wend
  1185.  
  1186. <:#302,9025>hWnd = hPrevWnd;
  1187.  
  1188. <:#302,9025>hMenu = GetMenu(hWnd)                               ' Get the hMenu for the menu bar
  1189.  
  1190. <:#302,9025><:><:><:><:><:><:>return FindMenu(hMenu, Menu)                      ' Find the menu
  1191.  
  1192. <:#302,9025>END FUNCTION
  1193.  
  1194. <:#302,9025>
  1195.  
  1196. <:#604,9025>' DelMenu - pass us a menu name (File, Edit etc) and we will display a list box with all items
  1197.  
  1198. <:#302,9025>'   From that menu and let the user delete one.
  1199.  
  1200. <:#302,9025>FUNCTION <:ZDelMenu>DelMenu<:Z~DelMenu>(Menu)
  1201.  
  1202. <:#302,9025>hWnd = GetActiveWindow()
  1203.  
  1204. <:#302,9025>hPrevWnd = hWnd;
  1205.  
  1206. <:#302,9025>while 0 != Assign(&hWnd, GetParent(hWnd))
  1207.  
  1208. <:#302,9025>    hPrevWnd = hWnd;
  1209.  
  1210. <:#302,9025>wend
  1211.  
  1212. <:#302,9025>hWnd = hPrevWnd;
  1213.  
  1214. <:#302,9025>hMenu = GetMenu(hWnd)
  1215.  
  1216. <:#302,9025><:><:><:><:><:><:>if (0 != Assign(&hMenu, FindMenu(hMenu, Menu)))   ' If we can find that menu
  1217.  
  1218. <:#302,9025><:><:><:><:>        LoadTheBox(hMenu, 9000);                                ' Load the list box
  1219.  
  1220. <:#302,9025>    if (1 = DialogBox(".", "DelMenu"))                      ' Let em pick one
  1221.  
  1222. <:#302,9025>            item = GetDialogField$(9000)
  1223.  
  1224. <:#302,9025>            DeleteMenuItem(1, menu, item)           ' Delete it
  1225.  
  1226. <:#302,9025>            if (Decide("Make this permanent?"))
  1227.  
  1228. <:#302,9025>                    DelFromAutoExec(menu, item)
  1229.  
  1230. <:#302,9025>            endif
  1231.  
  1232. <:#302,9025>    endif
  1233.  
  1234. <:#302,9025>endif
  1235.  
  1236. END FUNCTION<:p<* >>
  1237.  
  1238. <:#604,9025>' LoadTheBox - given a hMenu and id load it with all menu items, includeing seiarators.
  1239.  
  1240. <:#302,9025>'
  1241.  
  1242. <:#302,9025>FUNCTION <:ZLoadTheBox>LoadTheBox<:Z~LoadTheBox>(hMenu, id)
  1243.  
  1244. <:#302,9025>defstr      menuname;
  1245.  
  1246. <:#302,9025>menucnt = GetMenuItemCount(hMenu)           'Find out how many
  1247.  
  1248. <:#302,9025>for i = 0 to menucnt - 1
  1249.  
  1250. <:#302,9025>    GetMenuString(hMenu, i, &menuname, 80, MF_BYPOSITION)   ' Get one
  1251.  
  1252. <:#302,9025>    if (0 << len(menuname))
  1253.  
  1254. <:#302,9025>            FillEdit(id, menuname)
  1255.  
  1256. <:#302,9025>    else
  1257.  
  1258. <:#302,9025>            FillEdit(id, "------------------------------------")
  1259.  
  1260. <:#302,9025>    endif
  1261.  
  1262. <:#302,9025>next
  1263.  
  1264. <:#302,9025>
  1265.  
  1266. <:#302,9025>END FUNCTION
  1267.  
  1268. <:#302,9025>'
  1269.  
  1270. <:#302,9025>' FindMenu - Given a hMenu and name, return a handle that that menu.
  1271.  
  1272. <:#302,9025>FUNCTION <:ZFindMenu>FindMenu<:Z~FindMenu>(hMenu, Name)
  1273.  
  1274. <:#302,9025>defstr      menuname;
  1275.  
  1276. <:#302,9025>menucnt = GetMenuItemCount(hMenu)           ' How many
  1277.  
  1278. <:#302,9025>for i = 0 to menucnt - 1
  1279.  
  1280. <:#302,9025>    GetMenuString(hMenu, i, &menuname, 80, MF_BYPOSITION)
  1281.  
  1282. <:#302,9025>    if (Name = menuname)                    ' Match?
  1283.  
  1284. <:#302,9025>            hMenu = GetSubMenu(hMenu, i);   ' Yes, get its handle.
  1285.  
  1286. <:#302,9025>            return hMenu;
  1287.  
  1288. <:#302,9025>    endif
  1289.  
  1290. <:#302,9025>next
  1291.  
  1292. <:#302,9025>return 0
  1293.  
  1294. <:#302,9025>END FUNCTION
  1295.  
  1296. <:#302,9025>
  1297.  
  1298. <:p<* >>
  1299.  
  1300. <:#302,9025>
  1301.  
  1302. <:#302,9025>DIALOG DelMenu
  1303.  
  1304. <:#302,9025>-2134376448 4 134 38 132 86 "" "" "Delete Menu Item"
  1305.  
  1306. <:#288,9025>FONT 12 "System"
  1307.  
  1308. <:#302,9025>86 4 40 14 1 1342242817 "button" "OK" 0
  1309.  
  1310. <:#302,9025>86 20 40 14 2 1342242816 "button" "Cancel" 0
  1311.  
  1312. <:#302,9025>6 40 120 42 9000 1352728577 "listbox" "" 0
  1313.  
  1314. <:#302,9025>6 30 56 8 1000 1342177280 "static" "&Menu items:" 0
  1315.  
  1316. <:#302,9025>END DIALOG
  1317.  
  1318. <:#302,9025>
  1319.  
  1320. <:#302,9025>DIALOG PickMenu
  1321.  
  1322. <:#302,9025>-2134376448 6 146 34 131 74 "" "" "Customize Menus"
  1323.  
  1324. <:#288,9025>FONT 12 "System"
  1325.  
  1326. <:#302,9025>5 14 56 54 9000 1352728579 "listbox" "" 0
  1327.  
  1328. <:#302,9025>67 4 58 14 2 1342242816 "button" "Done" 0
  1329.  
  1330. <:#302,9025>67 20 58 14 5 1342242816 "button" "&Add..." 0
  1331.  
  1332. <:#302,9025>67 36 58 14 6 1342242816 "button" "&Delete..." 0
  1333.  
  1334. <:#302,9025>5 4 56 8 1000 1342177280 "static" "&Menus:" 0
  1335.  
  1336. <:#302,9025>67 52 58 14 7 1342242816 "button" "A&ccelerators..." 0
  1337.  
  1338. <:#302,9025>END DIALOG
  1339.  
  1340. <:#302,9025>
  1341.  
  1342. <:#302,9025><:>DIALOG AddItem
  1343.  
  1344. <:#302,9025>-2134376448 20 51 26 242 104 "" "" "Add Menu Item"
  1345.  
  1346. <:#288,9025>FONT 12 "System"
  1347.  
  1348. <:#302,9025>6 16 82 8 1000 1342177282 "static" "Name for Menu:" 0
  1349.  
  1350. <:#302,9025>90 14 84 12 8000 1350631552 "edit" "" 0
  1351.  
  1352. <:#302,9025>6 30 82 8 1006 1342177282 "static" "Insert before:" 0
  1353.  
  1354. <:#302,9025>96 76 40 8 1001 1342177280 "static" "Help text:" 0
  1355.  
  1356. <:#302,9025>178 38 58 14 3 1342242816 "button" "Add Function..." 0
  1357.  
  1358. <:#302,9025>178 54 58 14 4 1342242816 "button" "Add Macro..." 0
  1359.  
  1360. <:#302,9025>96 84 138 12 8001 1350631552 "edit" "" 0
  1361.  
  1362. <:#302,9025>10 74 18 12 8003 1350631552 "edit" "" 0
  1363.  
  1364. <:#302,9025>6 52 86 44 20 1342177287 "button" "Accelerator" 0
  1365.  
  1366. <:#302,9025>50 64 38 10 21 1342242819 "button" "Control" 0
  1367.  
  1368. <:#302,9025>50 74 38 10 22 1342242819 "button" "Shift" 0
  1369.  
  1370. <:#302,9025>50 84 38 10 23 1342242819 "button" "Alt" 0
  1371.  
  1372. <:#302,9025>6 4 82 8 1002 1342177282 "static" "Add to menu:" 0
  1373.  
  1374. <:#302,9025>196 6 40 14 1 1342242817 "button" "OK" 0
  1375.  
  1376. <:#302,9025>196 22 40 14 2 1342242816 "button" "Cancel" 0
  1377.  
  1378. <:#302,9025>90 4 84 8 1003 1342177280 "static" "" 0
  1379.  
  1380. <:#302,9025>6 42 82 8 1004 1342177282 "static" "Function/macro to add:" 0
  1381.  
  1382. <:#302,9025>90 42 84 8 1005 1342177280 "static" "" 0
  1383.  
  1384. <:#302,9025>10 64 38 10 1007 1342177280 "static" "Keystroke:" 0
  1385.  
  1386. <:#302,9025>90 28 84 58 9500 1344274435 "combobox" "" 0
  1387.  
  1388. <:#302,9025>END DIALOG
  1389.  
  1390.  
  1391. <:#302,9025>DIALOG AddAccel
  1392.  
  1393. <:#302,9025>-2134376448 12 91 28 208 72 "" "" "Add Accelerator"
  1394.  
  1395. <:#302,9025>FONT 8 "Helv"
  1396.  
  1397. <:#302,9025>150 36 52 14 3 1342242816 "button" "Function..." 0
  1398.  
  1399. <:#302,9025>150 52 52 14 4 1342242816 "button" "Macro..." 0
  1400.  
  1401. <:#302,9025>10 34 18 12 8003 1350631552 "edit" "" 0
  1402.  
  1403. <:#302,9025>6 14 90 44 20 1342177287 "button" "Accelerator" 0
  1404.  
  1405. <:#302,9025>50 26 36 10 21 1342242819 "button" "Control" 0
  1406.  
  1407. <:#302,9025>50 36 38 10 22 1342242819 "button" "Shift" 0
  1408.  
  1409. <:#302,9025>50 46 38 10 23 1342242819 "button" "Alt" 0
  1410.  
  1411. <:#302,9025>162 4 40 14 1 1342242817 "button" "OK" 0
  1412.  
  1413. <:#302,9025>162 20 40 14 2 1342242816 "button" "Cancel" 0
  1414.  
  1415. <:#302,9025>6 4 64 10 1004 1342177280 "static" "Function/macro:" 0
  1416.  
  1417. <:#302,9025>74 4 80 10 1005 1342177280 "static" "text" 0
  1418.  
  1419. <:#302,9025>10 26 38 8 1007 1342177280 "static" "Keystroke:" 0
  1420.  
  1421. <:#302,9025>END DIALOG
  1422.  
  1423. <:#302,9025>
  1424.  
  1425. <:#302,9025>DIALOG MacroLst
  1426.  
  1427. <:#302,9025>-2134376448 6 108 30 154 90 "" "" "Add Macro "
  1428.  
  1429. <:#302,9025>FONT 8 "Helv"
  1430.  
  1431. <:#302,9025>8 16 60 12 8001 1350631552 "edit" "" 0
  1432.  
  1433. <:#302,9025>8 32 60 54 9001 1352728579 "listbox" "" 0
  1434.  
  1435. <:#302,9025>72 38 74 8 7999 1342177280 "static" "" 0
  1436.  
  1437. <:#302,9025>106 4 40 14 1 1342242817 "button" "OK" 0
  1438.  
  1439. <:#302,9025>106 20 40 14 2 1342242816 "button" "Cancel" 0
  1440.  
  1441. <:#302,9025>8 6 68 8 1001 1342177280 "static" "Macro to execute:" 0
  1442.  
  1443. <:#302,9025>END DIALOG
  1444.  
  1445. <:#302,9025>
  1446.  
  1447. <:#302,9025>DIALOG FuncLst
  1448.  
  1449. <:#302,9025>-2134376448 4 112 28 158 68 "" "" "Add Function"
  1450.  
  1451. <:#302,9025>FONT 8 "Helv"
  1452.  
  1453. <:#302,9025>6 16 100 46 9000 1352728579 "listbox" "" 0
  1454.  
  1455. <:#302,9025>6 6 66 8 1000 1342177280 "static" "&Ami Pro functions:" 0
  1456.  
  1457. <:#302,9025>112 6 40 14 1 1342242817 "button" "OK" 0
  1458.  
  1459. <:#302,9025>112 22 40 14 2 1342242816 "button" "Cancel" 0
  1460.  
  1461. END DIALOG
  1462.  
  1463. >
  1464.  
  1465. [Embedded]
  1466. 00038977
  1467. >
  1468. [macsum] 26
  1469. CustMenu 0 0 8 41
  1470. AddItem 594 6 13 82
  1471. ComboCallBack 2446 3 3 177
  1472. InitCombo 2556 1 5 186
  1473. AddAccelerator 3036 3 9 206
  1474. DetermineAccel 4026 0 4 255
  1475. ShowAccel 4673 1 2 297
  1476. AddAccelStuff 5064 2 4 316
  1477. LoadMenus 5569 1 1 341
  1478. GetMacro 5809 0 2 356
  1479. LoadAmiFuns 6099 2 7 380
  1480. GetAmiPro 6582 2 3 407
  1481. AddToAutoexec 6942 7 1 431
  1482. DelFromAutoexec 7833 2 1 472
  1483. OpenAutoExec 8011 0 3 485
  1484. FindAutoExec 8366 0 3 507
  1485. LocateHmenu 8720 1 4 524
  1486. DelMenu 8987 1 5 537
  1487. LoadTheBox 9477 2 4 558
  1488. FindMenu 9841 2 4 573
  1489. DelMenu 10184 0 -1 588
  1490. PickMenu 10462 0 -1 597
  1491. AddItem 10844 0 -1 608
  1492. AddAccel 11921 0 -1 633
  1493. MacroLst 12594 0 -1 650
  1494. FuncLst 12953 0 -1 661
  1495. [macse]
  1496. 14 CustMenu
  1497. 5 20
  1498. 21 1 [X]
  1499. 5 100
  1500. 21 2 [X]
  1501. 5 100
  1502. 21 3 [X]
  1503. 16 LoadMenus &1
  1504. 13
  1505. 8 4
  1506. 16 LoadAmiFuns &2 &3
  1507. 13
  1508. 8 5
  1509. 0 789 ""
  1510. 0 31 8000 &1
  1511. 5 1
  1512. 0 26 "." "PickMenu"
  1513. 13
  1514. 0 805 &6 [X]
  1515. 13
  1516. 18 5
  1517. 11 00000582
  1518. 0 27 9000
  1519. 13
  1520. 8 7
  1521. 7 ""
  1522. 6 7
  1523. 18 1
  1524. 11 00000555
  1525. 5 5
  1526. 6 6
  1527. 18 0
  1528. 11 00000373
  1529. 0 296 1
  1530. 16 AddItem "{7}" "{5}" &2 &3 "{4}" &1
  1531. 0 296 0
  1532. 10 00000555
  1533. 10 00000555
  1534. 5 6
  1535. 6 6
  1536. 18 0
  1537. 11 00000464
  1538. 0 296 1
  1539. 16 DelMenu "{7}"
  1540. 0 296 0
  1541. 10 00000555
  1542. 10 00000555
  1543. 5 7
  1544. 6 6
  1545. 18 0
  1546. 11 00000555
  1547. 0 296 1
  1548. 16 AddAccelerator "{5}" &2 &3
  1549. 0 296 0
  1550. 10 00000555
  1551. 0 31 8000 &1
  1552. 10 00000144
  1553. 6 0
  1554. 15
  1555. 9
  1556. 14 AddItem
  1557. 5 0
  1558. 8 7
  1559. 7 ""
  1560. 8 8
  1561. 7 ""
  1562. 8 9
  1563. 7 ""
  1564. 8 10
  1565. 7 ""
  1566. 8 11
  1567. 7 ""
  1568. 8 12
  1569. 5 0
  1570. 8 13
  1571. 5 0
  1572. 8 14
  1573. 5 0
  1574. 8 15
  1575. 5 0
  1576. 8 16
  1577. 0 271 "Cust1" 1
  1578. 0 271 "Cust2" 1
  1579. 0 264 "Cust1" 0
  1580. 16 LocateHmenu "{0}"
  1581. 13
  1582. 0 264 "Cust2" [X]
  1583. 5 2
  1584. 8 17
  1585. 6 17
  1586. 5 0
  1587. 18 1
  1588. 6 17
  1589. 5 1
  1590. 18 1
  1591. 1 1
  1592. 11 00000957
  1593. 0 31 1003 "{0}"
  1594. 0 31 1005 "{10}"
  1595. 0 31 8000 "{9}"
  1596. 0 31 8001 "{11}"
  1597. 0 31 8002 "{14}"
  1598. 16 ShowAccel "{15}"
  1599. 0 802
  1600. 13
  1601. 0 16 [X] "!InitCombo"
  1602. 13
  1603. 0 41 0 [X]
  1604. 0 802
  1605. 13
  1606. 0 16 [X] "!ComboCallback"
  1607. 13
  1608. 0 41 9500 [X]
  1609. 5 0
  1610. 0 26 "." "additem"
  1611. 13
  1612. 0 805 &17 [X]
  1613. 13
  1614. 18 1
  1615. 11 00000661
  1616. 0 27 8000
  1617. 13
  1618. 8 9
  1619. 0 27 8001
  1620. 13
  1621. 8 11
  1622. 0 265 "Cust1"
  1623. 13
  1624. 8 14
  1625. 16 DetermineAccel
  1626. 13
  1627. 8 15
  1628. 5 4
  1629. 6 17
  1630. 18 0
  1631. 11 00000797
  1632. 7 ""
  1633. 16 GetMacro
  1634. 13
  1635. 0 805 &12 [X]
  1636. 13
  1637. 18 1
  1638. 11 00000784
  1639. 6 12
  1640. 8 8
  1641. 6 8
  1642. 8 10
  1643. 5 0
  1644. 8 7
  1645. 10 00000944
  1646. 5 3
  1647. 6 17
  1648. 18 0
  1649. 11 00000944
  1650. 5 0
  1651. 16 GetAmiPro &2 "{1}"
  1652. 13
  1653. 0 805 &13 [X]
  1654. 13
  1655. 18 1
  1656. 11 00000944
  1657. 7 ""
  1658. 8 18
  1659. 6 13
  1660. 22 3
  1661. 8 7
  1662. 6 13
  1663. 22 2
  1664. 8 10
  1665. 10 00000231
  1666. 0 266 "Cust1"
  1667. 0 266 "Cust2"
  1668. 6 17
  1669. 6 0
  1670. 7 ""
  1671. 18 1
  1672. 6 7
  1673. 5 0
  1674. 18 1
  1675. 6 8
  1676. 7 ""
  1677. 18 1
  1678. 1 2
  1679. 1 1
  1680. 1 1
  1681. 11 00001767
  1682. 6 15
  1683. 11 00001130
  1684. 16 AddAccelStuff "{9}" "{15}"
  1685. 13
  1686. 8 9
  1687. 6 7
  1688. 5 0
  1689. 18 1
  1690. 11 00001397
  1691. 5 0
  1692. 6 14
  1693. 18 0
  1694. 11 00001229
  1695. 0 516 1 "{0}" "{9}" "{7}"
  1696. 10 00001276
  1697. 6 14
  1698. 5 1
  1699. 3 1
  1700. 0 527 1 "{0}" [X] "{9}" "{7}"
  1701. 6 15
  1702. 11 00001384
  1703. 0 1050
  1704. 13
  1705. 5 1
  1706. 18 5
  1707. 11 00001359
  1708. 2 101 1 "~default.sty" 0 0
  1709. 2 422 1 "{15}" "{7}" ""
  1710. 10 00001635
  1711. 5 0
  1712. 6 14
  1713. 18 0
  1714. 11 00001474
  1715. 0 516 1 "{0}" "{9}" "{8}" "{11}"
  1716. 10 00001528
  1717. 6 14
  1718. 5 1
  1719. 3 1
  1720. 0 527 1 "{0}" [X] "{9}" "{8}" "{11}"
  1721. 6 15
  1722. 11 00001635
  1723. 0 1050
  1724. 13
  1725. 5 1
  1726. 18 5
  1727. 11 00001611
  1728. 2 101 1 "~default.sty" 0 0
  1729. 2 422 1 "{15}" 0 "{8}"
  1730. 0 2 "Keep settings for next session?"
  1731. 13
  1732. 11 00001754
  1733. 16 AddToAutoexec "{0}" "{9}" "{7}" "{8}" "{11}" "{14}" "{15}"
  1734. 10 00001840
  1735. 5 1
  1736. 6 17
  1737. 18 0
  1738. 11 00001840
  1739. 0 3 "Not all necessary information found"
  1740. 6 6
  1741. 15
  1742. 9
  1743. 14 ComboCallBack
  1744. 0 44 "{0}" "{1}"
  1745. 13
  1746. 8 4
  1747. 0 1036 "{4}" 1031 0 0
  1748. 13
  1749. 8 5
  1750. 0 264 "Cust1" "{5}"
  1751. 6 3
  1752. 15
  1753. 9
  1754. 14 InitCombo
  1755. 0 265 "Cust2"
  1756. 13
  1757. 8 3
  1758. 0 43 "{0}" 9500 ""
  1759. 0 284 "user,GetMenuItemCount,HH" "{3}"
  1760. 13
  1761. 8 4
  1762. 5 0
  1763. 8 5
  1764. 6 4
  1765. 5 1
  1766. 3 1
  1767. 6 5
  1768. 18 2
  1769. 12 00000202
  1770. 10 00000405
  1771. 5 1
  1772. 6 5
  1773. 3 0
  1774. 8 5
  1775. 10 00000117
  1776. 0 284 "user,GetMenuString,HHHFHH" "{3}" "{5}" &2 80 1024
  1777. 5 0
  1778. 0 14 "{2}"
  1779. 13
  1780. 18 5
  1781. 11 00000336
  1782. 0 43 "{0}" 9500 "{2}"
  1783. 10 00000392
  1784. 0 43 "{0}" 9500 "------------------------------------"
  1785. 10 00000169
  1786. 0 44 "{0}" 9500
  1787. 13
  1788. 0 265 "Cust1"
  1789. 13
  1790. 0 1036 [X] 1038 [X] 0
  1791. 6 1
  1792. 15
  1793. 9
  1794. 14 AddAccelerator
  1795. 5 0
  1796. 8 4
  1797. 7 ""
  1798. 8 5
  1799. 7 ""
  1800. 8 6
  1801. 5 0
  1802. 8 7
  1803. 5 0
  1804. 8 8
  1805. 7 ""
  1806. 8 9
  1807. 5 2
  1808. 8 10
  1809. 6 10
  1810. 5 0
  1811. 18 1
  1812. 6 10
  1813. 5 1
  1814. 18 1
  1815. 1 1
  1816. 11 00000567
  1817. 0 31 1005 "{6}"
  1818. 16 ShowAccel "{8}"
  1819. 5 0
  1820. 0 26 "." "addaccel"
  1821. 13
  1822. 0 805 &10 [X]
  1823. 13
  1824. 18 1
  1825. 11 00000278
  1826. 16 DetermineAccel
  1827. 13
  1828. 8 8
  1829. 5 4
  1830. 6 10
  1831. 18 0
  1832. 11 00000411
  1833. 7 ""
  1834. 16 GetMacro
  1835. 13
  1836. 0 805 &9 [X]
  1837. 13
  1838. 18 1
  1839. 11 00000398
  1840. 6 9
  1841. 8 5
  1842. 6 5
  1843. 8 6
  1844. 5 0
  1845. 8 4
  1846. 10 00000554
  1847. 5 3
  1848. 6 10
  1849. 18 0
  1850. 11 00000554
  1851. 5 0
  1852. 16 GetAmiPro &1 "{0}"
  1853. 13
  1854. 0 805 &7 [X]
  1855. 13
  1856. 18 1
  1857. 11 00000554
  1858. 7 ""
  1859. 8 11
  1860. 6 7
  1861. 22 2
  1862. 8 4
  1863. 6 7
  1864. 22 1
  1865. 8 6
  1866. 10 00000093
  1867. 6 10
  1868. 6 8
  1869. 5 0
  1870. 18 1
  1871. 6 4
  1872. 5 0
  1873. 18 1
  1874. 6 5
  1875. 7 ""
  1876. 18 1
  1877. 1 2
  1878. 1 1
  1879. 1 1
  1880. 11 00000905
  1881. 0 1050
  1882. 13
  1883. 5 1
  1884. 18 5
  1885. 11 00000714
  1886. 2 101 1 "~default.sty" 0 0
  1887. 6 4
  1888. 5 0
  1889. 18 1
  1890. 11 00000780
  1891. 2 422 1 "{8}" "{4}" ""
  1892. 10 00000803
  1893. 2 422 1 "{8}" 0 "{5}"
  1894. 0 2 "Make this permanent?"
  1895. 13
  1896. 11 00000892
  1897. 16 AddToAutoexec 0 0 "{4}" "{5}" 0 0 "{8}"
  1898. 10 00000978
  1899. 5 1
  1900. 6 10
  1901. 18 0
  1902. 11 00000978
  1903. 0 3 "Not all necessary information found"
  1904. 6 3
  1905. 15
  1906. 9
  1907. 14 DetermineAccel
  1908. 5 0
  1909. 8 2
  1910. 0 27 8003
  1911. 13
  1912. 8 3
  1913. 7 ""
  1914. 6 3
  1915. 18 1
  1916. 11 00000623
  1917. 5 1
  1918. 0 14 "{3}"
  1919. 13
  1920. 18 0
  1921. 11 00000184
  1922. 0 806 "{3}" 1
  1923. 13
  1924. 0 18 [X]
  1925. 13
  1926. 0 40 [X]
  1927. 13
  1928. 8 2
  1929. 10 00000472
  1930. 7 "F"
  1931. 0 806 "{3}" 1
  1932. 13
  1933. 0 18 [X]
  1934. 13
  1935. 18 0
  1936. 0 14 "{3}"
  1937. 13
  1938. 5 1
  1939. 3 1
  1940. 0 807 "{3}" [X]
  1941. 13
  1942. 0 805 &1 [X]
  1943. 13
  1944. 0 277 [X]
  1945. 13
  1946. 1 1
  1947. 11 00000409
  1948. 0 784 "[112]"
  1949. 13
  1950. 0 40 [X]
  1951. 13
  1952. 5 1
  1953. 3 1
  1954. 8 2
  1955. 6 2
  1956. 6 1
  1957. 3 0
  1958. 8 2
  1959. 10 00000472
  1960. 0 3 "Invalid key.  It must be A - Z or F1 to F12"
  1961. 5 0
  1962. 15
  1963. 9
  1964. 0 27 21
  1965. 13
  1966. 11 00000523
  1967. 6 2
  1968. 5 16384
  1969. 25 2
  1970. 8 2
  1971. 0 27 22
  1972. 13
  1973. 11 00000573
  1974. 6 2
  1975. 5 4096
  1976. 25 2
  1977. 8 2
  1978. 0 27 23
  1979. 13
  1980. 11 00000623
  1981. 6 2
  1982. 5 8192
  1983. 25 2
  1984. 8 2
  1985. 6 2
  1986. 15
  1987. 9
  1988. 6 0
  1989. 15
  1990. 9
  1991. 14 ShowAccel
  1992. 5 0
  1993. 6 0
  1994. 18 1
  1995. 11 00000379
  1996. 6 0
  1997. 5 16384
  1998. 25 1
  1999. 0 31 21 [X]
  2000. 6 0
  2001. 5 4096
  2002. 25 1
  2003. 0 31 22 [X]
  2004. 6 0
  2005. 5 8192
  2006. 25 1
  2007. 0 31 23 [X]
  2008. 6 0
  2009. 5 255
  2010. 25 1
  2011. 8 0
  2012. 0 784 "[112]"
  2013. 13
  2014. 0 40 [X]
  2015. 13
  2016. 8 2
  2017. 6 2
  2018. 6 0
  2019. 18 4
  2020. 6 0
  2021. 6 2
  2022. 5 12
  2023. 3 0
  2024. 18 4
  2025. 1 1
  2026. 11 00000348
  2027. 5 49
  2028. 6 0
  2029. 6 2
  2030. 3 1
  2031. 3 0
  2032. 0 39 [X]
  2033. 13
  2034. 0 16 "F" [X]
  2035. 13
  2036. 0 31 8003 [X]
  2037. 10 00000379
  2038. 0 39 "{0}"
  2039. 13
  2040. 0 31 8003 [X]
  2041. 6 1
  2042. 15
  2043. 9
  2044. 14 AddAccelStuff
  2045. 7 ""
  2046. 8 3
  2047. 6 1
  2048. 5 16384
  2049. 25 1
  2050. 11 00000091
  2051. 0 16 "{3}" "Ctrl+"
  2052. 13
  2053. 8 3
  2054. 6 1
  2055. 5 4096
  2056. 25 1
  2057. 11 00000153
  2058. 0 16 "{3}" "Shift+"
  2059. 13
  2060. 8 3
  2061. 6 1
  2062. 5 8192
  2063. 25 1
  2064. 11 00000213
  2065. 0 16 "{3}" "Alt+"
  2066. 13
  2067. 8 3
  2068. 6 1
  2069. 5 255
  2070. 25 1
  2071. 8 1
  2072. 0 784 "[112]"
  2073. 13
  2074. 0 40 [X]
  2075. 13
  2076. 8 4
  2077. 6 4
  2078. 6 1
  2079. 18 4
  2080. 6 1
  2081. 6 4
  2082. 5 12
  2083. 3 0
  2084. 18 4
  2085. 1 1
  2086. 11 00000411
  2087. 5 49
  2088. 6 1
  2089. 6 4
  2090. 3 1
  2091. 3 0
  2092. 0 39 [X]
  2093. 13
  2094. 0 16 "F" [X]
  2095. 13
  2096. 8 5
  2097. 10 00000432
  2098. 0 39 "{1}"
  2099. 13
  2100. 8 5
  2101. 0 16 "{3}" "{5}"
  2102. 13
  2103. 8 3
  2104. 0 16 "{0}" "  " "{3}"
  2105. 13
  2106. 15
  2107. 9
  2108. 6 2
  2109. 15
  2110. 9
  2111. 14 LoadMenus
  2112. 5 1
  2113. 7 "╬─╝■(&F)"
  2114. 23 0
  2115. 5 2
  2116. 7 "▒α╝¡(&E)"
  2117. 23 0
  2118. 5 3
  2119. 7 "▓Θ┐┤(&V)"
  2120. 23 0
  2121. 5 4
  2122. 7 "╬─╫╓(&T)"
  2123. 23 0
  2124. 5 5
  2125. 7 "╤∙╩╜(&S)"
  2126. 23 0
  2127. 5 6
  2128. 7 "░µ├µ(&P)"
  2129. 23 0
  2130. 5 7
  2131. 7 "═╝╬─┐≥(&R)"
  2132. 23 0
  2133. 5 8
  2134. 7 "╣ñ╛▀(&L)"
  2135. 23 0
  2136. 5 8
  2137. 15
  2138. 9
  2139. 6 1
  2140. 15
  2141. 9
  2142. 14 GetMacro
  2143. 20 00000256
  2144. 19 00000256
  2145. 0 789 "One moment please..."
  2146. 0 295
  2147. 13
  2148. 0 781 [X]
  2149. 0 31 9001 "*.smm"
  2150. 0 789 ""
  2151. 5 1
  2152. 0 26 "." "macrolst"
  2153. 13
  2154. 18 0
  2155. 11 00000245
  2156. 0 290
  2157. 13
  2158. 0 27 8001
  2159. 13
  2160. 0 16 [X] [X]
  2161. 13
  2162. 0 17 [X]
  2163. 13
  2164. 8 1
  2165. 10 00000256
  2166. 7 ""
  2167. 8 1
  2168. 6 1
  2169. 15
  2170. 9
  2171. 0 789 ""
  2172. 6 0
  2173. 15
  2174. 9
  2175. 14 LoadAmiFuns
  2176. 20 00000440
  2177. 19 00000440
  2178. 0 789 "Loading control files..."
  2179. 5 0
  2180. 8 3
  2181. 0 296 1
  2182. 5 0
  2183. 0 295
  2184. 13
  2185. 0 16 [X] "amifuns"
  2186. 13
  2187. 0 259 [X] "r"
  2188. 13
  2189. 0 805 &5 [X]
  2190. 13
  2191. 18 1
  2192. 11 00000396
  2193. 5 -1
  2194. 0 257 "{5}"
  2195. 13
  2196. 0 805 &6 [X]
  2197. 13
  2198. 18 1
  2199. 11 00000370
  2200. 6 3
  2201. 5 1
  2202. 3 0
  2203. 8 3
  2204. 0 20 "{6}" 1 "`"
  2205. 13
  2206. 8 7
  2207. 0 20 "{6}" 2 "`"
  2208. 13
  2209. 8 8
  2210. 6 3
  2211. 6 7
  2212. 23 0
  2213. 6 3
  2214. 6 8
  2215. 23 1
  2216. 10 00000191
  2217. 0 260 "{5}"
  2218. 10 00000440
  2219. 0 3 "Failed to open function file AMIFUNS"
  2220. 0 296 0
  2221. 0 789 ""
  2222. 6 3
  2223. 15
  2224. 9
  2225. 6 2
  2226. 15
  2227. 9
  2228. 14 GetAmiPro
  2229. 20 00000102
  2230. 19 00000102
  2231. 0 789 "One moment please..."
  2232. 0 296 1
  2233. 0 31 8000 &0
  2234. 0 296 0
  2235. 0 789 ""
  2236. 5 0
  2237. 8 3
  2238. 5 1
  2239. 0 26 "." "funclst"
  2240. 13
  2241. 18 0
  2242. 11 00000336
  2243. 0 27 9000
  2244. 13
  2245. 8 4
  2246. 5 1
  2247. 8 3
  2248. 6 1
  2249. 6 3
  2250. 18 2
  2251. 12 00000275
  2252. 10 00000336
  2253. 5 1
  2254. 6 3
  2255. 3 0
  2256. 8 3
  2257. 10 00000200
  2258. 6 4
  2259. 6 3
  2260. 22 0
  2261. 18 0
  2262. 11 00000323
  2263. 10 00000336
  2264. 10 00000242
  2265. 6 3
  2266. 15
  2267. 9
  2268. 6 2
  2269. 15
  2270. 9
  2271. 14 AddToAutoexec
  2272. 16 OpenAutoExec
  2273. 6 6
  2274. 5 0
  2275. 18 1
  2276. 11 00000181
  2277. 0 6 "accel = {6}[13]"
  2278. 0 6 "menuid = {2}[13]"
  2279. 0 6 "macroname = ""{3}""[13]"
  2280. 0 6 "OnKey(accel, menuid, macroname)"
  2281. 5 0
  2282. 6 0
  2283. 18 1
  2284. 11 00000861
  2285. 0 6 "menuname = ""{0}""[13]"
  2286. 0 6 "itemname = ""{1}""[13]"
  2287. 5 0
  2288. 6 2
  2289. 18 1
  2290. 11 00000548
  2291. 0 6 "menuid = {2}[13]"
  2292. 5 0
  2293. 6 5
  2294. 18 0
  2295. 11 00000424
  2296. 0 6 "AddmenuItem(1, {{menuname}, {{itemname}, {{menuid})"
  2297. 10 00000535
  2298. 6 5
  2299. 5 1
  2300. 3 1
  2301. 8 5
  2302. 0 6 "pos = {5}[13]"
  2303. 0 6 "InsertMenuItem(1, {{menuname}, {{pos}, {{itemname}, {{menuid})"
  2304. 10 00000861
  2305. 0 6 "macroname = ""{3}""[13]"
  2306. 0 6 "helptext = ""{4}""[13]"
  2307. 5 0
  2308. 6 5
  2309. 18 0
  2310. 11 00000726
  2311. 0 6 "AddmenuItem(1, {{menuname}, {{itemname}, {{macroname}, {{helptext})"
  2312. 10 00000861
  2313. 6 5
  2314. 5 1
  2315. 3 1
  2316. 8 5
  2317. 0 6 "pos = {5}[13]"
  2318. 0 6 "InsertMenuItem(1, {{menuname}, {{pos},"
  2319. 0 6 " {{itemname}, {{macroname}, {{helptext})"
  2320. 2 103 1
  2321. 2 147 1
  2322. 6 7
  2323. 15
  2324. 9
  2325. 14 DelFromAutoexec
  2326. 16 OpenAutoExec
  2327. 0 6 "menuname = ""{0}""[13]"
  2328. 0 6 "itemname = ""{1}""[13]"
  2329. 0 6 "DeleteMenuItem(1, {{menuname}, {{itemname})"
  2330. 2 103 1
  2331. 2 147 1
  2332. 6 2
  2333. 15
  2334. 9
  2335. 14 OpenAutoExec
  2336. 16 FindAutoExec
  2337. 13
  2338. 8 2
  2339. 5 0
  2340. 0 259 "{2}" "r"
  2341. 13
  2342. 0 805 &1 [X]
  2343. 13
  2344. 18 0
  2345. 11 00000237
  2346. 2 101 1 "~default.sty" 0 0
  2347. 0 6 "FUNCTION auto()[13]"
  2348. 0 6 "END FUNCTION[13]"
  2349. 0 6 "[16420]"
  2350. 2 104 1 "{2}" 32 "" ""
  2351. 10 00000270
  2352. 0 260 "{1}"
  2353. 2 102 1 "{2}" 1 ""
  2354. 2 488 1 0 0 24576 "End function" ""
  2355. 0 6 "[36]"
  2356. 0 6 "[13]"
  2357. 0 6 "[38]"
  2358. 6 0
  2359. 15
  2360. 9
  2361. 14 FindAutoExec
  2362. 0 295
  2363. 13
  2364. 0 16 [X] "autoexec.smm"
  2365. 13
  2366. 8 2
  2367. 5 0
  2368. 0 259 "{2}" "r"
  2369. 13
  2370. 0 805 &1 [X]
  2371. 13
  2372. 18 0
  2373. 11 00000317
  2374. 0 268
  2375. 13
  2376. 0 16 [X] "autoexec.smm"
  2377. 13
  2378. 8 2
  2379. 5 0
  2380. 0 259 "{2}" "r"
  2381. 13
  2382. 0 805 &1 [X]
  2383. 13
  2384. 18 0
  2385. 11 00000291
  2386. 0 798
  2387. 13
  2388. 0 16 [X] "autoexec.smm"
  2389. 13
  2390. 8 2
  2391. 10 00000304
  2392. 0 260 "{1}"
  2393. 10 00000330
  2394. 0 260 "{1}"
  2395. 6 2
  2396. 15
  2397. 9
  2398. 6 0
  2399. 15
  2400. 9
  2401. 14 LocateHmenu
  2402. 0 284 "user,GetActiveWindow,H"
  2403. 13
  2404. 8 2
  2405. 6 2
  2406. 8 3
  2407. 5 0
  2408. 0 284 "user,GetParent,HH" "{2}"
  2409. 13
  2410. 0 805 &2 [X]
  2411. 13
  2412. 18 1
  2413. 11 00000169
  2414. 6 2
  2415. 8 3
  2416. 10 00000067
  2417. 6 3
  2418. 8 2
  2419. 0 284 "user,GetMenu,HH" "{2}"
  2420. 13
  2421. 8 4
  2422. 16 FindMenu "{4}" "{0}"
  2423. 13
  2424. 15
  2425. 9
  2426. 6 1
  2427. 15
  2428. 9
  2429. 14 DelMenu
  2430. 0 284 "user,GetActiveWindow,H"
  2431. 13
  2432. 8 2
  2433. 6 2
  2434. 8 3
  2435. 5 0
  2436. 0 284 "user,GetParent,HH" "{2}"
  2437. 13
  2438. 0 805 &2 [X]
  2439. 13
  2440. 18 1
  2441. 11 00000165
  2442. 6 2
  2443. 8 3
  2444. 10 00000063
  2445. 6 3
  2446. 8 2
  2447. 0 284 "user,GetMenu,HH" "{2}"
  2448. 13
  2449. 8 4
  2450. 5 0
  2451. 16 FindMenu "{4}" "{0}"
  2452. 13
  2453. 0 805 &4 [X]
  2454. 13
  2455. 18 1
  2456. 11 00000478
  2457. 16 LoadTheBox "{4}" 9000
  2458. 5 1
  2459. 0 26 "." "DelMenu"
  2460. 13
  2461. 18 0
  2462. 11 00000478
  2463. 0 27 9000
  2464. 13
  2465. 8 5
  2466. 0 520 1 "{0}" "{5}"
  2467. 0 2 "Make this permanent?"
  2468. 13
  2469. 11 00000478
  2470. 16 DelFromAutoExec "{0}" "{5}"
  2471. 6 1
  2472. 15
  2473. 9
  2474. 14 LoadTheBox
  2475. 0 284 "user,GetMenuItemCount,HH" "{0}"
  2476. 13
  2477. 8 4
  2478. 5 0
  2479. 8 5
  2480. 6 4
  2481. 5 1
  2482. 3 1
  2483. 6 5
  2484. 18 2
  2485. 12 00000159
  2486. 10 00000352
  2487. 5 1
  2488. 6 5
  2489. 3 0
  2490. 8 5
  2491. 10 00000074
  2492. 0 284 "user,GetMenuString,HHHFHH" "{0}" "{5}" &3 80 1024
  2493. 5 0
  2494. 0 14 "{3}"
  2495. 13
  2496. 18 5
  2497. 11 00000288
  2498. 0 31 "{1}" "{3}"
  2499. 10 00000339
  2500. 0 31 "{1}" "------------------------------------"
  2501. 10 00000126
  2502. 6 2
  2503. 15
  2504. 9
  2505. 14 FindMenu
  2506. 0 284 "user,GetMenuItemCount,HH" "{0}"
  2507. 13
  2508. 8 4
  2509. 5 0
  2510. 8 5
  2511. 6 4
  2512. 5 1
  2513. 3 1
  2514. 6 5
  2515. 18 2
  2516. 12 00000157
  2517. 10 00000319
  2518. 5 1
  2519. 6 5
  2520. 3 0
  2521. 8 5
  2522. 10 00000072
  2523. 0 284 "user,GetMenuString,HHHFHH" "{0}" "{5}" &3 80 1024
  2524. 6 1
  2525. 6 3
  2526. 18 0
  2527. 11 00000306
  2528. 0 284 "user,GetSubMenu,HHH" "{0}" "{5}"
  2529. 13
  2530. 8 0
  2531. 6 0
  2532. 15
  2533. 9
  2534. 10 00000124
  2535. 5 0
  2536. 15
  2537. 9
  2538. 6 2
  2539. 15
  2540. 9
  2541. DIALOG DelMenu
  2542. -2134376448 4 134 38 132 86 "" "" "Delete Menu Item" 
  2543. FONT 12 "System" 
  2544. 86 4 40 14 1 1342242817 "button" "OK" 0 
  2545. 86 20 40 14 2 1342242816 "button" "Cancel" 0 
  2546. 6 40 120 42 9000 1352728577 "listbox" "" 0 
  2547. 6 30 56 8 1000 1342177280 "static" "&Menu items:" 0 
  2548. DIALOG PickMenu
  2549. -2134376448 6 146 34 131 74 "" "" "Customize Menus" 
  2550. FONT 12 "System" 
  2551. 5 14 56 54 9000 1352728579 "listbox" "" 0 
  2552. 67 4 58 14 2 1342242816 "button" "Done" 0 
  2553. 67 20 58 14 5 1342242816 "button" "&Add..." 0 
  2554. 67 36 58 14 6 1342242816 "button" "&Delete..." 0 
  2555. 5 4 56 8 1000 1342177280 "static" "&Menus:" 0 
  2556. 67 52 58 14 7 1342242816 "button" "A&ccelerators..." 0 
  2557. DIALOG AddItem
  2558. -2134376448 20 51 26 242 104 "" "" "Add Menu Item" 
  2559. FONT 12 "System" 
  2560. 6 16 82 8 1000 1342177282 "static" "Name for Menu:" 0 
  2561. 90 14 84 12 8000 1350631552 "edit" "" 0 
  2562. 6 30 82 8 1006 1342177282 "static" "Insert before:" 0 
  2563. 96 76 40 8 1001 1342177280 "static" "Help text:" 0 
  2564. 178 38 58 14 3 1342242816 "button" "Add Function..." 0 
  2565. 178 54 58 14 4 1342242816 "button" "Add Macro..." 0 
  2566. 96 84 138 12 8001 1350631552 "edit" "" 0 
  2567. 10 74 18 12 8003 1350631552 "edit" "" 0 
  2568. 6 52 86 44 20 1342177287 "button" "Accelerator" 0 
  2569. 50 64 38 10 21 1342242819 "button" "Control" 0 
  2570. 50 74 38 10 22 1342242819 "button" "Shift" 0 
  2571. 50 84 38 10 23 1342242819 "button" "Alt" 0 
  2572. 6 4 82 8 1002 1342177282 "static" "Add to menu:" 0 
  2573. 196 6 40 14 1 1342242817 "button" "OK" 0 
  2574. 196 22 40 14 2 1342242816 "button" "Cancel" 0 
  2575. 90 4 84 8 1003 1342177280 "static" "" 0 
  2576. 6 42 82 8 1004 1342177282 "static" "Function/macro to add:" 0 
  2577. 90 42 84 8 1005 1342177280 "static" "" 0 
  2578. 10 64 38 10 1007 1342177280 "static" "Keystroke:" 0 
  2579. 90 28 84 58 9500 1344274435 "combobox" "" 0 
  2580. DIALOG AddAccel
  2581. -2134376448 12 91 28 208 72 "" "" "Add Accelerator" 
  2582. FONT 8 "Helv" 
  2583. 150 36 52 14 3 1342242816 "button" "Function..." 0 
  2584. 150 52 52 14 4 1342242816 "button" "Macro..." 0 
  2585. 10 34 18 12 8003 1350631552 "edit" "" 0 
  2586. 6 14 90 44 20 1342177287 "button" "Accelerator" 0 
  2587. 50 26 36 10 21 1342242819 "button" "Control" 0 
  2588. 50 36 38 10 22 1342242819 "button" "Shift" 0 
  2589. 50 46 38 10 23 1342242819 "button" "Alt" 0 
  2590. 162 4 40 14 1 1342242817 "button" "OK" 0 
  2591. 162 20 40 14 2 1342242816 "button" "Cancel" 0 
  2592. 6 4 64 10 1004 1342177280 "static" "Function/macro:" 0 
  2593. 74 4 80 10 1005 1342177280 "static" "text" 0 
  2594. 10 26 38 8 1007 1342177280 "static" "Keystroke:" 0 
  2595. DIALOG MacroLst
  2596. -2134376448 6 108 30 154 90 "" "" "Add Macro " 
  2597. FONT 8 "Helv" 
  2598. 8 16 60 12 8001 1350631552 "edit" "" 0 
  2599. 8 32 60 54 9001 1352728579 "listbox" "" 0 
  2600. 72 38 74 8 7999 1342177280 "static" "" 0 
  2601. 106 4 40 14 1 1342242817 "button" "OK" 0 
  2602. 106 20 40 14 2 1342242816 "button" "Cancel" 0 
  2603. 8 6 68 8 1001 1342177280 "static" "Macro to execute:" 0 
  2604. DIALOG FuncLst
  2605. -2134376448 4 112 28 158 68 "" "" "Add Function" 
  2606. FONT 8 "Helv" 
  2607. 6 16 100 46 9000 1352728579 "listbox" "" 0 
  2608. 6 6 66 8 1000 1342177280 "static" "&Ami Pro functions:" 0 
  2609. 112 6 40 14 1 1342242817 "button" "OK" 0 
  2610. 112 22 40 14 2 1342242816 "button" "Cancel" 0 
  2611. 00039002
  2612.