Jump to content

Herb191

Active Members
  • Posts

    215
  • Joined

  • Last visited

Community Answers

  1. Herb191's post in webcam capture scripts . was marked as the answer   
    Here are a few posts to get you started:
    >Post 1
    >Post 2
    >Post 3
    FYI:
    I found them by searching for "Webcam UDF"
  2. Herb191's post in Au3Recorder adding bad text/code when it runs was marked as the answer   
    I searched the forum for a solution but did not think to search the AutoIt issue tracker. This bug has been found and fixed. Here is the link to the solution.
  3. Herb191's post in FileRead question was marked as the answer   
    One way...
    $sFilePath = @ScriptDir & "\test.txt" $iLineCount = 19 $hFileOpen = FileOpen($sFilePath) $sFileRead = "" While 1 $iLineCount = $iLineCount + 1 $sLine = FileReadLine($hFileOpen, $iLineCount) If @error Then ExitLoop $sFileRead &= $sLine & @CRLF WEnd FileClose($hFileOpen) MsgBox(0, "", $sFileRead)
  4. Herb191's post in StringRegExpReplace all with 0 except FFFFFF was marked as the answer   
    Thanks everyone for the help. I ended up using the code bellow. Its faster and works better. I got the code from this post:
    #include <GDIPlus.au3> #include <ScreenCapture.au3> Opt('MustDeclareVars', 1) _Main() ShellExecute(@ScriptDir & "\black and white.bmp") Func _Main() Local $hBitmap, $hClone, $hImage, $iX, $iY ; Initialize GDI+ library _GDIPlus_StartUp () ; Capture 32 bit bitmap $hBitmap = _ScreenCapture_Capture ("") $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap) ; Create 24 bit bitmap clone $iX = _GDIPlus_ImageGetWidth ($hImage) $iY = _GDIPlus_ImageGetHeight ($hImage) $hClone = _GDIPlus_BitmapCloneArea ($hImage, 0, 0, $iX, $iY, $GDIP_PXF01INDEXED) ; Save bitmap to file _GDIPlus_ImageSaveToFile ($hClone, @ScriptDir & "\black and white.bmp") ; Clean up resources _GDIPlus_ImageDispose ($hClone) _GDIPlus_ImageDispose ($hImage) _WinAPI_DeleteObject ($hBitmap) ; Shut down GDI+ library _GDIPlus_ShutDown () EndFunc ;==>_Main
  5. Herb191's post in How to $oElement.fireEvent("onmouseover") on tool tip elements in IE was marked as the answer   
    Thank you. Like Danp2 I could not find this.
    Thank you just what I needed.
  6. Herb191's post in Help with IE code and array was marked as the answer   
    Well, there are a lot of ways to do this but here is two ways:
    #include <IE.au3> #include <Array.au3> #include <String.au3> $oIE = _IECreate("https://www.harryhomers.org/et/forum/viewtopic.php?f=89&t=4309") $sHTML = _IEBodyReadHTML($oIE) Dim $ListArray[1] For $i = 1 To 20 $aNames = _StringBetween($sHTML, ">" & $i & ". ", "<") If IsArray($aNames) Then _ArrayAdd($ListArray, $aNames[0]) Next _ArrayDisplay($ListArray) _IEQuit($oIE) ;or you can do this $dHTML = InetRead(("https://www.harryhomers.org/et/forum/viewtopic.php?f=89&t=4309")) $sHTML = BinaryToString($dHTML) Dim $ListArray[1] For $i = 1 To 20 $aNames = _StringBetween($sHTML, ">" & $i & ". ", "<") If IsArray($aNames) Then _ArrayAdd($ListArray, $aNames[0]) Next _ArrayDisplay($ListArray)
  7. Herb191's post in _WinAPI_SetParent Makes White Box on GUI was marked as the answer   
    That example didn’t display right ether when I removed the –k switch. I removed the switch because I needed to be able to run IE with Ad Block Plus. Anyway, after some more digging around it looks like the address bar is what was causing the issue. The following code fixed the problem.
    If _IEPropertyGet($oIE, "addressbar") Then _IEPropertySet($oIE, "addressbar", False)
×
×
  • Create New...