Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
**Local Data Embed**
EVENT:OpenBrowser EQUATE(EVENT:User + 200)
EVENT:LoadPage1 EQUATE(EVENT:User + 201)
EVENT:ProcessPage1 EQUATE(EVENT:User + 202)
EVENT:LoadPage2 EQUATE(EVENT:User + 203)
EVENT:ProcessPage2 EQUATE(EVENT:User + 204)
EVENT:LoadPage3 EQUATE(EVENT:User + 205)
EVENT:ProcessPage3 EQUATE(EVENT:User + 206)
WebBrowser LONG,AUTO
Status BYTE,AUTO
szUserName CSTRING(20)
szPassWord CSTRING(20)
URLString CSTRING(256)
Window WINDOW('Website Processor'),AT(,,396,333),FONT('MS Sans
Serif',,,,CHARSET:ANSI),GRAY,DOUBLE
END
**CODE Embed***
UrlString = '[URL unfurl="true"]https://www.website.org/'[/URL]
szUserName = CLIP(GLO:UserName)
szPassWord = CLIP(GLO:PassWord)
OPEN(Window)
0{PROP:Hide} = True
ACCEPT
CASE EVENT()
OF EVENT:OpenWindow
POST(EVENT:OpenBrowser)
OF EVENT:OpenBrowser
WebBrowser = CREATE(0,CREATE:OLE)
WebBrowser{PROP:Create} = 'InternetExplorer.Application'
WebBrowser{'Visible'} = True
WebBrowser{'Navigate(' & UrlString & ')'}
POST(EVENT:LoadPage1)
OF EVENT:LoadPage1
!Loading Main WebPage
Status = WebBrowser{'Busy'}
IF Status = 0
POST(EVENT:ProcessPage1)
ELSE
POST(EVENT:LoadPage1)
END
OF EVENT:ProcessPage1
!UserName is the id (Name) of the username entry field in the html page
WebBrowser{'Document.GetElementByID(' & chr(34) & 'UserName' & chr(34) & ').Value'} = chr(34) & szUserName & chr(34)
!Password is the id (Name) of the password entry field in the html page
WebBrowser{'Document.GetElementByID(' & chr(34) & 'Password' & chr(34) & ').Value'} = chr(34) & szPassWord & chr(34)
!chkbxAgree is the id (Name) of the checkbox field in the html page
WebBrowser{'Document.GetElementByID(' & chr(34) & 'chkbxAgree' & chr(34) & ').Checked'} = True
!Use This if it is not a form-based submit button
!buttonSubmit is the id (Name) of the submit button in the html page
WebBrowser{'Document.GetElementByID(' & chr(34) & 'BtnAgreeLogin' & chr(34) & ').Click()'}
!Use This if it is a form-based submit button
!LoginForm is the id (Name) of the form section in the html page
!WebBrowser{'Document.forms("LoginForm").submit()'}
POST(EVENT:LoadPage2)
OF EVENT:LoadPage2
!Submitting User/Pass
Status = WebBrowser{'Busy'}
IF Status = 0
POST(EVENT:ProcessPage2)
ELSE
POST(EVENT:LoadPage2)
END
OF EVENT:ProcessPage2
!Deactivate Browser Control - But Browser stays open for review
WebBrowser{PROP:Deactivate}
DESTROY(WebBrowser)
POST(EVENT:CloseWindow)
OF EVENT:CloseWindow
BREAK
END
END