Page 1 of 1
Question regarding the switch function, and a thought
Posted: Wed Jul 29, 2026 3:54 pm
by alanwms
Is it possible to use a string for the switch function?
Thought:
Such a simple idea, but it would be nice to incorporate either automatic or manual file backups.
Re: Question regarding the switch function, and a thought
Posted: Wed Jul 29, 2026 5:34 pm
by Steve-Matrix
If you mean the Switch command icon, then not exactly. That said, you can create a set of constants with appropriate names and unique integer values, and then use those throughout your project. These could then be used in a Switch statement and would be make the code a lot more readable and easy to understand.
As for your second point, there are automatic backup options in the Global Options screen.
Re: Question regarding the switch function, and a thought
Posted: Wed Jul 29, 2026 5:47 pm
by medelec35
Would the attached example work for you?
You can use single string chars for the switch function.
Re: Question regarding the switch function, and a thought
Posted: Fri Jul 31, 2026 9:58 pm
by alanwms
The attached helped but - - I can get the if block to work but my switch simply falls through

- Untitled.jpg (55.53 KiB) Viewed 2497 times
Re: Question regarding the switch function, and a thought
Posted: Sat Aug 01, 2026 1:21 am
by medelec35
You will required something on each of the Switch function branches to determine if code is working or not.
If you post your fcfx project file, I can have a look at it for you
Re: Question regarding the switch function, and a thought
Posted: Wed Aug 26, 2026 12:25 am
by alanwms
Steve-Matrix wrote: ↑Wed Jul 29, 2026 5:34 pm
If you mean the Switch command icon, then not exactly. That said, you can create a set of constants with appropriate names and unique integer values, and then use those throughout your project. These could then be used in a Switch statement and would be make the code a lot more readable and easy to understand.
As for your second point, there are automatic backup options in the Global Options screen.
I see an auto backup for peridical saves but not a backup file location where I can save an additional copy (just incase I get corruption in the file)
Re: Question regarding the switch function, and a thought
Posted: Wed Aug 26, 2026 1:41 am
by mnfisher
This topic seems to be a duplicate of the "macro calling" topic - at least i think the detail there would apply here...
Martin