| ||
> SET P1=AAAABBBBBBBB
> AA=works in ztreemenu > ECHO %P1:~0,78% > > BB=works in command line but not in ztreemenu as it was meant to > SET N=20 > ECHO %%P1:~0,%N%%% > > CC=doesnt work in ztreemenu, i think it is a bug in ztree > so i started adding more %'s hoping it to work, but no luck so far > > SET N=20 > ECHO %%%P1:~0,%N%%%% no work in ztree > ECHO %%%P1:~0,%%N%%%% no work in ztree > ECHO %%%P1:~0,%%N%%%%% no work in ztree > > how can i make it work? > > but without using delayed expansion... which i havent tried yet > > sometimes adding 1 more % doesnt work, and i have been blindly adding > %'s until it worked, then it worked, but no luck with AA= Ryan, the best bit of advice I can give you is to use batch (.BAT or .CMD) files for your code, not ZTreeMenu. There's nothing wrong with ZTreeMenu - there's certainly no bugs in it as you suggested. It's just that ZTreeMenu requires you to double-up all those percent signs, and it can get a bit confusing. Use ZTreeMenu to launch your batch files when they are ready. The best of both worlds, that way. It's no good adding percent signs in an ad-hoc manner, hoping to get something working. The percent signs are very meaningful, you will need to understand their significance if you want to write powerful code. Try this:-
| ||
|
Thread locked
Messages in this Thread
- [Q] N=20, ECHO %%%P1:~0,%%N%%%%, how can i make it work? [Bug?] (1,123) - Ryan - Aug 28,2017 at 14:28 [Q]
- the view number can not be this high, posted it maybe 2 hours ago (1,197) - Ryan - Aug 28,2017 at 18:14
- the view number can not be this high, posted it maybe 2 hours ago (959) - Peter Shute - Aug 28,2017 at 22:14
- the view number can not be this high, posted it maybe 2 hours ago (972) - Ryan - Aug 29,2017 at 00:06
- the view number can not be this high, posted it maybe 2 hours ago (959) - Peter Shute - Aug 28,2017 at 22:14
- [Q] N=20, ECHO %%%P1:~0,%%N%%%%, how can i make it work? [Bug?] (949) - Nick Williams - Aug 29,2017 at 01:02
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (984) - Ryan - Aug 29,2017 at 03:59
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (977) - Nick Williams - Aug 29,2017 at 20:19
- my head ignored "call" in all batches..... (951) - Ryan - Aug 30,2017 at 01:57
- No problem at all. Hopefully you can make progress now (nomsg) (935) - Nick Williams - Aug 30,2017 at 06:20
- my head ignored "call" in all batches..... (951) - Ryan - Aug 30,2017 at 01:57
- Understanding multiple percent signs (1,051) - Oliver Pretzel - Aug 30,2017 at 12:46
- Thank you VERY much for this. Clear, concise, and informative. (992) - Doug Borg - Aug 31,2017 at 16:52
- Understanding multiple percent signs (905) - Hartmut Schneider - Nov 14,2017 at 05:33
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (977) - Nick Williams - Aug 29,2017 at 20:19
- adding 1 more %, doubling it, still dont work, so i was wondering if it was bug (984) - Ryan - Aug 29,2017 at 03:59
- the view number can not be this high, posted it maybe 2 hours ago (1,197) - Ryan - Aug 28,2017 at 18:14