The Forum is up for sale: XeNTaX Forum looking for new owner

Quickbms and command-line arguments

Coders and would-be coders alike, this is the place to talk about programming.
Post Reply
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Quickbms and command-line arguments

Post by finale00 »

Is there a way to pass in command-line arguments to the script?
So like if I'm using zip.bms, I can just pass in a password rather than hardcode it.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Quickbms and command-line arguments

Post by aluigi »

it's possible to use the -a command which creates some variables called quickbms_arg1 and so on.
for example:

quickbms -a "hello bye how_are_you" script.bms file

will create the variables:
quickbms_arg1 = "hello"
quickbms_arg2 = "bye"
quickbms_arg3 = "how_are_you"

so if you get zip.bms and replace:
set ZIP_PASSWORD string ""
with:
set ZIP_PASSWORD string quickbms_arg1

it should work correctly
Post Reply