Page 1 of 1
Multiple Tab Locations based on a user defined variable?
Posted: 04 Dec 2009 23:53
by igl007
Sorry if this has been asked before. I did a search but couldn't find anything.
What I am trying to do is have a dialog box appear where the user can type a variable in like say Moonrise They click ok and then a pre-determined number of tabbed locations would open pointing to set folder structures like this:
C:\footage\Moonrise
I:\graphics\Moonrise
X:\temp\seasonal\Moonrise
E:\george\killer\Moonrise
and so on...
Is that possible?
Re: Multiple Tab Locations based on a user defined variable?
Posted: 05 Dec 2009 00:15
by zer0
If you know the locations to be opened for a particular variable that you type then sure, it's possible. The code for your example would be
Code: Select all
$a = input("Enter Variable Name");
if $a == "Moonrise" {
#340;
goto "C:\footage\Moonrise";
#340;
goto "I:\graphics\Moonrise";
#340;
goto "X:\temp\seasonal\Moonrise";
#340;
goto "E:\george\killer\Moonrise";
}
elseif $a == "Another variable" {
#340;
goto "PATH";
...
Re: Multiple Tab Locations based on a user defined variable?
Posted: 05 Dec 2009 09:58
by admin
Hi and welcome,
What do you mean by "tabbed locations"?
Don
Re: Multiple Tab Locations based on a user defined variable?
Posted: 07 Dec 2009 23:17
by igl007
zer0 wrote:If you know the locations to be opened for a particular variable that you type then sure, it's possible. The code for your example would be
Code: Select all
$a = input("Enter Variable Name");
if $a == "Moonrise" {
#340;
goto "C:\footage\Moonrise";
#340;
goto "I:\graphics\Moonrise";
#340;
goto "X:\temp\seasonal\Moonrise";
#340;
goto "E:\george\killer\Moonrise";
}
elseif $a == "Another variable" {
#340;
goto "PATH";
...
Thanks for the reply. I tried some your code which helped me go further in the right direction. I am still unsure on a couple of things. I don't think i need a if/then though. IDK...
I revised the code to make it do what I want, but it's not.

I don't know how to make the final directory in the goto statement be the inputed name that the user typed. Here is what i tried...
$a = input("Enter Client Name");
#340
goto "C:\George\$a";
Hopefully that makes sense
Re: Multiple Tab Locations based on a user defined variable?
Posted: 08 Dec 2009 10:16
by zer0
Below is the correct code:
Code: Select all
$a = input("Enter Client Name");
#340;
goto C:\$a;
Yours was almost right, save for a missing semicolon and quotation marks that shouldn't have been there, because otherwise XY couldn't interpret your variable $a.
Re: Multiple Tab Locations based on a user defined variable?
Posted: 08 Dec 2009 10:19
by admin
zer0 wrote:Below is the correct code:
Code: Select all
$a = input("Enter Client Name");
#340;
goto C:\$a;
Yours was almost right, save for a missing semicolon and quotation marks that shouldn't have been there, because otherwise XY couldn't interpret your variable $a.
No no, don't teach the wrong lessons!
Quotation marks should be around every string! The variable $a is
interpolated (check Help).
So this is okay:
Code: Select all
$a = input("Enter Client Name");
#340;
goto "C:\$a";
Re: Multiple Tab Locations based on a user defined variable?
Posted: 08 Dec 2009 10:37
by zer0
My bad

So it was only the missing semicolon that was causing problems, you little bugger

Interpolation was an interesting read
