View previous topic :: View next topic |
Author |
Message |
BenStrauss
Joined: 16 Dec 2014 Posts: 5
|
Posted: Mon Mar 02, 2015 10:46 am Post subject: PageGate GetAscii Message Lookup Table Not Working |
|
|
I'm dealing with a seemingly simple case here where I just can't seem to get the GetAscii Advanced Polling Message lookup table to work.
The input file is generated by sendpage32.exe and the message contains none of the specially-designated symbols (?*~\). I also tried restarting GetAscii after adding the table entry.
Even trying what would appear to be a very simple test case, where the only lookup table entry attempts to substitute the word "ball" for "apple", no substitution takes place and the message passes unchanged.
|
|
Back to top |
|
Tech Support
Joined: 25 Aug 2003 Posts: 4382
|
Posted: Mon Mar 02, 2015 10:58 am Post subject: |
|
|
The Advanced Polling functions only come in to play when you configure the Advanced Polling; the basic polling never references the Advanced Polling settings.
To configure the program to recognize a custom structure for Advanced Polling, here's what you'll want to do:
1) Open the PG Admin.
2) Go to Interfaces - GetAscii - Settings.
3) I would strongly, STRONGLY recommend having the base polling directory set to the root hard drive somewhere. I'd actually recommend creating a path called c:\PageGateData\Ascii\ and set the polling directory to it but you can set it to any local path.
4) Click on Apply.
5) Go to Interfaces - GetAscii - Settings - Advanced Polling - Files.
6) Click on Add.
7) Set the following:
Recipient: *
From: Enter a Sender's Name here.
File(s): Since you want to modify the input of the automatic sendpage32.exe output, set this field to: *.asc
Path: Enter the path to the sendpage32.exe output folder.
File Type: Custom
8) Click on Apply.
That will tell the program that all .asc files output to the specified location should be processed with the Advanced Polling routine.
Now, specifying the Advanced Polling routine means that you have to specifically tell PageGate what the structure of the file to be read in is. Since you're using the automatic output from the sendpage32.exe, I can tell you that the output is structured as follows:
Recipient
Sender
Message
There is a carriage return/line feed between each line of the file. So, this is what you would want to use for your Advanced Polling parameters:
1) Go to Interfaces - GetAscii - Settings - Advanced Polling - Record
2) Specify the following and click Apply:
Start Pattern: *
Start Offset: 0
End Pattern: ~
End Offset: 0
3) Go to Interfaces - GetAscii - Settings - Advanced Polling - Recipient
4) Select 'Dynamic Recipient', then specify the following and click Apply:
Start Pattern: *
Start Offset: 0
End Pattern: \013
End Offset: 0
Note: \013 is the Ascii character for a Carriage Return
5) Go to Interfaces - GetAscii - Settings - Advanced Polling - Sender
6) Set it to Static Sender, then enter a value for the Sender's Name and click on Apply.
7) Go to Interfaces - GetAscii - Settings - Advanced Polling - Message
8) Set the following and click on Apply:
Start Pattern: *
Start Offset: 0
End Pattern: ~
End Offset: 0
If you have a check mark in 'Use Lookup Table', the program will attempt to search and replace all relevant strings in the message. |
|
Back to top |
|
BenStrauss
Joined: 16 Dec 2014 Posts: 5
|
Posted: Mon Mar 02, 2015 12:10 pm Post subject: |
|
|
Thanks, at least it looks like I'm on the right track now.
However, I still can't seem to get the lookup table to work.
I'm now certain that Advanced Polling itself is being applied, as I can specify a Static Message which is substituted for the original message. If I attempt to use the Dynamic Message setting as you specified with "Use Lookup Table" checked, I still cannot seem to get even a simple one-word substitution to work. The message still passes unchanged.
|
|
Back to top |
|
Tech Support
Joined: 25 Aug 2003 Posts: 4382
|
Posted: Mon Mar 02, 2015 12:14 pm Post subject: |
|
|
Can you post a specific example of what you want to replace? There may be additional parameters or boolean operators we need to include in the lookup table strings. |
|
Back to top |
|
BenStrauss
Joined: 16 Dec 2014 Posts: 5
|
Posted: Mon Mar 02, 2015 12:23 pm Post subject: |
|
|
Although my eventual goal was to replace the degrees symbol (ASCII 176) with the word "degrees" in order to avoid a 7-bit TAP issue, I was just testing a simple substitution of the word "ball" for "apple", as in "This is a test. Please don't eat the apple or you will regret it." (My actual test message.)
|
|
Back to top |
|
Tech Support
Joined: 25 Aug 2003 Posts: 4382
|
Posted: Mon Mar 02, 2015 12:38 pm Post subject: |
|
|
To use your example, to have the Advanced Polling replace all instances of the word ball with the word apple, this is what you would need to configure for the Data In and Data Out values in the lookup table for the Message:
Data In: *ball*
Data Out: apple |
|
Back to top |
|
BenStrauss
Joined: 16 Dec 2014 Posts: 5
|
Posted: Mon Mar 02, 2015 1:49 pm Post subject: |
|
|
Ahh. It works! The wildcard asterisk.
I had no that this was necessary.
I was following the example at:
http://www.notepage.net/manuals/pg/v7/server/html/lookup_table.htm.
Quote: |
"For example, if you wanted to replace all instances of the word apple with donut, you would type apple in the Data In field and donut in the Data Out field." |
No asterisks mentioned.
Thanks.
|
|
Back to top |
|
|