Jump to content

Autoit and HTA


shazdeh
 Share

Recommended Posts

  • 2 years later...

The OP hasn't been online in nearly 3 years, I don't think he/she is about to answer your question.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • 2 weeks later...

squadjot

i have created this with lots codes and ideas from searching on this forum, help file and webs. and i dont remember who's the owner of the ideas.

if someone found their code im using, im sorry i didnt comment your name because i already forgot.

hope this help can you and you can share any improvement or correct my mistake. Thank You

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=images\favicon.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>

HotKeySet("{ESC}", "On_Exit")
$oIE = ObjCreate("Shell.Explorer.2")

Global $hGUI = GUICreate("Virtual Panel", 1024, 700, -1, -1, $WS_POPUP)
Global $HPanel = GUICtrlCreateObj($oIE, 0, 0, 1024, 700)
GUICtrlSetResizing($HPanel, $GUI_DOCKAUTO)
GUISetState()

$oIE.Navigate('about:blank')
$oIE.document.body.style.border = '0px'
$oIE.document.body.style.overflow = 'hidden'

$oWin = $oIE.document.parentWindow
$oHtml = $oIE.document.getElementsByTagName('html').item(0)
Global $oHead
While Not IsObj($oHead)
    $oHead = $oIE.document.getElementsByTagName('head').item(0)
WEnd
$oBody = $oIE.document.getElementsByTagName('body').item(0)


$objScript = $oIE.document.createElement('script')
$objScript.type = 'text/javascript'
$objScript.defer = 'defer'
$objScript.text = FileRead(@ScriptDir & '\jquery.js')
$oHead.appendChild($objScript)

While Not (IsObj($oWin.jQuery))
    Sleep(100)
WEnd

$oWin.jQuery.noConflict()
Global $jq = $oWin.jQuery


$jq(StringReplace(FileRead('style.txt'), "{ScriptDir}", StringReplace(@ScriptDir, "\", "/"))).appendTo('head')
$jq(StringReplace(FileRead('body.txt'), "{ScriptDir}", StringReplace(@ScriptDir, "\", "/"))).appendTo('body')
;~ $jq('body').disableSelection()
;~ ConsoleWrite($jq('html').html() & @CRLF)

$oEvtButton1 = ObjEvent(_IEGetObjById($oIE, "button_minimize"), "evtButton_")
$oEvtButton1 = ObjEvent(_IEGetObjById($oIE, "button_close"), "evtButton_")



Func evtButton_onclick()
    Local $o_object = @COM_EventObj
    ConsoleWrite($o_object.value& @CRLF)
    Switch $o_object.value
        Case "close"
            Exit
        Case "minimize"
            GUISetState(@SW_MINIMIZE)
    EndSwitch
EndFunc

Func evtButton_($EventName)
; This is an optional event function to catch non-defined events.
; The parameter contains the name of the event being called.
    ConsoleWrite("Uncatched event: " & $EventName & @CRLF)
EndFunc


While 1
    Sleep(1000)
WEnd


Func On_Exit()
    Exit
EndFunc

Func _IEPageLoadWait($objAppIE)
    Do
        Sleep(100)
    Until ($objAppIE.readyState = 'complete' Or $objAppIE.readyState = 4)
    Do
        Sleep(100)
    Until ($objAppIE.document.readyState = 'complete' Or $objAppIE.document.readyState = 4)
EndFunc   ;==>_IEPageLoadWait

for the "jquery.js", just download it from their official web for the latest and rename the file or just download from the attached file.

EDIT:

i forgot to include the other files so i zipped all files. please download html.zip

jquery.rar

Edited by biase
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...