Jump to content

Recommended Posts

Ok i have a problem generating script for the following function and require assistance from the community please.

Have the following line:

<img src = "http://192,168.2.2/image.cgi?img=err01.raw&type=1&scale=4&bits=4"

If I save this in an html file and run it it opens internet explorer and displays the gif image called err01

If i copy and paste this on the address bar of internet explorer it asks if i want to save the file.

Anyway my problem is i am trying to get this image file for use on my gui.

I have the following code:

$form1 = GuiCreate("Form 1", .....)

$pic1 = GuiCtrlCreatePic("",.........)



GuiCtrlSetImage($pic1, ******* )

And here is where i am not sure, do i have to call some sort of html or what to get the image at the address to be displayed as pic1?

I have tried $img = <src img........>

and then used $img where the asterisks are, i have tried with and without quotes, but am unsure exactly how to write the code to do this.

Any help greatly appreciated.

Thanks and have a great day


Link to post
Share on other sites

Ok maybe was not quite clear here so will post what i have done so far and what i am trying to accomplish.

First off i have this high speed camera system, in order to get an image from the camera you use the address from posted above.

If I just type that into the address bar of IE, Chrome, or Firefox it comes back with a message box asking if i want to open or save the file, either way i get the image and it is saves in the temp folder.

Now if i create an HTML document and put in the <src img = "http:"> listed above and i run this html document it does open the browser and then displays the image just fine. No message box asking to save or open image.

So what i would like to do is using autoit code open this image, assign it to a variable, and display it in a gui. Hell at this point i would be willing to download the image, without operator intervention and just open it that way. Not sure which would be the best way. But either way i need help with my code. So here is what i have so far. Not sure how to put it into the nice format that so many people post here.


Link to post
Share on other sites

your first example should work, you have to download the image if you use GuiCtrlSetImage

$img = GUICtrlCreatePic("", 3, 3, 300, 300) 
GUICtrlSetImage($img, @ScriptDir&" \temp.gif")

try downloading the image with inetget or _INetGetSource

inetget("",@ScriptDir&" \temp.gif",1)


Edited by jvds
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...