<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — How to find out which page in the app is currently displayed?]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1582&amp;type=atom" />
	<updated>2023-08-18T12:28:38Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1582</id>
		<entry>
			<title type="html"><![CDATA[Re: How to find out which page in the app is currently displayed?]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5182#p5182" />
			<content type="html"><![CDATA[<p>As a workaround, until the Page features are enhanced, you can place buttons behind the Page buttons, and interrogate with your sketch.</p><p>As an example, here I have 3 Pages, each with 15 buttons on. All of the pages have the same buttons, meaning I can decode 45 buttons using just 18 interface variables.</p><div class="codebox"><pre><code>void loop() {
RemoteXY_Handler();

if(RemoteXY.Page_Button_1) Page_Number = 0;
if(RemoteXY.Page_Button_2) Page_Number = 1;
if(RemoteXY.Page_Button_3) Page_Number = 2;
if(RemoteXY.button_1) Button_Number = 1;
if(RemoteXY.button_2) Button_Number = 2;
if(RemoteXY.button_3) Button_Number = 3;
if(RemoteXY.button_4) Button_Number = 4;
if(RemoteXY.button_5) Button_Number = 5;
if(RemoteXY.button_6) Button_Number = 6;
if(RemoteXY.button_7) Button_Number = 7;
if(RemoteXY.button_8) Button_Number = 8;
if(RemoteXY.button_9) Button_Number = 9;
if(RemoteXY.button_10) Button_Number = 10;
if(RemoteXY.button_11) Button_Number = 11;
if(RemoteXY.button_12) Button_Number = 12;
if(RemoteXY.button_13) Button_Number = 13;
if(RemoteXY.button_14) Button_Number = 14;
if(RemoteXY.button_15) Button_Number = 15;

RemoteXY.Button_No = (Page_Number * Buttons_Per_Page) + Button_Number;

switch(RemoteXY.Button_No) {
  case 1:  // button_1 on page 1
  [do something here]
  break;
|
|
|
switch(RemoteXY.Button_No) {
  case 45: // button_15 on page 3
  [do something here]
  break;


etc ....</code></pre></div><p>RemoteXY.Button_No is calculated as 1-15 for the buttons on page 1, 16 to 30 for the buttons on page 2, and 31-45 for the buttons on page 3</p><p>Make your buttons same size ans shape as the Page buttons, and don&#039;t forget to &quot;Send to Back&quot;</p><p>HTH</p>]]></content>
			<author>
				<name><![CDATA[Daba]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=630</uri>
			</author>
			<updated>2023-08-18T12:28:38Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5182#p5182</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find out which page in the app is currently displayed?]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4922#p4922" />
			<content type="html"><![CDATA[<p>This feature is currently missing. We are working on it.</p>]]></content>
			<author>
				<name><![CDATA[remotexy]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2</uri>
			</author>
			<updated>2022-12-21T16:08:29Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4922#p4922</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to find out which page in the app is currently displayed?]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4920#p4920" />
			<content type="html"><![CDATA[<p>Hi!</p><p>I want to create an app that achieves the same result using different controllers - placed on different pages.</p><p>To achieve this, I need a variable informing which page is currently active in the app. Something like “RemoteXY.pageID = 0”, etc.</p><p>I don&#039;t see any other way to accomplish this. Please give me tips.</p><p>If such a feature does not exist, can you add it?</p><br /><p>Regards!<br />Patryk Szulczewski</p><br /><p><span class="postimg"><img src="https://raw.githubusercontent.com/ProtoPCBpl/Public/ae5f3bb06c85ec44f28b0c2c2b8554ed2e7d24b4/RemoteXY.gif" alt="App in use" /></span></p>]]></content>
			<author>
				<name><![CDATA[Proto PCB]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2298</uri>
			</author>
			<updated>2022-12-21T12:26:50Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4920#p4920</id>
		</entry>
</feed>
