19 June 2017, 21:26 | #1 |
Registered User
Join Date: Apr 2017
Location: Zdzieszowice / Poland
Posts: 17
|
[E] argc, argv example
I need an AmigaE example how to get program name while executing from icon. I know there is an easy to use GetProgramName() function of AmigaOS, but it reads only from CLI/Shell.
|
19 June 2017, 22:20 | #2 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 829
|
I've never used E and I don't know how OS stuff is handled there (you know OS calls, OS structures). But when your program started from WB and you sure about that, then you have (after callsys GetMsg) as answer structure WBStartup and there you can find sm_NumArgs and sm_ArgList.
|
19 June 2017, 23:20 | #3 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,348
|
|
19 June 2017, 23:28 | #4 |
Registered User
Join Date: Apr 2017
Location: Zdzieszowice / Poland
Posts: 17
|
Thank You!
I've managed in other way. I found 'workbench/startup' module with wbstartup object defined. In short: Code:
... MODULE 'workbench/startup' ... DEF startup:PTR TO wbstartup, args:PTR TO wbarg ... startup := wbmessage args := startup.arglist WriteF('\s\n', args[].name) ... :-) But it works. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|