home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / apmt34.zip / LISTDESK.CMD < prev    next >
OS/2 REXX Batch file  |  1994-09-15  |  1KB  |  38 lines

  1. /******************************************************************/
  2. /* This command lists all the icons showing on the desktop        */
  3. /******************************************************************/
  4. signal on error name  errorexit
  5. call APMT_INIT
  6. if rc > 0 then signal CLOSE
  7. rc = SELECT_WINDOW("Desktop")
  8. rc = CONTAINER_QUERY_COUNT(1,"cnt")
  9. do j = 1 to cnt
  10.    rc = CONTAINER_SELECTITEM(1,"#"||j)
  11.    rc = KEYBOARD("F9","S")
  12.    rc = KEYBOARD("HOME")
  13.    rc = KEYBOARD("END","S")
  14.    rc = KEYBOARD("INSERT","C")
  15.    rc = QUERY_CLIPBOARD_TEXT("icon_text")
  16.    do i = 1 to icon_text.0
  17.       say icon_text.i
  18.       end
  19.    rc = KEYBOARD("ESC")
  20.    end
  21. signal CLOSE
  22. /******************************************************************/
  23. close:
  24. rc = END_SESSION();
  25. exit
  26. APMT_INIT:
  27. signal on error name  errorexit
  28. call rxfuncadd  'APMTLoadFuncs',  'apmtext', 'APMTLoadFuncs'
  29. call APMTLoadFuncs;
  30. rc = INIT_SESSION();
  31. if rc \= 0
  32.    then do
  33.      say apmtmsg
  34.      signal errorexit
  35.      end
  36. signal on halt name APMT_CLOSE
  37. return
  38.