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 

Embedded HTML, the SIMPLE way.

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



Joined: 04 Jun 2005
Posts: 146

PostPosted: Mon Jan 05, 2009 8:50 pm    Post subject: Embedded HTML, the SIMPLE way. Reply with quote

Hi there,

I KNOW this is covered in the forum. Read on.

I'm trying to do something really simple: I have an HTML file (linked to an external CSS file), local on my hard drive.

I want to put it in a GUI window on my desktop. A widget, so to speak.

I've been allllll over the forum, including the QHTM sample (does not support CSS), the complex COM examples, the 14-page thread about integrating IExplore, everything. I went to the wiki, downloaded the code, looked at the samples.

And yet, I was unable to find _one_ single simple example, just showing how to do this elementary task of taking an HTML file from the disk and displaying it. All of the examples either don't work, or are needlessly complex and flashy, and really poorly commented.

I'm not exactly new to AHK, but this one has me totally frustrated.

Help?
Back to top
View user's profile Send private message
Slanter



Joined: 28 May 2008
Posts: 739
Location: Minnesota, USA

PostPosted: Mon Jan 05, 2009 10:36 pm    Post subject: Reply with quote

Simple example, straight from the wiki. This is the simplest it will get.
Code:
Gui, +lastfound
h := WinExist()

IE_Add( h, 0, 0, 500, 500)

; Must be equal to or larger than the IE_Add size
; or some of the displayed web page will be cut off.
Gui, Show, h500 w500

IE_LoadURL("www.yahoo.com")
return

_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message Visit poster's website
ezuk as guest
Guest





PostPosted: Tue Jan 06, 2009 8:47 am    Post subject: Reply with quote

Slanter wrote:
Simple example, straight from the wiki. This is the simplest it will get.
Code:
Gui, +lastfound
h := WinExist()

IE_Add( h, 0, 0, 500, 500)

; Must be equal to or larger than the IE_Add size
; or some of the displayed web page will be cut off.
Gui, Show, h500 w500

IE_LoadURL("www.yahoo.com")
return


And again, this is a bad example for what I need.

1) It does not state what library files are included. There are like 4 different versions floating around -- what is included?

2) The URL is _external_ -- not a local file.

Can you please make it complete? That's exactly the reason I wrote this topic, and as I mentioned, I have already seen this example.
Back to top
Slanter



Joined: 28 May 2008
Posts: 739
Location: Minnesota, USA

PostPosted: Tue Jan 06, 2009 8:35 pm    Post subject: Reply with quote

If you've seen this example then try doing a little searching... Embed an Internet Explorer control in your AHK Gui via COM. All you do for URL's is copy/paste from your address bar in your browser... As I said, this is the simplest example you will find for this kind of thing, if you can't figure it out just use your browser.
_________________
Unless otherwise stated, all code is untested

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message Visit poster's website
tank



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

PostPosted: Wed Jan 07, 2009 1:12 pm    Post subject: Reply with quote

after watching the frustration from the poster for a couple days it occured to me you dont understand what a url is

url can be http://....
url can be about:blank
url can be 192.168.15.1
url can be c:\myApp Folder\some.html



so in Slanters post
Code:
Gui, +lastfound
h := WinExist()

IE_Add( h, 0, 0, 500, 500)

; Must be equal to or larger than the IE_Add size
; or some of the displayed web page will be cut off.
Gui, Show, h500 w500

IE_LoadURL("www.yahoo.com")
return


Code:
IE_LoadURL("http://www.yahoo.com")
Internet
Code:
IE_LoadURL("about:blank")
About url schema
Code:
IE_LoadURL("192.168.15.1")
IP address
Code:
IE_LoadURL("c:\myApp Folder\some.html")
Local File URL

the problem as i see it is that your attempting to build a rocket with a hi school biology education

unfortunately many come to ahk thinking that not understanding existing standards for the applications is ok. In alot of basic autohotkey commands its not.

But if your going to do something relativley advanced then you must not only understand AHK better but also the use of google Idea
_________________

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
BoBo³
Guest





PostPosted: Wed Jan 07, 2009 1:27 pm    Post subject: Reply with quote

Quote:
There are like 4 different versions floating around -- what is included?
Valid point, but easy to identify. Just open the file and check out if it includes the appropriate function, in this case: IE_LoadURL()

Don't forget to #Include that function/file.
Back to top
Guest






PostPosted: Wed Jan 07, 2009 2:28 pm    Post subject: Reply with quote

3? obviously not the real BoBo Very Happy (well maybe it is)
Back to top
BoBo³
Guest





PostPosted: Wed Jan 07, 2009 2:50 pm    Post subject: Reply with quote

Yeah, I've qualified from ² to ³ Wink
Back to top
ezuk



Joined: 04 Jun 2005
Posts: 146

PostPosted: Wed Jan 07, 2009 9:22 pm    Post subject: Reply with quote

tank wrote:
after watching the frustration from the poster for a couple days it occured to me you dont understand what a url is

the problem as i see it is that your attempting to build a rocket with a hi school biology education

But if your going to do something relativley advanced then you must not only understand AHK better but also the use of google Idea


First, thanks for your help.

Second, no thanks for the attitude. I went and looked for the stuff you posted on the Scripts forum so far. Your contribution to the community seems to consist of two libraries. Thanks for those, too.

I have been working with AHK for years now (I actually predate you on this forum by about two years), and had you gone and looked at the forum (forum search is a great idea, too) you would have seen my scripts (as in actual, complete applications) outnumber yours by quite a few.

Third, there is more than one way to specify a local URL, such as file:// etc.

Good day. Smile
Back to top
View user's profile Send private message
tank



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

PostPosted: Wed Jan 07, 2009 9:56 pm    Post subject: Reply with quote

ezuk wrote:
Third, there is more than one way to specify a local URL, such as file:// etc

which also works
It really doesnt matter how long you have blah blah blah
No im not trying to be an A$$ I know it seems that way but im not
but It is and was apparent by your question that you clearly did not understand what a URL is or if you did that you were pretending quite obnoxiously not to Wink
I have Never claimed to be an expert on anything except ignorance Very Happy
I am glad you looked thru the forum but again you cant limit your research to AHK you have to look further like MSDN and google and code guru etc. If your going to use a particular application (such as IE) it helps greatly to actually look into its archetecture as well. Try understand that applications abilities.
I wont get into a pissing match with you or any one else about who develops full applications and who has more of what. FYI facts are the work I do just simply cant be made public. Second every thing I do do is based on things I learned from ahklerner Sean Lexikos and a few others but I walked in the door with an extensive knowledge and experience of web application development. I can see your join date also and read all 32 of your posts as well I never called you an idiot I just expounded the simple minded nature of your confusion.
That said I am happy that even with my sarcasm which knows no end that i gave you the answer you were looking for
Feel free to ask anything else and ill answer but I wont promise to be cheerful
_________________

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
godsstigma



Joined: 04 Nov 2008
Posts: 222
Location: Memphis, TN

PostPosted: Wed Jan 07, 2009 11:50 pm    Post subject: Reply with quote

I love forums
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