Realm Posted August 9, 2010 Share Posted August 9, 2010 (edited) I have created a GUI with an embedded Webbrowser to automate some tasks, and it does a Daily Maintenance everyday, this Maintenance takes 3-5 minutes to complete, so I decided to throw up my html code to inform it was running maintenance rather than looking broken on the same page. I want to add an image to the page/html code, however I want it to use an image from the script file rather than from a website. Hopefully some1 can help me find an applicable solution to this minor dilemma. an example would be from @ScriptDir & "\Images\some_image.jpg" Some How replacing in the tag below $s_html &= "<a href='http://MyWebsite.com/some_image.jpg' name='Some_image' alt='Some Logo'></a>" & @CR Any Ideas? Edited August 9, 2010 by Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 9, 2010 Share Posted August 9, 2010 So what happens when you do what you just said you wanted to do? $s_html &= "<a href='" & @ScriptDir & "\Images\some_image.jpg" & " ' name='Some_image' alt='Some Logo'></a>" & @CR .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Realm Posted August 9, 2010 Author Share Posted August 9, 2010 The Image does not appear My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 10, 2010 Share Posted August 10, 2010 Wait, isn't href for links, why are you using that? This works for me: Local $test = '<BODY>' & @CRLF & _ '<IMG src="file://' & @ScriptDir & '\73.png"' & @CRLF & _ ' alt="Something something cookie.">' & @CRLF & _ '</BODY>' FileDelete(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".html") FileWrite(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".html", $test) ShellExecute(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".html") .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Realm Posted August 10, 2010 Author Share Posted August 10, 2010 Wait, isn't href for links, why are you using that? Because this is the first time I have ever attempt to write html within AutoIt, and the first time I have ever tried combing both forms of code. It was a starting point to show what I am trying to accomplish. This is what I have now $s_html &= '<IMG src="file://' & @ScriptDir & '\some_image.jpg"' & @CRLF & ' alt="Something something cookie.">' & @CR And it is working beautifully! Thanks for pointing me to the solution My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now