Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: %var1:~%var2%% HELP  (Read 7785 times)

0 Members and 1 Guest are viewing this topic.

Bob Tample

  • Guest
%var1:~%var2%% HELP
« 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.

merlin_2

  • Guest
Re: %var1:~%var2%% HELP
« Reply #1 on: June 29, 2005, 05:35:26 AM »
maybe you can find something here>http://www.robvanderwoude.com/index.html

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: %var1:~%var2%% HELP
« 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)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Bob Tample

  • Guest
Re: %var1:~%var2%% HELP
« Reply #3 on: June 29, 2005, 05:19:18 PM »
Thanks. The call trick works perfectly!  :)

Bob Tample

  • Guest
Re: %var1:~%var2%% HELP
« 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.

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: %var1:~%var2%% HELP
« 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)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein