Sign in to follow this  
Followers 0
Keniger

Image generated in PHP without download link to gui.

5 posts in this topic

<img src="//api.solvemedia.com/papi/media?c=2@e4-RMw8-5G4uTaGxj-v1x.eXkMoLXp5T@V.dVd9F2oKsENU8bgrS8pn9APTC4lJjoNzJ2lsh4OdqFN-atpDU5icGdngaQCXKM94tMd8nn8qai6c-teJQSDR3i5WVlhytLKdBiO-.5GWImKkaVRGsFsbhmp6-fBDqzh3g.FEY2DTwWnWoNmcTGl1XfrUz9A.jxMWqlLGC8-5Non.evzQ43zhktJUge1-h2Xw9PycrYuzNq-RFIb2W3U7URCwPDGPMO9aJPOtqgWd8lksBQRCNGrKkhUHo1n74Yi04iY7KZeqv6sUWhfGSk6ykTWXPnChCWJkhFXIK0uoA;w=300;h=150;fg=000000;bg=f8f8f8" alt="Solve Media Puzzle Challenge" height="150" width="300" id="adcopy-puzzle-image-image">

I have this code... And There is a link... But if I go to this link I get error is there any way to save image in IE without link ?

Share this post


Link to post
Share on other sites



This appears to be CAPTCHA related, so you aren't likely to get help on this since it is against the forum rules.

Share this post


Link to post
Share on other sites

Keniger,

Any comments? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

It was just example, I found how to do it:

#include <IE.au3>
#include <ClipBoard.au3>
#include <GDIPlus.au3>
#include <Array.au3>
 
 #include <File.au3>
 
Global $sDir = @DesktopDir & "test"
If DirGetSize($sDir) = -1 Then
   DirCreate($sDir)
EndIf
 
 
$oIE = _IECreate("LINK")
 
$oImgs = $oIE.document.getElementsByTagName('img')
$i = 0
_GDIPlus_Startup()
 
For $oImg In $oImgs
 
   $sFilename = $sDir & "img" & $i & ".bmp"
 
   $oControlRange = $oIE.document.body.createControlRange()
   $oControlRange.add($oImg)
   $oControlRange.select()
   $oControlRange.execCommand('Copy')
   Sleep(500)
   FileDelete($sFilename)
   _ClipBoard_Open(0)
   $vClipBoardData = _ClipBoard_GetDataEx($CF_BITMAP)
   $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($vClipBoardData)
   _ClipBoard_Close()
   _GDIPlus_ImageSaveToFile($hBitmap, $sFilename)
   $i += 1
Next


And my picture is a first object sometimes and sometimes second etc... 
Is there any way to get object name ?
Or download / get just this object what Im interested, it also have ID and name
Edited by Keniger

Share this post


Link to post
Share on other sites

One of your questions is how to display an image from the net without savin it first to disk. If you know the link to the image you can load it directly to your GUI:

;coded by UEZ 2011
#include <GUIConstantsEx.au3>
#include <GDIPlus.au3>

_GDIPlus_Startup()
Global Const $STM_SETIMAGE = 0x0172
Global Const $hBmp = _GDIPlus_BitmapCreateFromMemory(InetRead("http://aut1.autoit-cdn.com/forum/public/style_images/master/logo_autoit.png"), True) ;to load an image from the net
Global Const $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp)
Global Const $iWidth = _GDIPlus_ImageGetWidth($hBitmap)
Global Const $iHeight = _GDIPlus_ImageGetHeight($hBitmap)
Global Const $hGUI = GUICreate("Display PNG Image in picture control", $iWidth, $iHeight)
Global Const $idPic = GUICtrlCreatePic("", 0, 0, $iWidth, $iHeight)
_WinAPI_DeleteObject(GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp))
GUISetState()

While True
    Switch GUIGetMsg()
        Case $idPic
            MsgBox(0, "Information", "PNG image was clicked")
        Case $GUI_EVENT_CLOSE
            _WinAPI_DeleteObject($hBmp)
            _GDIPlus_BitmapDispose($hBitmap)
            _GDIPlus_Shutdown()
            GUIDelete($hGUI)
            Exit
    EndSwitch
WEnd

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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