Jump to content

Linking to a web file (not a web page)


 Share

Recommended Posts

I want to link from the inside of an .Exe file to a web file. So when you clik on the text in the application your browser opens and points you to the file of course.

#include <GuiConstants.au3>


GuiCreate("Exaple Script", 400, 120)



; TAB
GuiCtrlCreateTab(10, 10, 380, 100)
GuiCtrlCreateTabItem("One")
GuiCtrlCreateLabel("I would like this text as a link", 15, 40)
GuiCtrlCreateTabItem("Two")
GuiCtrlCreateTabItem("Three")
GuiCtrlCreateTabItem("")



; GUI MESSAGE LOOP
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Hoping somone pitties me enough to help :lmao:

thanks,

firoki

Link to comment
Share on other sites

#include <GuiConstants.au3>
$Browser = StringSplit(RegRead("HKLM\SOFTWARE\Classes\HTTP\shell\open\command",""),"%")
$Browser = $Browser[1]


GuiCreate("Exaple Script", 400, 120)



; TAB
GuiCtrlCreateTab(10, 10, 380, 100)
GuiCtrlCreateTabItem("One")
$Link = GuiCtrlCreateLabel("I would like this text as a link", 15, 40, 155)
GUICtrlSetColor ( -1, 0x0000ff )
GUICtrlSetFont ( -1, -1, -1, 4 )
GUICtrlSetCursor ( -1, 0 )
GuiCtrlCreateTabItem("Two")
GuiCtrlCreateTabItem("Three")
GuiCtrlCreateTabItem("")



; GUI MESSAGE LOOP
GuiSetState()
While 1
    Sleep ( 1 )
    $msg = GUIGetMsg ( )
    If $msg = -3 Then Exit
    If $msg = $link Then Run (  $Browser & "http://autoitscript.com", "", @SW_SHOW )
WEnd

EDIT: I fixed it to use the default browser instead of IE

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...