Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/03/2021 in all areas

  1. How does one simulate the scrolling/rolling with middle mouse button? I'm trying to make a script that scrolls down to a specific location without the help of page down.
    1 point
  2. @Chimp You're code does not work for me. So I did a mod. _Example() Func _Example() _SetBroswerEmulation() Local $o_Obj = __HTMLFILEObjCreate() $o_Obj.write('<script src="https://momentjs.com/downloads/moment.min.js"></script>') $o_Obj.write('<script>var JSglobal = (1,eval)("this");</script>') $o_Obj.write('<script>function Hello(arg){return "Hello " + arg;}</script>') Local $oJs=$o_Obj.parentwindow.JSglobal MsgBox(0, "",$oJs.eval("moment().format('MMMM Do YYYY, h:mm:ss a');")) MsgBox(0, "",$oJs.Hello("Danyfirex")) EndFunc ;==>__Example_2 Func _SetBroswerEmulation() Local $sName=@AutoItExe Local $aSplit=StringSplit($sName,"\",1) $sName=$aSplit[$aSplit[0]] RegWrite("HKCU\Software\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION",$sName,"REG_DWORD",0x2AF9) EndFunc Func __HTMLFILEObjCreate() Local $Object = 0 If IsObj($Object) Then $Object = 0 $Object = ObjCreate("htmlfile") Return $Object EndFunc ;==>__HTMLFILEObjCreate Saludos
    1 point
  3. Gianni

    Nodejs & htmlfile object

    nice this "htmlfile" object, do you have any reference for some documentation? ..... moment.js library works ... __Example_2() Func __Example_2() Local $o_Obj = __HTMLFILEObjCreate() $o_Obj.Open("text/html") $o_Obj.write(__HtmlFile2()) $o_Obj.Close MsgBox(0, 0, 'give some time to load library') MsgBox(0, 0, $o_Obj.parentwindow.moment().format('MMMM Do YYYY, h:mm:ss a')) EndFunc ;==>__Example_2 Func __HTMLFILEObjCreate() Local $Object = 0 If IsObj($Object) Then $Object = 0 $Object = ObjCreate("htmlfile") Return $Object EndFunc ;==>__HTMLFILEObjCreate ; #FUNCTION# ============================================================================= ; Name...........: __HtmlFile ; ======================================================================================== Func __HtmlFile2() Local $moment_p = @ScriptDir & '\moment.min.js' Local $sHTML = '<!DOCTYPE HTML>' & @CRLF & _ '<html>' & @CRLF & _ ' <head>' & @CRLF & _ ' <meta http-equiv="x-ua-compatible" content="IE=9"/>' & @CRLF & _ ' <script src="https://momentjs.com/downloads/moment-with-locales.min.js"></script>' & @CRLF & _ ' </head>' & @CRLF & _ ' <body>' & @CRLF & _ ' <script>' & @CRLF & _ ' </script>' & @CRLF & _ ' </body>' & @CRLF & _ '</html>' & @CRLF Return $sHTML EndFunc ;==>__HtmlFile2 p.s. to count vowels pass as string instead of a number... $JsObj.CountVowels('6')
    1 point
×
×
  • Create New...