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 

How to get url address from web

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



Joined: 28 Jul 2007
Posts: 2
Location: Poland

PostPosted: Sat Jul 28, 2007 7:37 am    Post subject: How to get url address from web Reply with quote

Hi,

I have page with frames. There is 3 frames. I need to read url one of them (it isn't main "subpage" - i can't get url address from address box).
In manually i can click right key mouse and choose "properties". But I can't select line with url in "properteries window".
How i can geg this url ? Thanks for any answer.

P.S
Sorry for my english Smile
Back to top
View user's profile Send private message
BoBoĻ
Guest





PostPosted: Sat Jul 28, 2007 8:58 am    Post subject: Reply with quote

AFAIK the names of the frames are set at the source code of that web page. You should be able to identify them after you've downloaded the page with URLDownloadToFile, and parse its source. Good luck. Cool
Back to top
garry



Joined: 19 Apr 2005
Posts: 2212
Location: switzerland

PostPosted: Sat Jul 28, 2007 10:31 am    Post subject: Reply with quote

an example
type in url and see links in a listview and start them with once click
Code:
;----- 2005-02-09 garry ---------------------
;----- URLDOWNLOAD and Listview--------------
;------ thanx laszlo , toralf.... and all others in the forum -------

FH1=urldownload.txt
FH2=SearchedURL1.csv
FH3=SearchedURL2.csv       ;sorted and double lines are removed
filedelete,%FH2%
filedelete,%FH3%

;--------- examples ------------
;A51=http://www.autohotkey.com
A51=http://eguren-zone.blogspot.com/2006/09/garota-de-ipanema.html

Gui,2:Font,  S10 CDefault , FixedSys
Gui,2:Add,Text, x1  y5 w80  h20, URL
Gui,2:Add,Edit, x80 y5 w500 h20 vA51, %A51%
Gui,2:Add, Button,default x100 y300 w0 h0 gOK, OK
Gui,2:Show, x2 y385 w600 h65,Search For URL in a WebSite
return
;---------
2GuiClose:
2GuiEscape:
ExitApp

OK:
Gui,submit,nohide
if A51=
goto,LSZ
A51=%A51%
stringleft,A51a,A51,7
if A51a=http://
   goto A51B
else
  A51=http://%A51%
A51B:
  Gui,2:destroy

filedelete,%FH1%

Splashimage,,M2 x290 y330  h70 CWred m9 fs10 zh0,%A51% ,START >> Download,Download %A51%
URLDownloadToFile,%A51%,%FH1%
sleep,200
Splashimage,,b  x290 y330  h70 CWsilver m9 fs10 zh0,Loaded: %A51%,FINISHED = OK
Sleep,2000
Splashimage, off

LSZ:
  Gui,2:destroy
;-- thanx   LASZLO ---
K=0
A=http://
Loop,Read, %FH1%
{
T=%A_LoopReadLine%
StringReplace t,T,.%A_Space%,`,,All
StringRight r,t,1
IfEqual r,., StringTrimRight t,t,1
Loop Parse,t,`,`'` `"`;?`!=< >()
     {
   StringLeft r,A_LoopField,7
   If r=%A%
   fileappend,%A_LoopField%`r`n,%FH2%
   K++
     }
}

KH:
if K>0
     {
    goto,LISTV
     }
   else
       {
      Splashimage,,b x300 y440 w600 h70 CWsilver m9 b fs10 zh0,File %FH2%  NOT CREATED,no lines with http:// found or failure
      Sleep,6000
      Splashimage, off
      goto,EX
      }

;################################################################################33
LISTV:
Gui, Color, 000000
Gui, Font,  S10 CDefault , FixedSys
LSW:=1000            ;ListView width
GSW:=LSW+30          ;GuiShow  width
ROW:=20
GSH:=400
TXY:=(GSH-20)        ;Text Y
Gui,Add, ListView,grid r%ROW% w%LSW% +hscroll altsubmit vMyListView gMyListView,URL
LV_ModifyCol(1,900)

FileRead,AA,%FH2%
;FileDelete,%FH2%
Sort,AA,u                 ;sort and remove double lines
FileAppend,%AA%,%FH3%

;loop,read,%FH2%          ;search unsorted (double)
loop,read,%FH3%           ;search sorted   (double removed)
 {
 BX1=
 stringsplit,BX,A_LoopReadLine,`;,
 LV_Add("",BX1)
 I++
 }
Gui,Font,S8 cwhite, Verdana
Gui,Add,Text, x300 y%TXY%,%I%
Gui,Add,Text, x40  y%TXY%,Click once to start URL
Gui,Add,Text, x400 y%TXY%,AHKVERSION= %A_AHKVERSION%
Gui, Show, x2 y0 w%GSW% h%GSH% ,LISTVIEW
return

MyListView:
GuiControlGet, MyListView
if A_GuiEvent = Normal
  {
  LV_GetText(C1,A_EventInfo,1)
  run,%C1%
  return
  }
return

EX:
GuiClose:
GuiEscape:
ExitApp
Back to top
View user's profile Send private message
denon2000



Joined: 28 Jul 2007
Posts: 2
Location: Poland

PostPosted: Sun Jul 29, 2007 7:22 pm    Post subject: Reply with quote

this is my way to resolve my problem Smile

Code:
#LButton::
MouseGetPos, xxx,yyy ;get active mouse position
Click right xxx , yyy
sleep 100
send c ; choosing "properties" in polish ver. of windows . !!! In Your version of Win this can be other shortcut 
sleep 100
Wingettitle, window_name
WinMove, %window_name%, , 0, 0 
sleep 100
mousemove 115,225
send {Ctrl down} {LButton} {Ctrl up}
sleep 100
send {Ctrl down} c {Ctrl up}
sleep 100
click 155,420
Back to top
View user's profile Send private message
Sukarn



Joined: 16 Jun 2007
Posts: 35

PostPosted: Mon Jul 30, 2007 4:33 am    Post subject: Reply with quote

denon2000 wrote:
Code:

MouseGetPos, xxx,yyy ;get active mouse position
Click right xxx , yyy


If you're only going to be clicking right after getting the mouse coords and you won't be using those coords again in the program, then you can completely avoid getting those coords by just writing
Code:

Click, right
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