Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/05/2018 in all areas

  1. markyrocks, As you obviously have no intention of opening up about this app there seems little point in this thread remaining open - so it is closed. You are now firmly on our radar as "uncooperative", so expect similar treatment if you are equally evasive in the future. aa2zz6, caramen, As explained in the Forum rules and in this announcement the Mods take a dim view of people helping while we are trying to determine if a thread is legal - which should be patently obvious in this thread where 2 Mods are involved. You are each suspended for a week "pour encourager les autres". M23
    2 points
  2. Trying to win the smart-ass of the day award? What about instead being way more specific in what it is you are doing or else please don't bother us with vague questions? Jos
    2 points
  3. Take a look here, https://www.autoitscript.com/autoit3/docs/libfunctions/_GDIPlus_BitmapCreateHBITMAPFromBitmap.htm. I think this was how I fixed it when I was using screen capture... That GDI plus is pretty neat, lot of different tools in there to manipulate images while they're in temp memory. Edit...nm. maybe try saving the file as a .bmp. an hbitmap is a handle to a bitmap and there might be some issue with the conversion.
    1 point
  4. Are you compliant with the version number? It specifically states "screencapture" being a problem in 3.3.14.3/4
    1 point
  5. 1 point
  6. Download: IEEmbeddedVersioning.zip and run: IE_EmbeddedHTML5Example.au3 When you end checking this example..... then try to use: _IE_EmbeddedSetBrowserEmulation() in your own script like this was used in IE_EmbeddedHTML5Example.au3 #include "IE_EmbeddedVersioning.au3" #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> Example() Global $g_iWidth = @DesktopWidth, $g_iHeight = @DesktopHeight Func Example() Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward Local $GUI_Button_Home, $GUI_Button_Stop, $msg _IE_EmbeddedSetBrowserEmulation() ; HKLM Branch: ;_IE_EmbeddedSetBrowserEmulation(-1, True, True) If @error Then ; -1 error means trying to access HKLM, so script needs elevation to access the Registry If @error = -1 Then If MsgBox(32 + 3, "Elevation Required", "Elevate script to enable setting Browser Emulation Mode?") = 6 Then Return _ReRunIfNotElevated() Return 1 EndIf Return MsgBox(0, "Error", "Couldn't set Browser Emulation mode") EndIf ; $oIE = ObjCreate("Shell.Explorer.2") $oIE = _IECreateEmbedded() ; Create a simple GUI for our output Local $hGUI = GUICreate("Embedded Web control Test", 1240, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() ;Show GUI _IENavigate($oIE, "https://www.google.com") While 1 if (GUIGetMsg() == $GUI_EVENT_CLOSE) Then ExitLoop WEnd GUIDelete() EndFunc ;==>Example #Region UTIL_FUNCS ; ====================================================================================================== ; Func _ReRunIfNotElevated() ; ; Does what it says. (rumored to occasionally say what it does) ; ; Author: Ascend4nt ; ====================================================================================================== Func _ReRunIfNotElevated() If IsAdmin() Then Return 0 Else If @Compiled Then ; If compiled to A3X, we need to execute it as if not compiled. Local $sCmd = (@AutoItExe = @ScriptFullPath) ? "" : ("/AutoIt3ExecuteScript " & @ScriptFullPath) Return ShellExecute(@AutoItExe, $sCmd, @ScriptDir, "runas") Else Return ShellExecute(@AutoItExe,@ScriptFullPath,@ScriptDir,"runas") EndIf EndIf EndFunc #EndRegion UTIL_FUNCS
    1 point
  7. Hi @nowayn, and welcome to the AutoIt Forum What @error is returned from the function? #include <ScreenCapture.au3> _ScreenCapture_Capture(@ScriptDir & '\1.jpg') If @error Then ; Error Checking ConsoleWrite("Error taking the Screenshot. Error: " & @error & @CRLF) EndIf
    1 point
  8. It is both possible and trivial, see here. Just a quick fix, mind you, inline assembly would take a bit longer.
    1 point
  9. Yes if you use regex you need to escape it. If you just use stringreplace() you do not, and for this particular task the normal string replace is adequate as your not really demanding anything that needs regex.
    1 point
  10. Hi. you need to "escape" the "\" in your (one char) replace string: Local $stringReplace="//something/something" Local $stringReplace2=StringRegExpReplace($stringReplace, '/', '\\') ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $stringReplace2 = ' & $stringReplace2 & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console regards, rudi.
    1 point
  11. Moved to the appropriate forum. Moderation Team
    1 point
  12. IIRC parameter 0 is the query language used (been a loong time since vbscript). If you don't leave as default (0), your only other option is "WQL".
    1 point
  13. If i get what i think you mean, then no. Well the IE object should have almost the same functions as ScriptControl. I'll try to look into your idea and post an example with an edit if I'm successful. Edit: So I've looked into it, and it's more annoying that rewarding, but it's possible. I tried the vis library they use on your example site, and google charts, but both does not play well with the outdated functionality. you could try looking into js librarys that works with IE8, or make a basic one yourself I'll look into some better code tomorrow when i wake up, right now i only got div's with css styling Edit2: So I've made a static example with CSS from the vis timeline example you provided. The elements are generated and set with AutoIt, but it might be better with pre-defined JS functions Opt("GuiOnEventMode", 1) $oIE = ObjCreate("Shell.Explorer.2") $hGui = GUICreate("Title", 700, 320) GUISetOnEvent(-3, "_MyExit", $hGui) GUISetState() $hIE = GUICtrlCreateObj($oIE, 10, 10, 680, 300) $oIE.navigate('about:blank') $oIE.document.Write('<!DOCTYPE HTML><html><head></head><body></body></html>') $oStyle = $oIE.document.createElement("style") $oStyle.setAttribute('type', 'text/css') $oStyle.styleSheet.cssText = ".timeline{border:1px solid #e5e5e5;height:183px;overflow:hidden;position:relative;}.timelinegrid-vertical{color:#4d4d4d;border-left:1px solid #e5e5e5;width:54px;height:183px;position:absolute;text-align:center;}.timelinegrid-horisontal{border-top:1px solid #e5e5e5;width:100%;height:39px;position:absolute;}.timegrid-item{position:absolute;height:34px;border:1px solid #97b0f8;background-color:#d5ddf6;box-sizing:border-box;}" Execute('$oIE.document.getElementsByTagName("head")(0).appendChild($oStyle)') $oDiv = $oIE.document.createElement("div") $oDiv.className = "timeline" $oIE.document.body.appendChild($oDiv) For $i=1 To Floor($oDiv.offsetWidth/53) $oDiv2 = $oIE.document.createElement("div") $oDiv2.className = "timelinegrid-vertical" $oDiv2.style.left=($i)*55&"px" $oDiv2.innerHTML = StringFormat("%02i", $i)&":00" $oDiv.appendChild($oDiv2) Next For $i=1 To Floor($oDiv.offsetHeight/39) $oDiv2 = $oIE.document.createElement("div") $oDiv2.className = "timelinegrid-horisontal" $oDiv2.style.top=($i*39)&"px" $oDiv2.innerHTML = "Truck "&$i $oDiv.appendChild($oDiv2) Next $oDiv2 = $oIE.document.createElement("div") $oDiv2.style.position="absolute" $oDiv2.style.top="39px" $oDiv2.style.left="55px" $oDiv2.style.width=$oDiv.offsetWidth-55&"px" $oDiv2.style.height=$oDiv.offsetHeight-39&"px" $oDiv.appendChild($oDiv2) $oDiv3 = $oIE.document.createElement("div") $oDiv3.className = "timegrid-item" $oDiv3.style.left = "2px" $oDiv3.style.top = "2px" $oDiv3.style.width = 55*3-5&"px" $oDiv3.innerHTML = "Order 1" $oDiv2.appendChild($oDiv3) $oDiv4 = $oIE.document.createElement("div") $oDiv4.className = "timegrid-item" $oDiv4.style.left = 2+(55*7)&"px" $oDiv4.style.top = "2px" $oDiv4.style.width = 55*4-5&"px" $oDiv4.innerHTML = "Order 2" $oDiv2.appendChild($oDiv4) $oDiv4 = $oIE.document.createElement("div") $oDiv4.className = "timegrid-item" $oDiv4.style.left = "2px" $oDiv4.style.top = 2+39&"px" $oDiv4.style.width = 55*5-5&"px" $oDiv4.innerHTML = "Order 251" $oDiv2.appendChild($oDiv4) $oDiv4 = $oIE.document.createElement("div") $oDiv4.className = "timegrid-item" $oDiv4.style.left = 2+(55*5)&"px" $oDiv4.style.top = 2+39&"px" $oDiv4.style.width = 55*4-5&"px" $oDiv4.innerHTML = "Order 252" $oDiv2.appendChild($oDiv4) $oDiv4 = $oIE.document.createElement("div") $oDiv4.className = "timegrid-item" $oDiv4.style.left = 2+(55*9)&"px" $oDiv4.style.top = 2+39&"px" $oDiv4.style.width = 55*3-5&"px" $oDiv4.innerHTML = "Order 253" $oDiv2.appendChild($oDiv4) $oDiv4 = $oIE.document.createElement("div") $oDiv4.className = "timegrid-item" $oDiv4.style.left = 2+(55*0)&"px" $oDiv4.style.top = 2+39*2&"px" $oDiv4.style.width = 55*4-5&"px" $oDiv4.innerHTML = "Order 501" $oDiv2.appendChild($oDiv4) $oDiv4 = $oIE.document.createElement("div") $oDiv4.className = "timegrid-item" $oDiv4.style.left = 2+(55*4)&"px" $oDiv4.style.top = 2+39*2&"px" $oDiv4.style.width = 55*4-5&"px" $oDiv4.innerHTML = "Order 502" $oDiv2.appendChild($oDiv4) While 1 Sleep(10) WEnd Func _MyExit() Exit EndFunc
    1 point
  14. Updated to ver 2.0.1 Fixed: formatting of submitted code Fixed: clicking twice on same view made it disappear Fixed: a few layout issues Fixed: naming of variables Updated: all functions Added: function syntax population To-Do: Update examples Requirements: IE.au3 version T2.0-3 or later, and latest beta of course IE-Builder v2.0 previous dowloads 900 +/- Credits to Dale Hohm for the Internet Explorer UDF Library **** This is The Public Release of IE-Builder, a helpful tool in creating IE objects The new look!!! Builder, Internet, Source, Syntax, and Examples ... All at your finger-tips Enjoy!!! Valuater 8) UpDated 6-15-2006 ver 2.0.0 by big_daddy ************* UpDated 2-18-2006 ver 1.0.3 added - Check all locations for Beta ************* UpDated 1-12-2006. ver 1.0.2 added - list All Html Elements added - list Image view added - list Anchor Tags view added - list Form Elements view added - Objects Error handling ( ie... when user presses forward, and there was no previous page ) and more ************* UpDated 1-7-2006 Alpha Release added - minimize button added - ini file and favorites button added - search stop/continue through source added - error checking and more
    1 point
×
×
  • Create New...