AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 226 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 16  Next
Author Message
 Post subject:
PostPosted: December 9th, 2009, 6:43 pm 
Offline

Joined: November 19th, 2009, 6:23 pm
Posts: 163
Location: Florida
ok maybe I can't read or don't know what I'm doing but I get some errors when I try to turn this into a .exe

anyone edumacate me in the right direction?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 9th, 2009, 7:51 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
The first post of this thread gives you a download with an exe already in it. If you are trying to compile a script, make sure you have all the appropriate libraries (iWeb & COM), and they are in the "Lib" folder (you could even just #Include them). Finally, how could we help if you don't supply the error messages you're getting?

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 8:22 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
@ tank,

I'm sure you've caught it already but I thought I'd point it out anyway since I've been banging my head against a wall for a good couple of hours trying to figure it out; iWeb_fireEvents() in its current state doesn't do anything. Apparently something about the way the handle is being passed to the function is not acceptable:

Code:
ele:=COM_Invoke(pWin,"document.all[" sName "].")


It also struck me as odd that there was no call to "fireEvent" in the iWeb_fireEvents() function. Anyway, if you write the function in a more literal format it works fine:

Code:
iWeb_fireEvents(pdsp,sName) {

  COM_Error(0)
  COM_Invoke(pdsp,"document.all[" sName "].fireEvent","onfocus")
  COM_Invoke(pdsp,"document.all[" sName "].fireEvent","onblur")
  COM_Invoke(pdsp,"document.all[" sName "].fireEvent","onchange")
  COM_Invoke(pdsp,"document.all[" sName "].fireEvent","onclick")
  COM_Invoke(pdsp,"document.all[" sName "].fireEvent","onkeyup")
  COM_Error(1)
   
}


And since we can pass the referring function's pWin to iWeb_fireEvents() we don't have to traverse the frame path again. You probably have a much more elegant solution waiting in the wings, just thought I'd mention it.

I have also uploaded Build 2.7 for review:
  • Re-tooled layout for the Viewer tab in accordance with jethrow's last rewrite, which eliminated the coordinates subsection.
  • Added support for iWeb_SelectOption() back to the Ctrl+e hotkey and added a while loop to extract the index number.
  • Ctrl+e hotkey will now work on all tabs and will return the user to the Viewer tab.
  • Set Left Click/Copy to off when selecting the Script Writer tab.

The default options are getting mildly buggy so I might need some help getting those straightened out. Here's what I'm aiming for:

  • Viewer Tab: All options (Always on top/Element Outline/Left-click/Copy) are on but can be turned off and remembered if the user scrolls away from the tab and comes back.
  • Script Writer Tab: Left-click/Copy option will always be turned off by default when it is initially scrolled to.
  • All other tabs: Element Outline will always be turned off by default when it is initially scrolled to.

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 8:59 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
sinkfaze wrote:
I have also uploaded Build 2.7 for review
As usual, great work :D . Here's a couple of (hopefully constructive) small critisizms on the viewer tab:
  • How about spacing the frames LV headers to leave a gap at the end wide enough for a vertical scroll bar. Otherwise, once you get 3 frames, you get the annoying horizontal scroll bar a the bottom. I had the settings at LV_ModifyCol(1, 70), LV_ModifyCol(2,53), LV_ModifyCol(3,102), LV_ModifyCol(4,102)
  • Also in the LV, I had wanted to use the header Index as well; however, I thought this might be somewhat confusing, considering there are actual frame indexes (ie. frames[1].frames[3])
  • You completely removed the section to allow for clicking on the LV to copy to the clipboard - were you meaning to do this? In the WM_LBUTTONDOWN function, starting with If( A_GuiControl = "VarListView" )
  • What does the To Clipboard checkbox actually do anymore? Isn't this the same as the left click copy option?
sinkfaze wrote:
The default options are getting mildly buggy so I might need some help getting those straightened out.
I'll look into this.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 3:01 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Most of the stuff you mentioned regarding the ListView is just my inability to know what exactly I was copying and pasting from your last build to mine and why (although I did want to tidy up the column headers). I'll try to polish that up better today. I'm still a little hesitant on using a frames ListView since the ability to copy a mass of data from it is not quite fleshed out (and the example that started us on this was a page with five frames(!)), but I definitely like the concept.

jethrow wrote:
What does the To Clipboard checkbox actually do anymore? Isn't this the same as the left click copy option?


It's similar but not exactly the same. The Left-Click/Copy subroutine could probably be adapted to handle that but it then you sacrifice the choice between appending to the bottom of the script automatically or copying to Clipboard so you can paste yourself. And if the option is available on the Script Writer tab and selecting a function on the Viewer tab will be "writing" script it'd be nice to preserve the same functionality there.

For similar reasons I wanted the Left-Click/Copy option turned off by default on the Script Writer tab. Difficult to paste something when you can't click in the box without overwriting your Clipboard.

jethrow wrote:
I'll look into this.


Thanks, I'm quite sure the tab subroutine is a mess. I was about 5 minutes from not uploading anything last night because I couldn't pinpoint a bug that was randomly leaving certain rolled tabs unrolled. I copied and pasted my way to sanity, though. :lol:

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 3:41 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
When my wife gets out of the hopital i will be getting back into this I much apologise for my absence in my own project thanks for carrying on without me

_________________
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 11th, 2009, 8:05 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
jethrow wrote:
I'll look into this.


Well if you're really looking for the business you can try troubleshooting Build 2.7.2 :twisted: . This build contains the beta implementation of ini file usage; currently the ini file tracks the last known x/y of the upper left corner and the last known toggle state of Always on Top, Element Outline and Left-Click/Copy. It appears to track them and remember them from script load to script load just fine, but when you start switching between tabs all heck seems to break loose and the script remembers false settings.

For your reference when looking over the file, I created a Prefs subroutine that runs whenever the script is reloaded or closed and a startup subroutine which adjusts the script according to the saved preferences. Gosub, Startup now supercedes the previous Gosub, ontop once the GUI is loaded.

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2009, 7:01 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
I have been working on trying to get the Element Outline to move as you scroll a webpage - which I have working, except in frames (I'm finding this to be particularly tricky in frames). So I thought, how about having the element outline only function when the IE_HtmlElement() function is being called? (ie - only when the CTRL button is pressed) Otherwise, the outline will disappear. Then we wouldn't even need an Element Outline menu option.

@sinkfaze
What's do you think about this? (I would like your opinion before I do this because it will require several changes)

@ tank
I also would like your opinion, but I know you're busy. (sorry to hear about you wife - I hope she's getting better)

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2009, 7:52 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
how bout something in the middle
the outline stays but if the content moves the outline disappears?

_________________
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 12th, 2009, 10:47 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
tank wrote:
how bout something in the middle
the outline stays but if the content moves the outline disappears?
Here are two issues I'm encountering:
  1. Differentiating between if the entire webpage has been scrolled, or if just the frame document has been scrolled. This is what I meant by tricky, though I think it's doable.
  2. I'm using the documentElement.scrollTop and/or body.scrollTop document properties to determine if scrolling has occurred. Do you know of a better way? The issue comes up when the frame is in a different domain. Aren't these properties then inaccessible? This would make determining if scrolling has occurred quite difficult.
This is why I was thinking the outlining could serve for identifying the element, but then disappear as soon as the CTRL button is released. It would also decrease the workload of the script a little. (it would be nice if there were a reliable way to outline the element within the webpage, rather than external GUIs)

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2009, 12:27 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
I like the idea of the border disappearing when Ctrl is released but I can also see instances where someone might like that border to remain (if possible). Would it be possible to support both with default off?

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2009, 6:02 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
sinkfaze wrote:
Would it be possible to support both with default off?
Well yeah, but that's how it is now. IMO, it becomes annoying when the outline remains if the webpage (or frame document) has been scrolled. That's why I was trying to support this, but as I stated above, I'm not sure if this will be a possibility.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2009, 1:18 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Here's a link to a modified Build 2.7.2. I made the following changes:
  • added support to LClick/copy ListView "cells"
  • adjusted width for ListView header "Index"
  • added SetWorkingDir, %A_ScriptDir% so iWeb.ini is created in A_ScriptDir
  • moved the DIRECTIVES section above the CONSTANTS/PARAMETERS section
  • adjusted the Element Outline to only be visible when the "CTRL" button is pressed
  • removed Element Outline menu item/preference
  • added OnExit - program will execute "Prefs" label when exited/reloaded
  • added "Rolled_Up" variable - keeps track if GUI is rolled up (F1), and stores in INI file
  • rewrote "IsTab" label - Left Click/Copy will be turned off everytime "Script Writer" tab is selected. Upon selecting another tab, Left Click/Copy will return to previous state
  • minor changes to "Contents copied..." tooltip

... not sure what you guys like this or not, but if you do want to auto-remove the Element Outline when the "CTRL" button is released, we could replace the continuously running "getwin" label with a hotkey - which should be easier on system performance:
Code:
~Ctrl::
SetBatchLines, -1
Ctrl_Pressed:=True
While( Ctrl_Pressed )
   IE_HtmlElement()
Outline("Hide")
SetBatchLines, 10ms
Return
~Ctrl Up:: Ctrl_Pressed:=False

EDIT - I also made the following change:
  • variable "oFrm", which is for the ^e hotkey, is set at the bottom of the IE_HtmlElement() function

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2009, 7:05 pm 
I noticed in the iWeb_SetDomObj() function, you can't set the value/text of an element to a value with a comma in it, because it gets treated as a list. So I propose adding a test to check if "obj" is a list or not:
Code:
iWeb_setDomObj(pwb,obj,t,frm="")
   {
      If   pWin   :=   iWeb_DomWin(pwb,frm)
      {
         If  col      :=   COM_Invoke(pWin,   "document.all")
         {
            If InStr(obj,",") ; test if obj is a comma delimited list
            {
               StringSplit,tt,t,`,
               Loop,Parse,obj,`,
               {
                  If   itm      :=   COM_Invoke(col,"item", A_LoopField)   ;if this fails there really isnt any need to do below
                  {
                     StringReplace,tt%A_Index%,tt%A_Index%,,,`,,all   ;   unescape all commas in text extracted always
            ;~          making invoke take integers as Strings  ",   VT_BSTR:=8"
            ;~          http://www.autohotkey.com/forum/viewtopic.php?p=221631#221631
                     COM_Invoke_(itm,   v   :=   iWeb_inpt(itm)   ?   "Value="   :   "innerHTML=",   VT_BSTR:=8,   tt%A_Index%)
                     iWeb_FireEvents(itm)
                     COM_Release(itm)
                     d=1
                  }
               }
            }
            Else
            {
               If   itm      :=   COM_Invoke(col,obj)
               {
                  StringReplace,t,t,,,`,,all
                  COM_Invoke_(itm,   v   :=   iWeb_inpt(itm)   ?   "Value="   :   "innerHTML=",   VT_BSTR:=8,   t)
                  iWeb_FireEvents(itm)
                  COM_Release(itm)
                  d=1
               }
            }      
            COM_Release(col)
         }
         
         COM_Release(pWin)
      }
         
      Return d
   }


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2009, 7:07 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
:oops: - the last post is mine.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Last edited by jethrow on December 14th, 2009, 7:08 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 226 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 16  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Cristi®, Google Feedfetcher, tidbit and 57 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