Eos question.

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
User avatar
ChaChan
Explorer
Explorer
Posts: 7
Joined: Fri Feb 15, 2019 8:09 am

Eos question.

Post by ChaChan »

I was wondering if it was possible to have 2 Goto lines in a row. Where the first Goto would lead to an Enabled page(s) at first but later on it would lead to Disabled page(s) but would get ignored because of that. Then it would choose the next Goto line which would lead to an Enabled page(s).
undeniable_denial
Explorer
Explorer
Posts: 96
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Eos question.

Post by undeniable_denial »

From the help page:
Pages can be "enabled" or "disabled". The only difference is that when using a Goto action with a wildcard target, e.g. "page*", only enabled pages will be considered as possible targets.
For example, let's assume your pages are called repeatA (enabled) and repeatB (disabled).
A Goto-action with a pattern repeat* will 100% goto repeatA, because it's the only one enabled.
You can then disable A and enable B and the next time it will go the other way.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Eos question.

Post by fapnip »

While undeniable_denial probably answers your question better with a correct solution, I'll give a more direct answer:

No. If you have two gotos, one right after the other, the second will never trigger. If the first goto doesn't have any enabled pages it will fail, log an error on the console, and never continue to the second. If it has enabled pages, it will go to one of those, never continuing to the second goto.

If you wanted to implement a terrible hack (please don't), you could put a 0.1s asynchronous hidden timer before the first goto with what would have been your second goto action. In this case, if the first goto fails, the goto in the asynchronous timer would pick up the slack. But, if the second goto doesn't contain any enabled pages, it would fail as well. Regardless, it would be far better to structure your pages in a way that wouldn't require such a hack.
undeniable_denial
Explorer
Explorer
Posts: 96
Joined: Sat Aug 24, 2019 11:42 am
Gender: Male
Location: Germany

Re: Eos question.

Post by undeniable_denial »

Fair point, but I would like to clarify, that you can indeed go to a disabled page if there is an exact match. The disabling-functionality only affects the wildcard-patterns and it seemed to me that relying on that functionality was ChaChan's primary intention with stacking Gotos being an attempt to get there.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Eos question.

Post by fapnip »

Good point. Yes, enable/disable only applies to wildcard matches.

It seemed like ChaChan was after a way to move on to one group of pages after another group had been exhausted? If so, I suppose my hack work work for that -- but again, I'm hesitant to recommend anyone use it.
kerkersklave
Explorer At Heart
Explorer At Heart
Posts: 557
Joined: Sun Jul 06, 2014 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Slave

Re: Eos question.

Post by kerkersklave »

I would just use an if-action to do that.
You can check using the API whether a page is enabled or just use your own variable.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

Re: Eos question.

Post by fapnip »

kerkersklave wrote: Wed Apr 15, 2020 6:40 pmYou can check using the API whether a page is enabled
For a single page, yes, but I don't think there's a way to do that for a group of pages, is there? Does pages.isEnabled('page-group-*') work?
kerkersklave
Explorer At Heart
Explorer At Heart
Posts: 557
Joined: Sun Jul 06, 2014 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Slave

Re: Eos question.

Post by kerkersklave »

fapnip wrote: Wed Apr 15, 2020 7:14 pm
kerkersklave wrote: Wed Apr 15, 2020 6:40 pmYou can check using the API whether a page is enabled
For a single page, yes, but I don't think there's a way to do that for a group of pages, is there? Does pages.isEnabled('page-group-*') work?
Hm, no, probably not. Maybe you can enumerate all pages and resolve the wildcard yourself.
User avatar
ChaChan
Explorer
Explorer
Posts: 7
Joined: Fri Feb 15, 2019 8:09 am

Re: Eos question.

Post by ChaChan »

Well, thanks for your replies guys. I´m not gonna implement the hack and coding aint my strongpoint either, so guess
i´ll add more pages then.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests