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 

Launching a browser by clicking on a url on my email.

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Esther 21



Joined: 20 Mar 2010
Posts: 30

PostPosted: Sat Mar 20, 2010 6:12 am    Post subject: Launching a browser by clicking on a url on my email. Reply with quote

All, I have a doubt and I hope it can be answer here.

I would like to write a script that allows me to launch a browser when I clicked on a URL that is on my email. I would like to Automate this, such as when i clicked on the URL :

1. It will launch my default browser
2. It will automatic enter URL into the address field in the browser
3. It will load to the URL page that i have selected.
4. Lastly i am trying to do this on a remote desktop.


Anyone think is this feasible to do so?

Thank You All.
Back to top
View user's profile Send private message
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Sat Mar 20, 2010 7:50 am    Post subject: Reply with quote

Which email? Which browser?

#1,2,3 are standard/commonplace for most email programs.
Check the configuration settings.

Not sure about #4.
Back to top
View user's profile Send private message
Esther 21



Joined: 20 Mar 2010
Posts: 30

PostPosted: Sat Mar 20, 2010 8:17 am    Post subject: Reply with quote

Hi Leef_me,

Email is just a example. Because i would like to select on a URL on my current system that isn't connect to the internet. The URL can be in a doc/textfile/application/email. And this will help me to launch IE/Firefox on my remote system is connected to the internet.

so is it possible to insert the URL using AutoHotKey into the browser field? and to launch to the URL page?
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sat Mar 20, 2010 9:19 am    Post subject: Reply with quote

My suggestion:
- setup a hotkey that selects a line of text and copy to clipboard either via send {home}{shift down}{end}{shift up}^c or perhaps mouse double/tripple click
- extract the URL from the copied line (search forum for regexmatch urls, links)
- run url

Try somethings, post code if you get stuck.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Esther 21



Joined: 20 Mar 2010
Posts: 30

PostPosted: Sat Mar 20, 2010 6:40 pm    Post subject: Reply with quote

Ok, Thanks you hugov. I will try some code as i am new to AutoHotKey. ((:
Back to top
View user's profile Send private message
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Sat Mar 20, 2010 7:43 pm    Post subject: Reply with quote

Esther 21 wrote:
so is it possible to insert the URL using AutoHotKey into the browser field? and to launch to the URL page?
Yep.
Depending on the browser, there is likely a hotkey to select the _address field_ and the usual result is that the whole contents is selected.
In I.E. both the hotkeys F6 and Alt-d both seem to do the job.

I can't speak to the "remote desktop" aspect of the question because I have never had the need or setup.

The simple methods to use are the same as what you would do manually.
1 find the address someplace
2 select the text of the address
3 copy the address with alt-edit-copy (control-C) ^c in Ahk
4 switch to the browser, or open it if not already open
5. select the _address field_ (click, or F6 or alt-d; your choice)
6 paste the prior copied address and hit enter to >go<

In the code below, F2 performs steps 3...6

F1 is just a hodgepodge collection of thought on how to get the address besides control-c

Code:
settitlematchmode 2 ; <----- easier to match a title, still must spell and CaPiTaLiZe correctly
return

f1::         ; you can use several methods to open a webpage

web=http://autohotkey.com   ; a variable
;run %web%

;run http://www.autohotkey.com/forum/   ; hard-coded


send {f6}   ; this is assuming that I.E.is alreaad open and you wish the
      ;      new address to replace the current contents
sleep ,100
send %web%

sleep ,100
send {enter}
return


f2::   ; pre-select the webaddress and then hit F2

send ^c   ; the copy shortcut that works in most windows-based programs

address=%clipboard%   ; read the address from the clipboard
         ;   for more information, search for 'clipboard' in the help file

IfWinNotExist, Windows Internet Explorer ;
{
  run   %addess%
}
else
{
  winactivate, Windows Internet Explorer

  send {f6}   ; <----- hotkey causes I.E. to select address bar
  sleep ,100
  send %web%   ; paste the address
  sleep ,100
  send {enter}   ; enter to 'go there'
  return
}
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Sun Mar 21, 2010 3:41 am    Post subject: Reply with quote

on every system i have ever seen clicking any link opens the link in the default browser what happenes on yours?
_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
Esther 21



Joined: 20 Mar 2010
Posts: 30

PostPosted: Mon Mar 22, 2010 1:00 am    Post subject: Reply with quote

Hello Leef_me

Thank you so much for the codes. I have learned some functions of the codes out of it. Thank You! ((:


Hi Tank,

Oh, i understand on every system we are able to click and select on the url that launches the browser. Because i am trying to launch the url on etc notepad/application/ or just having the link.
Back to top
View user's profile Send private message
Esther 21



Joined: 20 Mar 2010
Posts: 30

PostPosted: Mon Mar 22, 2010 5:42 am    Post subject: Reply with quote

Hi Leef_me,

I am trying to perform the code here by tripple click on the left mouse button, after selecting on the text of the address. Can you tell me how?

Because i tried the code:

Keywait, Lbutton,
Keywait, Lbutton, D


following by the codes...
Back to top
View user's profile Send private message
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Mon Mar 22, 2010 5:26 pm    Post subject: Reply with quote

Esther 21 wrote:
Hi Leef_me,

I am trying to perform the code here by tripple click on the left mouse button, after selecting on the text of the address. Can you tell me how?


I can point you to how to detect multiple of a key/mouse button, look at Example #3
http://www.autohotkey.com/docs/commands/SetTimer.htm


As far as 3 x Lbutton after selecting text, I believe a script will interfere with the normal operation of Lbutton.
And the normal operation of Lbutton is to help mark a section of text to copy.
My tests revealed that if I click other than in the selected block of text, that selected block is deselected.

I suggest using the 3 x click with Rbutton

Alternate questions:
must this be done with a single hand? on the mouse?
Back to top
View user's profile Send private message
Esther 21



Joined: 20 Mar 2010
Posts: 30

PostPosted: Tue Mar 23, 2010 1:38 am    Post subject: Reply with quote

Hi Leef_me

Thanks for the reply (:
Yah i did some test as well. The x3 single click will interfere with normal operation of Lbutton.

I am looking for various ideas to implement this, so i am looking at the mouse as well. Hmm..i tired including the following codes that help me to auto highlight and copy when the middle button is clicked.

Mbutton::
click 2
send ^c
address =%clipboard%

Thanks for the link (: i will read it up and see if i could implement it using the x3 Rubutton

Thank you so much
Back to top
View user's profile Send private message
Display posts from previous:   
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