How to check if WebPage has been instantiated

Hi All,

I am trying to keep from creating multiple instances of the same webpage.
Is there a way to check to see if a page exists before I create it?

Thanks.

Similar to

[code]for i as Integer to (Session.PageCount - 1)
dim oPage as WebPage = Session.PageAtIndex(i)
if oPage isa pgPageYoureLookingFor then
oPage.Show
exit for i

end

next i
[/code]

Written in the post editor, if it works straight out of the forum that’d be kinda nifty.

LOL!

Give me a few and I will let you know.

Thanks Tim!

Slight change (otherwise perfect!):

[code]for i As Integer = 0 to (Session.PageCount - 1)
dim oPage as WebPage = Session.PageAtIndex(i)
if oPage isa wpHome then
oPage.Show
exit for i

end

next i[/code]

This is the best I could do for a cookie:
https://www.roblox.com/library/36244635/One-Virtual-Cookie

D’oh, forgot to set the integer to 0.