Quote
DannyD
But how can I access the contents of variable "THIS_ID" from a makro?
If the name of THIS_ID is ever the same is very simple, if not, you could add a prompt to force you (the user) to request it.
You need to search for THIS_ID and it's as simple as use index and than substr to get value.
Let's say the variable is &numbers. First you search for it in the $BaseUrl.
$whereareyou = index($BaseUrl, "&numbers") #this gives the position of the variable.
Ok, &numbers has 8 characters plus the equal sign, 9 then.
$variablevalueis = substr($BaseUrl, $whereareyou+9, 3);
Ok, you may be asking why I wrote $whereareyou+9 and 3 up there. With the first thing we are telling substr where must it start to extract the string from (after the equal) and the 3 is the length of the numbers variable. I'm assuming the numbers variable would have ever 3 characters.
If for any reason the length of the variable value varies, you then must search for the next "&" that indicates the beginning of the new variable. You can do this by applying what I explained here.
Edited 1 time(s). Last edit at 12/18/2009 09:13PM by JohnHell.