Leaderboard
Popular Content
Showing content with the highest reputation on 05/02/2013 in all areas
-
SQLite ListView and BLOB demo [Closed]
mesale0077 reacted to GreenCan for a topic
Topic Closed, please go here SQLite demonstration of native recognition of BLOB object in Listview Following an idea that was raised in a discussion with water and jchd, I have been working during the past week on a ListView SQLite demo that integrates BLOB (Binary large Object) fields. Download link at the bottom of this post This is what I have until now, version sero sero sero … one – to use the words of a well know Spanish biker . It is a fully workable example and I would be happy if you could test it and give me your comments. Pre-requisites: 1. You have to download the SQLite Database here: http://users.telenet.be/GreenCan/AutoIt/GreenCan_SQLite_Database_demo.zip 2. You have to download trancexx’ great GIFAnimation udf here: GIFAnimation or http://code.google.com/p/gif-animation/downloads/list For your comfort, I included the latest version in the above zip file. I decided to use GIFAnimation.au3 for the Image display because it works with several kinds of graphic types (except multipage tiff) including animated GIFs J . GIFAnimation? What’s in a name… 3. SQLite3.dll (also included in the zip package) In this first version, you will see two different icons in the Listview (as opposed to the screenshot where you see all images as icons) 1. Eye Icon: this is an image object, clicking once will open a preview box 2. Database with lightning arrow: any kind of other (non-image) object A BLOB field doesn’t need to be an image, it can store literally everything you can imagine, the database contains several objects that you can try-out. I didn’t include an exe file, but why not? It is possible. Up to you to find out if it is useful. These non-graph objects are not preview-able and will be executed. By the way, all these BLOB examples are inoffensive, for example the autoit code just displays an ‘Hello World’ MsgBox. If you don’t trust it, just comment out the ShellExecute in line 219 and verify the content in the Temp folder… or pass your favorite virus scanner over these files You will notice that the first execute take a bit more time to start, afterwards, everything is blinking fast. Not sure why this slow behavior, maybe it’s only on my PC. Although the example looks good, I am not completely satisfied with the result. The BLOB object is not natively recognized and I think it should, but I don’t know how to do this. Any suggestion is welcome here… I can use a isBinary() to identify the field as a BLOB, but I still don’t know how to recognize the BLOB as an image, or an Excel sheet, or anything else. So this is the reason why I have the TypeOfObject column, that links the object to the physical file. Again, any suggestion is welcome here… Another issue is that I have to export the file to a physical file to be able to display (or use) it. I tried UEZ’s _GDIPlus_BMPFromMemory() function for the bitmaps but it is too slow (not even sure it can handle anything else than BMP. And slowness will increase with very large binary objects. I am wondering what the performance would be with a database containing several hundreds of objects to export. I will come with version 0.0.0.2 within a few days. I just let you test the current version first. Version 2 has, as you can see in the screenshot above, a visible icon representation of the image object. This is how it should be but there are significant disadvantages in the way that I programmed it. But I will explain that when I publish the new example script. SQLite GreenCan_demo BLOB in Listview 0.0.0.1.au3 (Please jump immediately to version 0.0.0.2 if you do not intend to test both examples) Edit: 06 May 2013 New version! Version 0.0.0.2 This enhanced version displays a visible thumbnail of each Database image object in the ListView. The example works with the database file that you have to download or already downloaded with the first version (see Prerequisite 1 higher in this post) SQLite GreenCan_demo BLOB in Listview 0.0.0.2.au3 Edit: 10 May 2013 With this script, you can import your own objects into the GreenCan_demo.db Database (you have to download the database again from the link in Pre-requisite 1, because I modified the structure, the key column is now autoincremental) The script will work for both demo's Import Object in SQLite Database.zip Anyhow, enjoy and please give me feedback. GreenCan1 point -
The file is 0 Kb until the download is finished InetGet("http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe", "D:\autoit-v3-setup.exe", 1) Msgbox(0,"", "finished")1 point
-
pick your poison: $aWindows = WinList("[CLASS:AcrobatSDIWindow]") For $i = 1 To UBound($aWindows)-1 If Not BitAND(WinGetState($aWindows[$i][1]), 16) Then WinSetState ($aWindows[$i][1], "", @SW_MINIMIZE) Next $iCounter = 1 $hwnd = WinGetHandle("[CLASS:AcrobatSDIWindow; INSTANCE:" & $iCounter & "]") While IsHWnd($hwnd) If Not BitAND(WinGetState($hwnd), 16) Then WinSetState ($hwnd, "", @SW_MINIMIZE) $iCounter+=1 $hwnd = WinGetHandle("[CLASS:AcrobatSDIWindow; INSTANCE:" & $iCounter & "]") WEnd1 point
-
Need some help in my script ( KodaFormDesign +SciteEditor)
seamonkeysproject reacted to Melba23 for a topic
seamonkeysproject, I strongly suggest that you read those rules carefully and follow them in future. Furthermore, sending me a PM asking for help with the very same script is really not a good idea. Threads merged and locked. M231 point -
winwait can not find the web popup window
temp00 reacted to MouseSpotter for a topic
@temp00: there is nothing wrong with AutoIt - no single threaded program will be able to catch the popup. If you look at the webpage's link ... it has <a onclick="force_logout();return false;" href="#"> The COM object sends the click to the link ... then waits for the click event to finish The click event lasts until force_logout returns. force_logout waits for the user to answer the message (OK,cancel) So AutoIt also waits. My solution would be to run a second script that waits for the message (maybe just before you do the click) - this clicks the message for you and exits. The click event completes, your above autoit script continues (no need for the WinWait)1 point -
Generate Music Algorithmically
czardas reacted to jaberwacky for a topic
We also live in a time where mainstream music is so youthful. The young want to pick up an instrument and immediately begin destroying. Someone comes along and tells them, "Hur hur hur, all yall need's three chords and a hook." And then their desire to have fame and fortune now now now is satisfied.1 point -
#include <IE.au3> $oIE=_IECreate("https://ahrefs.com/index.php") _IELoadWait($oIE) $oScriptCol = $oIE.document.GetElementsByTagName("Script") ConsoleWrite($oScriptCol.length & @CRLF) For $oScript In $oScriptCol If StringInStr($oScript.innertext, "a.src=document.location.protocol+") Then $adata = StringRegExp($oScript.innertext, "(?i)protocol\+\x22(.*js.*\);\s)", 3) ;~ $start = StringInStr($oScript.innertext, "a.src=document.location.protocol+") ;~ $end = StringInStr($oScript.innertext, "; ",default,Default,$start+1) ;~ ConsoleWrite($oScript.innertext & @CRLF & $end & @CRLF & StringMid($oScript.innertext,$start+StringLen("a.src=document.location.protocol+"),$end-10) & @CRLF) ConsoleWrite($adata[0] & @CRLF) EndIf Next1 point
-
vij, Putting that text into a file (so that you do not have to worry about the single/double quote mix getting it into a string) makes it very easy to extract what you want: $sText = FileRead("Text.txt") $aExtract = StringRegExp($sText, "(?i)protocol\+\x22(.*js)\?", 3) ConsoleWrite($aExtract[0] & @CRLF) M231 point
-
Check DOM property before access
phamdacloc reacted to DaleHohm for a topic
_IEErrorHandlerRegister() makes this easy. Or use the latest beta that makes COM errors non-fatal. Dale1 point -
Check DOM property before access
phamdacloc reacted to water for a topic
You could add a COM error handler and set @error if the property does not exist.1 point -
Quick update: Fixed a few bugs. Added "Notes" tab Added "AutoIt" tab. And thanks for the rate! (Whoever did it)1 point