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

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