Code: Select all
$var = Sample Variable;
"go to" goto $var;
"copy to" copyto $var
Code: Select all
$var = Sample Variable;
"go to" goto $var;
"copy to" copyto $var
Code: Select all
$var = Sample Variable;
"go to" goto $var;
"copy to" copyto $var
Code: Select all
global $var;
$var = E:\7Utilities\XYplorer\Scripts\;
"go to" goto $var
"copy to" copyto $var
binocular222 wrote:I tried decalring global but no useCode: Select all
global $var; $var = E:\7Utilities\XYplorer\Scripts\; "go to" goto $var "copy to" copyto $var
Code: Select all
global $var;
$var = E:\7Utilities\XYplorer\Scripts\;
"go to"
global $var;
goto $var;
"copy to"
global $var;
copyto $var;
Code: Select all
"_XYS_MAIN"
global $var;
$var = E:\7Utilities\XYplorer\Scripts\;
"go to"
global $var;
msg "GoTo $var";
"copy to"
global $var;
msg "copyto $var";
Code: Select all
"_XYS_MAIN"
global $var;
$var = E:\7Utilities\XYplorer\Scripts\;
"go to"
load "*", "_XYS_MAIN";
global $var;
msg "GoTo $var";
"copy to"
load "*", "_XYS_MAIN";
global $var;
msg "copyto $var";
OMG that's great.PeterH wrote:@Stefan
[...]
should do what you want? (See the added load-statements.)
Since on first start of the script the vars are not yet set,to use a variable in the caption of a script.
In short: this seems not possible to me.
Code: Select all
XYSMAIN >>>
your settings...
<<< XYSMAIN
rest of the script
...
...
...
Code: Select all
"_XYS_MAIN"
global $var;
if (<get trigger> == 1) {
$var = "D:\Graphics\IrfanView" }
if (<get trigger> == 2) {
$var = "D:\Tools\XYplorer" }
"go to"
load "*", "_XYS_MAIN";
global $var;
msg "GoTo $var";
"copy to"
load "*", "_XYS_MAIN";
global $var;
msg "copyto $var";
It still would be great to come up with a decent way to use a variable in the menu caption though without having to resort to a permanent variable.+ New variable <get trigger> returns the action that triggered a
script:
echo <get trigger>;
Returned values:
None = 0
LeftClick = 1
RightClick = 2
MiddleClick = 4
Notes:
- The <get trigger> variable is cleared after the script is
processed.
- Currently implemented only for Custom Toolbar Buttons.
It is in the help, under the get() function.PeterH wrote:Either it's not official (there are some unofficial functions in XY)
or Don missed to add it