View Full Version : Setting variables?
t94xr
01-31-2006, 07:58 PM
Previously in v4, all varialbes were preset %...%
Whats the new way to do them in v6? I dont understand...
Corey
01-31-2006, 08:21 PM
Hi. You don't need to initialize variables, you can just assign values as needed as long as you avoid reserved words (see help file for list) such as "function" or "then". So you can just do it like this:
myVariableName = 5;
myVariableName = "My text string";
So for example if you did this, the variable "c" would contain a value of 10 at the end:
a = 5;
b = 5;
c = a + b;
Hope that helps. There's a great page on variables in the help file, it's a very quick read and definitely worth taking in. :yes
t94xr
01-31-2006, 08:49 PM
im talking about %WinDir% and those variables??
Corey
01-31-2006, 08:54 PM
Check out the built in variables in the help file, we use stuff like this now:
_DesktopFolder
_SourceDrive
And so forth. :yes
t94xr
02-01-2006, 01:09 AM
yeah but how do i use them? :S
Corey
02-01-2006, 01:19 AM
You use them just like normal variables. Here you go:
http://www.indigorose.com/webhelp/ams60/Scripting_Guide/Variables.htm
:yes
azmanar
02-01-2006, 09:05 AM
yeah but how do i use them? :S
Here is 1 instance where you can use the Built-in Constant:
folder = Dialog.FolderBrowse("Open Folder", _DesktopFolder);
Put it in a button On Click Event and it will open your desktop as a folder.
Intrigued
02-01-2006, 05:05 PM
Tip: When in the Script area (tab) you can do such to see all of those built-ins:
(type) an underscore (_) and then CTRL+Spacebar
Corey
02-01-2006, 05:06 PM
Good tip! :yes
Intrigued
02-01-2006, 06:33 PM
Continuing on that tip:
Pick an object, say the Web object and then do this in the Script area (tab)
(type) "p" (the letter) and then Ctrl+Spacebar
Then just (arrow down or arrow up) and choose an Action!
That will speed up the process for the Actions.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.