Getting Arguments from Workbench - Druckversion +- AmiBlitz³ (https://www.amiblitz.de/community) +-- Forum: AmiBlitz³ (https://www.amiblitz.de/community/forum-3.html) +--- Forum: Questions & Answers (https://www.amiblitz.de/community/forum-7.html) +--- Thema: Getting Arguments from Workbench (/thread-95.html) |
Getting Arguments from Workbench - Daedalus - 29.08.2014 Hi guys, I'm having trouble getting arguments passed to my program from Workbench. I set my executable as the default tool of a file, so that my program starts with the path to that file as its argument. In the past I have only ever done this for DOS arguments and it's worked fine using the NumPars and Par$() Blitz functions. However, these functions immediately crash when the program is launched from Workbench with an argument, as does ParPath$(0,0) and (0,1). I tried using the dos_GetWBNumArgs{} and dos_GetWBArg{} functions, but they do not give me the path to the file given as an argument - only the filename, so of course it does not work once the file is in a different directory. I'm using OS4.1 but I also tried it under 3.9 and it crashes there too. The OS stays working but the crashed program is using a lot of CPU time. Any ideas what I'm doing wrong? My testing code is as follows: Code: MaxLen startarg$=512 Thanks! |