Sign in to follow this  
Followers 0
AzKay

HTML GUI's

27 posts in this topic

#1 ·  Posted (edited)

#include <GUIConstants.au3>
#include <IE.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 562, 259, 193, 115, $WS_POPUP)
$Obj1 = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 562, 259)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$Obj1.navigate("about:blank")
$Obj1.document.write("<style>body{color:ffffff;scrollbar-base-color:#000000;scrollbar-arrow-color:#FFFFFF;scrollbar-3dlight-color:#777777;scrollbar-darkshadow-color:#8E8E8E;scrollbar-face-color:#000000;scrollbar-highlight-color:#000000;scrollbar-shadow-color:#5B5B5B;scrollbar-track-color:#000000;} .bye{position:absolute;top:1;left:510;cursor:hand} .hay{position:absolute;top:100;left:100;cursor:hand} .hay2{position:absolute;top:200;left:100;cursor:hand} .inputbox{position:absolute;top:250;left:100;}</style>")
$Obj1.document.write("<script>function msg($omsg,$odata){if($odata===undefined){$odata=''};document.getElementById('msg').value=$omsg+'[//]'+$odata }</script>")
$Obj1.document.write("<body bgcolor=000000>")
$Obj1.document.write("<input type='hidden' id='msg' />")
$Obj1.document.write("<label onclick='msg(""bye"")' class='bye'>[ X ]</label>")
$Obj1.document.write("<label onclick='msg(""hello"", ""Hello World :3"")' class='hay'><u>Click Me</u></label>")
$Obj1.document.write("<label onclick='msg(""input"", document.getElementById(""inputbox"").value)' class='hay2'><u><b>Click me to see input value</b></u></label>")
$Obj1.document.write("<input type='input' id='inputbox' class='inputbox' />")

While 1
    $oMsgID = _IEGetObjById($Obj1, "msg")
    $oMsg = _IEFormElementGetValue($oMsgID)
    $oMsg = StringSplit($oMsg, "[//]")
    Switch $oMsg[1]
        Case "bye"
            Exit
        Case "hello"
            _IEFormElementSetValue($oMsgID, "")
            MsgBox(0, "", $oMsg[5])
        Case "input"
            _IEFormElementSetValue($oMsgID, "")
            MsgBox(0, "", $oMsg[5])
    EndSwitch
WEnd

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Sorry but why would you want this to be a GUI?

Maybe he aspires to work for Microsoft. :) That's the kind of stuff they do in league with hardware companies. I mean, have a whole bunch of "cutting-edge GUIs" like this one and you'll be forced to upgrade your CPU and RAM...

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

I just mentioned it in the first post.

I was sick of using windows objects for the GUI, So I decided to make a HTML GUI, with autoits functionality.

Such things, I can use CSS with to customize it, Javascript, etc.

Its more of a proof of concept than anything.

And no, That example wasnt a GUI.

That was just showing how it can be done, Inputbox, autoit reading it when the buttons clicked, Etc.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Im asking for feedback, Not sarcasm. If you dont like it, Move on.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Eh, if you can't take feedback without getting blue in the face, don't ask for it. And if you want positive feedback only, then perhaps you should have clarified that...

Anyway, I can imagine a few cases where a technique like that could come in handy, however, a more elaborate example would be nice. Such as that customised scrollbar you mentioned, or something. Because as of right now, you have an embedded IE object and a polling loop. Whoop-de-do. What kind of constructive feedback do you expect?

Cuddles.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

I must somewhat agree that having some extra functionality with html might improve apperance, particularly when it comes to displaying tabular data, animations with gif or flash assets, the ease with which text can be combined with images and so on, but there is a downside to html, some stuff cannot be controlled such as the user hiting the backspace button on the home or initial page of your gui. that will produce an error. Navigation as a whole can produce unexpected results, but in any case I think that pursuing other solutions to presentational issues might probably outweigh potential risks.

So go for it

regards,

ivan

Share this post


Link to post
Share on other sites

I must somewhat agree that having some extra functionality with html might improve apperance, particularly when it comes to displaying tabular data, animations with gif or flash assets, the ease with which text can be combined with images and so on, but there is a downside to html, some stuff cannot be controlled such as the user hiting the backspace button on the home or initial page of your gui. that will produce an error. Navigation as a whole can produce unexpected results, but in any case I think that pursuing other solutions to presentational issues might probably outweigh potential risks.

So go for it

regards,

ivan

Real feedback, Thanks.

I edited out the code, Because they were pissing me off.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Thanks for asking permission to post it.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Looked into it, Made no sense to me.

Put up a better example.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Yeah, I still gotta work on it. And maybe make it into functions, Make things a little easier.

The reason I did this in the first place was, I wanted to make my GUI, a "clone" of the function of the program.

If that made any sense.

No, it didnt. Lulz.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

HTA is a HTML file which is displayed in a "dumbed" down version of IE.

Nice if I could move the window!

For the record, an HTA is not a dumbed-down version of IE. It is IE without many of the security restrictions placed on a normal browser -- e.g. you can interact with the OS and the filesystem from them for example.

Dale

Edit: typos

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Its not a bad way to go. In example scripts i've posted i use embedded IE all the time and think of it as another guiCtrl but with far more features, almost everyone has it on their pc.

Makes development much faster(and prettier).

Its good enough for Microsoft and many other big name software developers to incorporate IE for that reason alone.

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

hta example, i used this ages ago as part of a screen shot script which wrote the hta and took a screen shot of it. On click closes it. change the image accordingly.

chrome.hta:

<HTML style="margin:0;" >
<HEAD>
<TITLE>Your HTA Application</TITLE>
<HTA:APPLICATION ID="yourHTA"
APPLICATIONNAME="Your HTA Application"
BORDER="thin"
CAPTION="no"
CONTEXTMENU="yes"
ICON=""
INNERBORDER="no"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
NAVIGABLE="yes"
SCROLL="no"
SELECTION="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="no"
VERSION="1.0"
WINDOWSTATE="normal"
/>
<script>
window.resizeTo(464,534);
</script>
</HEAD>
<BODY onclick="self.close()">
<img style="margin:0;" src="dino.jpg">
<h2 align=center>Good Morning!</h2>
</BODY>
</HTML>
Edited by Will66

Share this post


Link to post
Share on other sites

This is interesting. I had an idea similer to this back a couple of weeks ago involving multible ie objects fit into one gui.

The idea was that there could be 3 ie objects. One for the title, one for the sidebar, and one for the center content.

I just never got arround to it lol

Glad to see someone did!!! :)


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0