- Antwort: - command line parameters

From: [at]} <Bernhard.Sowka{>
Date: Fri, 24 Jun 2005 09:50:21 +0200

----boundary-LibPST-iamunique-921499854_-_-
Content-type: text/plain


Hi Violeta,
thanks a bomb for your support :-)
                                                                            
                                                                            
                                                                            

Bernhard



                                                                                                               
                              Violeta Seretan/ An: blackbox{([at]})nowhere.xy
                                                        Kopie: (Blindkopie: Bernhard Sowka/HKG/HELLA)
                              ( Blindkopie: Bernhard Sowka/HKG/HELLA
                                                                                                               
                                                        Thema: [BlackBox] - command line parameters
                              22.06.2005 11:43
                              ZE2
                              Bitte antworten an
                              blackbox
                              Gesendet von:
                                                                                                               
                              blackbox{([at]})nowhere.xy
                                                                                                               
                                                                                                               
                                                                                                               




Hi Bernhard,

Here is how you can parse the command line and get the parameters as an
array:

             PROCEDURE Do*;
                         VAR r: WinApi.RetCommandLineToArgvW;
                                     p: ARRAY 1024 OF SHORTCHAR;
                                     pw: ARRAY 1024 OF CHAR;
                                     narg: INTEGER;
             BEGIN
                         p := WinApi.GetCommandLine()^$;
                         pw := p$;
                         r := WinApi.CommandLineToArgvW(pw, narg);
                         IF narg = 4 THEN YourOwnProcedureHere(r[1]^$,
r[2]^$, r[3]^$); END;
             END Do;

You can call for instance this procedure at the end of Config.odc module of
BlackBox:

             Dialog.Call("YourModule.Do", "", res)

Then create your exe application while making sure that you include the new
code of Config module. If you can read French, the following guide may help
you with the exe creation:


http://www.latl.unige.ch/taln/tutoriels/exe/GuideCreationApplications.html


Violeta Seretan
============================================================================

====
Assistante-doctorante, LATL - Laboratoire d'Analyse et de Technologie du
Langage
Departement de linguistique, Faculte des Lettres, Universite de Geneve
2, rue de Candolle Tel: +41 22 379 73 32
CH-1211 Geneve 4 Fax: +41 22 379 79 31







-----Message d'origine-----
De : blackbox{([at]})nowhere.xy
Bernhard.Sowka{([at]})nowhere.xy
Envoye : lundi, 20. juin 2005 13:09
A : BlackBox Mailing List
Objet : [BlackBox] - command line parameters


I am new with BlackBox.
I am going to develop a *.exe file and I want to control this programm with
command line parameters.
Does anyone know how can I access to the command line parameters?

Cheers

Bernhard

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-921499854_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFxwYXINCkhpIFZpb2xldGEsXHBhcg0KdGhhbmtz
IGEgYm9tYiBmb3IgeW91ciBzdXBwb3J0IDotKVxwYXINCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBccGFy
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxwYXINClxwYXIN
CkJlcm5oYXJkXHBhcg0KXHBhcg0KXHBhcg0KXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgVmlvbGV0YSBTZXJldGFuLyAgICAgICAgICBBbjogICAgICBibGFja2JveEBvYmVy
b24uY2ggKEJsYWNrQm94IE1haWxpbmcgTGlzdCkgICAgXHBhcg0KICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLb3BpZTogICAoQmxpbmRrb3Bp
ZTogQmVybmhhcmQgU293a2EvSEtHL0hFTExBKSAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgKCAgICAgICAgICAgICAgICAgICAgICAgICBCbGluZGtvcGllOiAgICBC
ZXJuaGFyZCBTb3drYS9IS0cvSEVMTEEgICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGVtYTogICBb
QmxhY2tCb3hdIC0gY29tbWFuZCBsaW5lIHBhcmFtZXRlcnMgICAgICAgICAgXHBhcg0KICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgMjIuMDYuMjAwNSAxMTo0MyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXHBhcg0KICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgWkUyICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXHBhcg0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQml0dGUgYW50d29ydGVuIGFuICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXHBh
cg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxhY2tib3ggICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
XHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR2VzZW5kZXQgdm9uOiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxhY2tib3hAb2Jlcm9u
LmNoICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgXHBhcg0KXHBhcg0KXHBhcg0KXHBhcg0KXHBhcg0KSGkgQmVybmhh
cmQsXHBhcg0KXHBhcg0KSGVyZSBpcyBob3cgeW91IGNhbiBwYXJzZSB0aGUgY29tbWFuZCBsaW5l
IGFuZCBnZXQgdGhlIHBhcmFtZXRlcnMgYXMgYW5ccGFyDQphcnJheTpccGFyDQpccGFyDQogICAg
ICAgICAgICAgUFJPQ0VEVVJFIERvKjtccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAgVkFS
IHI6IFdpbkFwaS5SZXRDb21tYW5kTGluZVRvQXJndlc7XHBhcg0KICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIHA6IEFSUkFZIDEwMjQgT0YgU0hPUlRDSEFSO1xwYXINCiAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdzogQVJSQVkgMTAyNCBPRiBDSEFSO1xw
YXINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYXJnOiBJTlRFR0VSO1xw
YXINCiAgICAgICAgICAgICBCRUdJTlxwYXINCiAgICAgICAgICAgICAgICAgICAgICAgICBwIDo9
IFdpbkFwaS5HZXRDb21tYW5kTGluZSgpXiQ7XHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAg
IHB3IDo9IHAkO1xwYXINCiAgICAgICAgICAgICAgICAgICAgICAgICByIDo9IFdpbkFwaS5Db21t
YW5kTGluZVRvQXJndlcocHcsIG5hcmcpO1xwYXINCiAgICAgICAgICAgICAgICAgICAgICAgICBJ
RiBuYXJnID0gNCBUSEVOICBZb3VyT3duUHJvY2VkdXJlSGVyZShyWzFdXiQsXHBhcg0KclsyXV4k
LCByWzNdXiQpOyBFTkQ7XHBhcg0KICAgICAgICAgICAgIEVORCBEbztccGFyDQpccGFyDQpZb3Ug
Y2FuIGNhbGwgZm9yIGluc3RhbmNlIHRoaXMgcHJvY2VkdXJlIGF0IHRoZSBlbmQgb2YgQ29uZmln
Lm9kYyBtb2R1bGUgb2ZccGFyDQpCbGFja0JveDpccGFyDQpccGFyDQogICAgICAgICAgICAgRGlh
bG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21 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:12 UTC