Re: Selecting a Variable name by Script
Alex, Thanks, I can make that work. Dennis On May 1, 2005, at 8:42 PM, Alex Tweedly wrote: Dennis Brown wrote: I have been trying to get the example in the Rev documentation to work in my script: global gVariable1 on test put 1 into x put 50 into ("gVariable"&x) end test it won't "Apply". It gives me a bad destination error. it works fine with things like field names, but not variables. I have 10 buttons that I want to use to save or recall info from ten sets of arrays. I just wanted to write one script to do the work instead of duplicating the script ten times in each button with just the number after the variable name different (the ten button work a bit like radio buttons). However, I can't figure out how to do this in Rev if the above method will not work. Any Ideas? global gVariable1 on mouseUp put 1 into x put 2 into gVariable1-- just to be sure it does get changed :-) do "put 50 into gVariable"&x put "we got " & gVariable1 into msg end mouseUp -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005 ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Selecting a Variable name by Script
Mark, I can't, because the array variables I want to save are already multi-dimensional keyed arrays. Otherwise I would save them as custom properties somewhere. Dennis On May 1, 2005, at 8:39 PM, Mark Talluto wrote: On May 1, 2005, at 4:56 PM, Dennis Brown wrote: global gVariable1 on test put 1 into x put 50 into ("gVariable"&x) end test How about: put 1 into x put 50 into gVariable[x] Mark Talluto -- CANELA Software http://www.canelasoftware.com ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Selecting a Variable name by Script
Dennis Brown wrote: I have been trying to get the example in the Rev documentation to work in my script: global gVariable1 on test put 1 into x put 50 into ("gVariable"&x) end test it won't "Apply". It gives me a bad destination error. it works fine with things like field names, but not variables. I have 10 buttons that I want to use to save or recall info from ten sets of arrays. I just wanted to write one script to do the work instead of duplicating the script ten times in each button with just the number after the variable name different (the ten button work a bit like radio buttons). However, I can't figure out how to do this in Rev if the above method will not work. Any Ideas? global gVariable1 on mouseUp put 1 into x put 2 into gVariable1-- just to be sure it does get changed :-) do "put 50 into gVariable"&x put "we got " & gVariable1 into msg end mouseUp -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005 ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Selecting a Variable name by Script
On May 1, 2005, at 4:56 PM, Dennis Brown wrote: global gVariable1 on test put 1 into x put 50 into ("gVariable"&x) end test How about: put 1 into x put 50 into gVariable[x] Mark Talluto -- CANELA Software http://www.canelasoftware.com ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Selecting a Variable name by Script
I have been trying to get the example in the Rev documentation to work in my script: global gVariable1 on test put 1 into x put 50 into ("gVariable"&x) end test it won't "Apply". It gives me a bad destination error. it works fine with things like field names, but not variables. I have 10 buttons that I want to use to save or recall info from ten sets of arrays. I just wanted to write one script to do the work instead of duplicating the script ten times in each button with just the number after the variable name different (the ten button work a bit like radio buttons). However, I can't figure out how to do this in Rev if the above method will not work. Any Ideas? Dennis ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution