AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Click a URL in Editbox/Text box in AHK

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Mkbailey755



Joined: 20 Aug 2007
Posts: 168

PostPosted: Fri Jul 18, 2008 5:19 am    Post subject: Click a URL in Editbox/Text box in AHK Reply with quote

I Have a program that keeps track of customers accounts some info I need is on a website. so I was hoping there was a way to click on a link inside a AHK edit box like you would on a web page. I was thinking of maybe using a run, Internet Explorer and pop-up the links but this would get annoying. I searched the forum and didn't turn up any results. Thanks in advance.
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 558
Location: MN, USA

PostPosted: Fri Jul 18, 2008 7:43 pm    Post subject: Reply with quote

I'm not very clear on what you need, but if you simply want to create hypertext links in an AHK Gui, you can do that with text controls and a timer.
Code:
links = Google,Yahoo,Live,Ask,Lycos

Gui, +LastFound
Gui, Font, s14
Loop, Parse, links, `,
 Gui, Add, Text, cBlue v%A_LoopField% gLink, %A_LoopField%
SetTimer, MouseOver, 100

Gui, Show
WinGet, GuiID
return
GuiClose:
ExitApp

MouseOver:
MouseGetPos,,,ID,control
If (ID = GuiID) AND (InStr(control,"Static") = 1)
 GuiControlGet, text,,%control%
Else text = 0
Loop, Parse, links, `,
 If (%A_LoopField%) AND (A_LoopField != text)
 {
  Gui, Font, norm cBlue
  GuiControl, Font, %A_LoopField%
  %A_LoopField% = 0
 }
 Else If !(%A_LoopField%) AND (A_LoopField = text)
 {
  Gui, Font, underline c6495ED
  GuiControl, Font, %text%
  %text% = 1
 }
return

Link:
Run, http://www.%A_GuiControl%.com
return

_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
Mkbailey755



Joined: 20 Aug 2007
Posts: 168

PostPosted: Fri Jul 18, 2008 10:55 pm    Post subject: Reply with quote

Perfect thank you this will indeed will be handy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group