AutoHotkey Community

It is currently May 27th, 2012, 12:55 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 29th, 2009, 5:00 pm 
Offline

Joined: October 1st, 2005, 2:09 am
Posts: 130
Location: Canada
e.g. the way AHK Web Recorder/iWebBrowser2 can retrieve it when I mouse over a button:
Code:
[IFRAME].1 **[sourceIndex]=23 **[name]= CContext **[id]= CContext
[IFRAME].2 **[sourceIndex]=58 **[name]= CApp **[id]= CApp


But this is probably due to being able to detect what's under the mouse. The reason I need this is because my sourceIndex changes, from 58 to 76 for no apparent reason, randomly, and thus it is throwing errors when it changes.


Last edited by incith on December 29th, 2009, 8:19 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 5:19 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Code:
Loop % COM_Invoke(pwb,"document.all.tags[frame].length")
  MsgBox % COM_Invoke(pwb,"document.all.tags[frame].item[" A_Index-1 "].name") "`n"
  . COM_Invoke(pwb,"document.all.tags[frame].item[" A_Index-1 "].id") "`n"
  . COM_Invoke(pwb,"document.all.tags[frame].item[" A_Index-1 "].sourceIndex")


That being said, why not try using the name or id of the frame instead to see if that's more of a constant than the sourceIndex? Alternatively, you could double check what value you'll be passing by checking the tagName of one element before hand:

Code:
f2:=(COM_Invoke(pwb,"document.all[58].tagName")="frame") ? 58 : 76

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 6:03 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
yess to Sinkfaze you listen

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 8:15 pm 
Offline

Joined: October 1st, 2005, 2:09 am
Posts: 130
Location: Canada
For some reason, it just wasn't clicking to try "23,CApp" as the frame.. so alas, thanks, it works great now, and I don't need to get the source index. :)


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, WillTroll, XstatyK and 25 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