Home / Microsoft / Microsoft DOS / %var1:~%var2%% HELP
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: %var1:~%var2%% HELP  (Read 3330 times)
Bob Tample
Guest
« on: June 28, 2005, 11:17:37 PM »

I'm making a program that would encrypt a paragraph. Im using the variable expansion thingy (%variable:~1%) to find each letter and echo it as a different letter. But I do not want a limit to the amount of letters that you can type in and don't want to write a overly large code. Does anybody know how to include another variable in a variable expansion thing?
%var1:~%var2%% did not work.
IP logged
merlin_2
Guest
« Reply #1 on: June 29, 2005, 05:35:26 AM »

maybe you can find something here>http://www.robvanderwoude.com/index.html
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,342

Experience: Familiar
OS: Windows 7

« Reply #2 on: June 29, 2005, 03:36:37 PM »

Use the following as a template. The key is to CALL the SET

Code: [Select]

SET start=10
SET length=9
SET string=The quick brown fox jumps over the lazy dog
CALL SET substring=%%string:~%start%,%length%%%
ECHO (%substring%)


Hope this helps. 8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
Bob Tample
Guest
« Reply #3 on: June 29, 2005, 05:19:18 PM »

Thanks. The call trick works perfectly!  :)
IP logged
Bob Tample
Guest
« Reply #4 on: June 30, 2005, 01:29:12 AM »

I finished my rough draft of my encoder. Basic code right now. See if you can break it!

011100111111111111111001111111111111100 111111100111111111111111111001001111111 111111111111100111111111111111111111001 111111111110010011111111111111111111001 111111110011111111111111100111111111111 110011111111111111111110001111111111111 110011111111111111000110011111111111111 111100111110010011111111111001111111110 011111111111111001111111000111111111111 100111111111111111111111111100011100111 111111111111001111001111100011111111100 111111000111111111111111111111111100111 111111111111001111111111111111111110001 111111111111111111111100100111111111111 110011111111111111111111000111111111111 111111110011111111111111100011111100111 111111001111111111111100111100011111111 111111100111111111111111111111001111111 111111111111100011111111001111111111111 110011111111111111111111111000111111111 000111100111111111001111000111111111001 111111111111111111100011111001111111111 111001001111111110011111111111100011111 1111111100111110

Ive also made a decoder. If you want to find out how I made it email me, or if you want a copy. I'll also check the forum.
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,342

Experience: Familiar
OS: Windows 7

« Reply #5 on: June 30, 2005, 07:59:42 AM »

*censored*! I left my magic decoder ring in my other suit. But in the  neverending quest for knowledge, why don't you post your solution so everyone see your handiwork.

8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / %var1:~%var2%% HELP « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.091 seconds with 20 queries.