• Caterpillar
    Caterpillar
    Posts: 33 from 2016/12/29
    Thank u jPV, u seem the only one who got my point LOL
    I'm sorry unfortunately I can't spend much time currently with these things or to reply everybody properly (my fault, very sorry)...

    Fact is, to discover what u just wrote above, i.e that to set custom default icons for executables (and scripts too) I had to name them application/x-amigados for script, application/x-executable etc. , I had to... wonder what ? Go looking into Ambient source code !!! This is not much logical IMHO... there should not be too many "internal" things here or things an user should "assume", I mean. IMHO, the only "internal" types should be very root ones, i,.e perhaps only File and Directory and so on. But I'm not going to preeeeach here about what Ambient should and should not do LOL, otherwise somebody could easily tell me "then write ur own desktop if u can, or put your hands in Ambient code and fork it to suit your own tastes" - and I can't blame him ;) Said very friendly ;)

    Anyway, as you correctly pointed out, yeah that is something I just discovered too. I can't override the SCRIPT type !
    I tried all the ways. I pretty came to your same idea too and before reading the replies here (so I'm not stupid, yay yay !!!), i.e adding a file x-amigados:

    AMTD
    1
    Type application/x-amigados
    Name Script
    Priority 128
    Action
    Name Execute
    Event Menu
    Command AMIGADOS Execute %sp
    End
    End

    to sys:prefs/Ambient/filetypes/application/ Without luck. I even tried to put Priority 999, no hopes.

    Yeah I noticed too there's an internal option to detect protection bits but it's not parsed as an external command unfortunately...

    The strange thing is, when u define the custom type above in the hope to override the internal one, it actually GETS listed in Ambient MIME prefs gui and can even be edited, but this type is NOT used at file detection level. In fact, if u (for example) specify above "Name script2" instead of "Name script", u can easily check that (even after a reboot) when u open the context menu over a script type, u keep reading "script" in the menu title and not "script2" or whatever name u specify else - a clear symptom that ur new type is recorded but NOT used.

    Oh I also noticed that more strange things happen at such proposal... for example, if I have a text file in RAM: and I set its S bit with the Info requester, the file gets still detected as text, not script. The same happens if I close and reopen the ram: window. BUT, if I move that file to somewhere else, voilĂ  it now gets finally detected as script. Some cache issues, it seems...

    To cover other questions... no I don't care tampereing with what MOS/Ambient does with Elf or 68K executables (even if I think the user should be given full responsibility of what he/she does, in theory... this is my policy at least LOL). I just wanted to change their fucking (sorry ;) ) default icons, just to distinguish in a mess of files what is what. Call it eyecandy LOL. And luckily I could do it once I discovered by looking into Ambient sources how such types were called.
    I can read these replies only now, sorry... So at least now I'm happy with my icons finally LOL LOL LOL ;)

    But I think I must also justify my need to change/tailor the Script filetype to my needs... under AmigaOS I was used to associate a script to script files. Such script simply opened a requester asking "what to do with this script ? Edit - View - Execute" and so on. Something I would like to replicate under Ambient in a nicer way of course. Like... configuring menu entries for script types, adding Edit, View, or Execute... maybe letting Execute the default (double click) defined action.

    As you jPV correctly implied, more or less, the ONLY way to achieve that is, indeed, to set those actions for the root (i.e for every files) which is not so "nice" if we want. And we agree here.
    Another option I thought of is: ignoring the fact dos scripts have the +S flag set; define a custom MIME type of TEXT class, call all your scripts with a .bat suffix (for example), and specify the above said actions for those.
    Still not very nice or clean... and I will be limited only to some scripts named that way, i.e I can't do the same with (for example) startup-sequences or other scripts I can't and don't want to add the .bat suffix to...

    Anyway, I find it strange that the Script type can't be overridden, not even by increasing the priority to 999 ! Maybe 666 will work ? LOL I'm kidding ^_^
    And I have definitely no time to study Ambient sources more in depth, not to speak of changing them and recompiling LOL

    Also I find it very strange or not so "clean" the fact (look at mimeuri.h) some types like VORBIS and MPEGA has to be defined as internals ?!? Clearly there's still some work to do with Ambient MIME types to smooth all corners out, how to say it...

    Oh again I apologize in advance if I pressed RETURN again at some EOLs. I tried not to. Just u can't get rid of some bad habits so easily and I don't definitely want to go seeing a brainshrink for that LOL

    Thank u for paying me attention though, at least my migration from my previous hybrid AmigaOS/MOS 1.4.5 system is 99% completed and I'm happily useing MOS 3.9 I paid money for, and already doing 99% things with it.
    I'm always listening and putting into practice all your suggestions, said in general, even if more than often it takes some time and I can't comment on every one...
    .Bar
  • »01.02.17 - 15:35
    Profile