bang.exe parameter length Thread last updated on 2006-03-01 09:43:00

Posted by member 51749 on 2006-02-25 18:23:12

it seems bang.exe truncates my command if it cant handle the length. the max seems to be around 200 chars, a bugger as im trying to give it around 1500.

any workarounds you guys can think of?

Posted by member 1 on 2006-02-25 18:28:18 link

I believe, if I remember correctly...the limit is 255 characters...!Bang included. This comes because of the limit on varchar strings in C.

The only work around would be to write a script and script things to run one after the other.

Posted by member 51749 on 2006-02-25 19:04:57 link

bugger... figured as much.
i suppose i could write a bunch of mzscript bangs to execute..

Posted by member 1 on 2006-02-25 21:04:53 link

why would you need a bunch?

Posted by member 212670 on 2006-02-25 22:32:21 link

Safety in numbers?

Posted by member 37809 on 2006-02-25 22:59:52 link

yes. redesign your script.

what are you doing with bang.exe?

Posted by member 1 on 2006-02-25 23:35:34 link

Convert your VBScripts to LSLua scripts and be done with it all?

Posted by member 5575 on 2006-02-26 00:09:06 link

If he's using vbscript at all, it's probably to do something that is difficult or impossible to do with lua. I use both lua and vbscript, but for completely different purposes. Of course, since the OP hasn't given us any clue as to what he's doing, we don't really know. Given more details, *maybe* we could help.

Posted by member 51749 on 2006-02-26 22:23:31 link

ok well ive just about gotten it to work.

what i need to know is: is there a way to pass arguments to a mzscript bang?

Posted by member 1 on 2006-02-26 23:11:16 link

O...and the other thing worth mentioning. You don't need bang.exe since 24.4. You can just do litestep.exe !Bang Command.

Posted by member 5575 on 2006-02-26 23:18:31 link

Yep - the standalone bang.exe is nice if you want to stick it in a folder with a vbscript though, since the vbscript has no simple way of knowing the correct path to litestep.exe. It knows its own folder, though, so you can just drop a copy of bang.exe in there for it to use. You *could* dig in the registry for the path to the LS executable, assuming LS has been installed in the usual fashion.

As far as mzscript args go, yes, you can pass it stuff. From the 0.9.13 *docs* (hint, hint =P):
%{args}
%{\1} %{\2} %{\3} %{\4} %{\5} %{\6} %{\7} %{\8} %{\9}
The first will give you the entire argument list for the currently executing
bang command. The other 9 will return individual tokens in the list. Note
that calling another user-defined mzscript bang command will wipe out these
variables.

Posted by member 51749 on 2006-02-27 00:01:06 link

thank you!

Posted by member 51749 on 2006-02-27 00:26:03 link

using litestep.exe itself to pass the bang commands works a treat.

i guess i should tell you what im doing.

i have a custom made vbscript that gets current weather info, 5 satellite weather images, and a severe weather warning (if available), and which passes it all into litestep for display in various xlabels. the severe weather warning text was rather long, which broke bang.exe :/

but its probably working now! cant test it tho, as the current severe weather warning just expired! :(

Posted by member 212670 on 2006-02-27 01:11:49 link

You should check out Brian's Chameleon. He's a vb slut. ;)

Posted by member 5575 on 2006-02-27 02:01:44 link

And a lua whore, to boot. I only have scripts to get current weather, seven days of forecast, severe weather warnings, and three radar images though. I guess I need to put more features in there. =P I've got foobar support added into version 1.2, at least. I'll have to look into iTunes next.

Rather than passing all that stuff directly into labels, though, I write it to a file and then "include" it. No worries about character lengths then.

Posted by member 99 on 2006-02-28 20:24:09 link

IIRC the limit is set by a structure in LS's core. Internally LS will work with lengths up to about 4096 characters, but the buffer for passing the bang message between processes is much smaller. I don't think there's any particular reason for it to be that small but changing it would cause compatibility problems.

Of course the other thing is the max command line length imposed by Windows, I don't remember if it's short or insanely long...

Posted by member 1885 on 2006-02-28 21:15:30 link

What's up with all (well, a lot of) LS users being so obsessed with weather forecasts? What are you guys, farmers? Sea captains? :D

Posted by member 5575 on 2006-02-28 21:38:58 link

Bike riders, snowboarders, hikers... anything but cowboys, thanks. =P

Posted by member 212670 on 2006-02-28 22:03:02 link

Brokeback Litestep?

Posted by member 5575 on 2006-02-28 22:11:20 link

Me thinks 'tis time to lock this thread.

Posted by member 37809 on 2006-03-01 09:43:00 link

...or start selling LiteStep straitjackets