Have a look at workbench.library/WhichWorkbenchObject()
hit = IWorkbench->WhichWorkbenchObject(NULL,
AppScreen->MouseX,
AppScreen->MouseY,
WBOBJA_DrawerPath,&DrawerPath,
TAG_END);
switch(hit)
{
case WBO_DRAWER:
case WBO_NONE:
case WBO_ICON:
.....
@Ami603
workbench.h
#define WBO_ICON (2) /* An icon is found at these coordinates */
the function does not provide the path.
@Thomasrapp
I try to make a "project" manager putting selections of icons on the WB screen & putting them away later, replacing them with an other selection
It could be that say 2 notepad documents with same title appear on the WB screen, one part of the slection i want to put away, the other having to stay there.
Selecting them in turn with WB arexx script aan having access to their path would permit to put away the correct onen and leave the other.on the WB
WBOBJA_Name (STRPTR) -- Get the name of the icon, as currently
displayed by Workbench. The name will be copied into the
buffer whose address you supply with this tag. The name
will be truncated if its length exceeds the buffer size
specified with WBOBJA_NameSize.
WBOBJA_NameSize (ULONG) -- Specify the size of the buffer
passed with WBOBJA_Name, in bytes. Defaults to 64.
WBOBJA_FullPath (STRPTR) -- Get the full path of the object
the icon belongs to. If this is not available/applicable
(such as for AppIcons) an empty string will be returned.
The path will be copied into the buffer whose address you
supply with this tag. The path will be truncated if its
length exceeds the size specified with WOBJA_FullPathSize.
WBOBJA_FullPathSize (ULONG) -- Specify the size of the buffer
passed with WBOBJA_FullPath, in bytes. Defaults to 512.
WBOBJA_DrawerPath (STRPTR) -- Get the path of the drawer whose
window is found at the specified coordinates. In the case
of the Workbench root window, such a path is not available
and an empty string will be returned. The path will be
copied into the buffer whose address you supply with this
tag. The path will be truncated if its length exceeds the
buffer size specified with WBOBJA_DrawerPathSize.
WBOBJA_DrawerPathSize (ULONG) -- Specify the size of the buffer
passed with WBOBJA_DrawerPath, in bytes. Defaults to 512.
You can get a list of the selected icons using WBCTRLA_GetSelectedIconList tag with the WorkbenchControl() function. To free it when you are done use the same function and WBCTRLA_FreeSelectedIconList tag. More information in the workbench.doc autodoc.
Actually there is a lot to add. What do you want to get from where?
Have a look at workbench.library/WhichWorkbenchObject()
hit = IWorkbench->WhichWorkbenchObject(NULL,
AppScreen->MouseX,
AppScreen->MouseY,
WBOBJA_DrawerPath,&DrawerPath,
TAG_END);
switch(hit)
{
case WBO_DRAWER:
case WBO_NONE:
case WBO_ICON:
.....
@Ami603
workbench.h
#define WBO_ICON (2) /* An icon is found at these coordinates */
the function does not provide the path.
@Thomasrapp
I try to make a "project" manager putting selections of icons on the WB screen & putting them away later, replacing them with an other selection
It could be that say 2 notepad documents with same title appear on the WB screen, one part of the slection i want to put away, the other having to stay there.
Selecting them in turn with WB arexx script aan having access to their path would permit to put away the correct onen and leave the other.on the WB
WBOBJA_Name (STRPTR) -- Get the name of the icon, as currently
displayed by Workbench. The name will be copied into the
buffer whose address you supply with this tag. The name
will be truncated if its length exceeds the buffer size
specified with WBOBJA_NameSize.
WBOBJA_NameSize (ULONG) -- Specify the size of the buffer
passed with WBOBJA_Name, in bytes. Defaults to 64.
WBOBJA_FullPath (STRPTR) -- Get the full path of the object
the icon belongs to. If this is not available/applicable
(such as for AppIcons) an empty string will be returned.
The path will be copied into the buffer whose address you
supply with this tag. The path will be truncated if its
length exceeds the size specified with WOBJA_FullPathSize.
WBOBJA_FullPathSize (ULONG) -- Specify the size of the buffer
passed with WBOBJA_FullPath, in bytes. Defaults to 512.
WBOBJA_DrawerPath (STRPTR) -- Get the path of the drawer whose
window is found at the specified coordinates. In the case
of the Workbench root window, such a path is not available
and an empty string will be returned. The path will be
copied into the buffer whose address you supply with this
tag. The path will be truncated if its length exceeds the
buffer size specified with WBOBJA_DrawerPathSize.
WBOBJA_DrawerPathSize (ULONG) -- Specify the size of the buffer
passed with WBOBJA_DrawerPath, in bytes. Defaults to 512.
...
You can get a list of the selected icons using WBCTRLA_GetSelectedIconList tag with the WorkbenchControl() function. To free it when you are done use the same function and WBCTRLA_FreeSelectedIconList tag. More information in the workbench.doc autodoc.
This code should work (untested):
@Ami603
Sorry to have reacted too soon: & thank you very much
@salass00 thanks too, very helpfull