Introduction:
Occasionally I'm asked how to pass data between AutoPlay applications, or if it is even possible. The easiest way to do this is as follows.
You will create two applications with the following settings/specifications:
Application 1:
This application will have a multi-line input object that the user will type in. Every time a key is pressed within this input object, the on key event will fire.
Step 1:
Create a multi-line input object
Step 2:
Place the following script on the on-key event of this input object:
sText = Input.GetText("Input1");
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local", "Value1", sText, REG_SZ);
Step 3:
Place the following code on the On Startup event of your project to clear out any existing value (just in case):
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local", "Value1", "", REG_SZ);
Step 4:
Place the following code on the On Shutdown event of your project, to keep the registry clear:
Registry.DeleteKey(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local");
Application 2:
This application will have a paragraph object that will fill automatically with the text typed in the input object of project 1.
Step 1:
Create a paragraph object
Step 2:
Place the following script on the On Show event of the page:
Page.StartTimer(1000);
Step 3:
Place the following script on the On Timer event of the page:
sValue = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local", "Value1", true);
Paragraph.SetText("Paragraph1", sValue);
Expected Result:
Whenever something is typed in the input object in application 1, it will appear one second later in the paragraph object of application 2. You can use this technique to pass any type of value between two autoplay applications.
Occasionally I'm asked how to pass data between AutoPlay applications, or if it is even possible. The easiest way to do this is as follows.
You will create two applications with the following settings/specifications:
Application 1:
This application will have a multi-line input object that the user will type in. Every time a key is pressed within this input object, the on key event will fire.
Step 1:
Create a multi-line input object
Step 2:
Place the following script on the on-key event of this input object:
sText = Input.GetText("Input1");
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local", "Value1", sText, REG_SZ);
Step 3:
Place the following code on the On Startup event of your project to clear out any existing value (just in case):
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local", "Value1", "", REG_SZ);
Step 4:
Place the following code on the On Shutdown event of your project, to keep the registry clear:
Registry.DeleteKey(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local");
Application 2:
This application will have a paragraph object that will fill automatically with the text typed in the input object of project 1.
Step 1:
Create a paragraph object
Step 2:
Place the following script on the On Show event of the page:
Page.StartTimer(1000);
Step 3:
Place the following script on the On Timer event of the page:
sValue = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Temp_Comm_Local", "Value1", true);
Paragraph.SetText("Paragraph1", sValue);
Expected Result:
Whenever something is typed in the input object in application 1, it will appear one second later in the paragraph object of application 2. You can use this technique to pass any type of value between two autoplay applications.
Comment