Page 2 of 2

Re: Iconifying a console window

Posted: Mon Mar 11, 2019 11:46 pm
by tonyw
Exactly.

Re: Iconifying a console window

Posted: Tue Mar 12, 2019 12:45 pm
by Amigo1
tonyw wrote:There is no way to specify your own icon to be used when iconifying a console window. However, the console looks in these three places for an icon to use. Perhaps you could overwrite one of these. The console seizes on the first icon it finds, so the one in ENVARC: is checked first:

1) ENVARC:Sys/def_shell.info
2) SYS:System/Shell.info
3) Default Project icon
What if it looked for the Default Project Icon first? The email script would probably look good with an email icon.

Re: Iconifying a console window

Posted: Tue Mar 12, 2019 1:35 pm
by broadblues
The console.device is looking in several places for 'def_shell.info' before it finds one to use.
If you want the def_shell.info icon you should be doing:

dobj = GetIconTagList(NULL,ICONGETA_GetDefaultName,"shell",ICONGETA_FailIfUnavailable,TRUE,TAG_DONE);
ENVARC: is a directory assignment while ENV: is a device that's not supposed to be accessed as a media device. Locking or opening a file in ENV: to see if a file is present would violate the styleguide for environmental variables.
No I don't think so, in this case you are not accessing an environment variable, but a 'system preset'. Remember all the prefs files are in ENV:sys If you want to access and environment variable you *must* use the API they may not always reside in ENV: in the future, but accessing prefs files and icons from there is legitimate, and infact essential it's how the whole SAVE USE CANCEL prefs paradigm works.

Re: Iconifying a console window

Posted: Tue Mar 12, 2019 1:37 pm
by broadblues
Amigo1 wrote: What if it looked for the Default Project Icon first? The email script would probably look good with an email icon.
Bt default the the def project icon is just a plain white icon that's hardly suitable for an iconfied anything let alone shell.

Re: Iconifying a console window

Posted: Wed Mar 13, 2019 7:22 pm
by Amigo1
broadblues wrote:
Amigo1 wrote: What if it looked for the Default Project Icon first? The email script would probably look good with an email icon.
Bt default the the def project icon is just a plain white icon that's hardly suitable for an iconfied anything let alone shell.
Right, sorry I misread that. I thought it was looking for the icon of the script itself, but it is really looking for the def_project icon in envarc:sys.. oh well.. there goes my genius idea! :lol: :roll: