Sign in to follow this  
Followers 0
FaridAgl

Fix My Code - Show Web Page in GUI with Default Browser

4 posts in this topic

#include <GUIConstantsEx.au3>
GUICreate("Web Page in GUI", 518, 328)
GUICtrlCreateTab(10, 10, 500, 310)
GUICtrlCreateTabItem("ADS")
$Object_ADS1 = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($Object_ADS1, 24, 34, 471, 64)
$Object_ADS1.navigate("http://www.godlike-exp.ir/ADS/ads1.html")
$Object_ADS2 = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($Object_ADS2, 24, 101, 471, 64)
$Object_ADS2.navigate("http://www.godlike-exp.ir/ADS/ads2.html")
$Object_ADS3 = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($Object_ADS3, 24, 173, 471, 64)
$Object_ADS3.navigate("http://www.godlike-exp.ir/ADS/ads3.html")
$Object_ADS4 = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($Object_ADS4, 24, 245, 471, 64)
$Object_ADS4.navigate("http://www.godlike-exp.ir/ADS/ads4.html")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
EndSwitch
WEnd

It's my code so far, it's working fine but i want to when some one clicked on the loaded ads, they open on default browser.

Sorry for weak grammer, hope you understand me.

Also if there is any way, i don't wan't to load this URLs from cache if they are available.

Best Regards

Share this post


Link to post
Share on other sites



I bet you can work in the _WinAPI_FindExecutable command to get the default browser set to open html files...


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

What i'm trying to say is that i'm using ObjCreate("Shell.Explorer.2") to show a web page in GUI, is there any better way or not?

Thanks dear kaotkbliss but _WinAPI_FindExecutable is not what i'm searching for.

Share this post


Link to post
Share on other sites

it's working fine but i want to when some one clicked on the loaded ads, they open on default browser.

This sounds like you want the ad to open with the default browser, in which case you would use

$webad= _WinAPI_FindExecutable("path to some html file")

Run($webad & " " & "path")

Now, if you want the ad to show up in your "Web Page in Gui" ap, then perhaps place another Gui on top of your original gui and load the page in there just as you are with the ads (this way you can exit the page and you can go right back to the ads without re-loading everything)


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0