English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old Yesterday, 13:26   #1
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,453
How to get the Names of the Icons Selected With Another Icon

Hi there!

I'd like to know the paths/names of any icons selected when running a program from its icon but I can only get the paths of the folders of the selected icons

I must be missing something but exploring the various DOS/Workbench structures/functions didn't enlighten me

Here's what I tried so far, all working but giving me paths only:

Code:
wbstartup = (struct WBStartup *)argv;
for(i = 0, wbarg = wbstartup->sm_ArgList;
    i < wbstartup->sm_NumArgs;
    i++, wbarg++)
{
	fib = AllocDosObject(DOS_FIB, NULL);
	Examine(wbarg->wa_Lock, fib);
	EasyRequest(NULL, &requester_struct, NULL, fib->fib_FileName);				
	NameFromLock(wbarg->wa_Lock, buffer, 108);
	EasyRequest(NULL, &requester_struct, NULL, buffer);
How could I get the names of any selected icons?

Thanks in advance!
tygre is offline  
Old Yesterday, 14:20   #2
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,653
WBArg.wa_Name is the name of a selected file, and WBArg.wa_Lock is a lock on the directory containing the file.
hooverphonique is offline  
Old Today, 14:43   #3
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,453
Quote:
Originally Posted by hooverphonique View Post
WBArg.wa_Name is the name of a selected file, and WBArg.wa_Lock is a lock on the directory containing the file.
Duh!

Thanks Hooverphonique! I was so focused on the lock that I didn't use that one!

Cheers!
Tygre
tygre is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WorkbenchControlA() - Issue getting selected icons information with just .info files Daedalus Coders. System 2 22 November 2023 10:07
Issue with icons / confusion over icon sets...? bjdcleary New to Emulation or Amiga scene 5 13 October 2019 11:53
WB3.1, Fblit,Icon.library 46.4, MagicWB icons and chipmem usage Yulquen74 support.Apps 5 13 July 2018 18:51
Weid colours for some icons or when holding an icon selected tygre support.Other 7 05 September 2015 20:39
Matching device names with volume names. Thorham Coders. System 2 27 July 2015 12:20

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:13.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08297 seconds with 15 queries