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?
Multiple Tab Locations based on a user defined variable?
-
igl007
- Posts: 2
- Joined: 04 Dec 2009 23:45
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: Multiple Tab Locations based on a user defined variable?
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";
...
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
admin
- Site Admin
- Posts: 66083
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Multiple Tab Locations based on a user defined variable?
Hi and welcome,
What do you mean by "tabbed locations"?
Don
What do you mean by "tabbed locations"?
Don
FAQ | XY News RSS | XY X
-
igl007
- Posts: 2
- Joined: 04 Dec 2009 23:45
Re: Multiple Tab Locations based on a user defined variable?
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...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 beCode: 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"; ...
I revised the code to make it do what I want, but it's not.
$a = input("Enter Client Name");
#340
goto "C:\George\$a";
Hopefully that makes sense
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: Multiple Tab Locations based on a user defined variable?
Below is the correct code: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.
Code: Select all
$a = input("Enter Client Name");
#340;
goto C:\$a;Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
admin
- Site Admin
- Posts: 66083
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Multiple Tab Locations based on a user defined variable?
No no, don't teach the wrong lessons!zer0 wrote:Below is the correct code: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.Code: Select all
$a = input("Enter Client Name"); #340; goto C:\$a;
So this is okay:
Code: Select all
$a = input("Enter Client Name");
#340;
goto "C:\$a";FAQ | XY News RSS | XY X
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: Multiple Tab Locations based on a user defined variable?
My bad
So it was only the missing semicolon that was causing problems, you little bugger
Interpolation was an interesting read 
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
XYplorer Beta Club