AutoHotkey Community

It is currently May 25th, 2012, 1:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: July 28th, 2007, 8:37 am 
Offline

Joined: July 28th, 2007, 8:23 am
Posts: 2
Location: Poland
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 :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2007, 9:58 am 
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. 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2007, 11:31 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2248
Location: switzerland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2007, 8:22 pm 
Offline

Joined: July 28th, 2007, 8:23 am
Posts: 2
Location: Poland
this is my way to resolve my problem :)

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2007, 5:33 am 
Offline

Joined: June 16th, 2007, 6:43 pm
Posts: 35
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, azure, engunneer, Google [Bot], KenC, Prankie, toddintr and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group