On Wed, Mar 25, 2009 at 11:47 AM, Austin English austinenglish@gmail.com wrote:
Here's a quick thrown together script to test firefox3.
From the looks of things, we could do just about everything in
autohotkey with enough elbow grease. It would only take a small wrapper script to run it under wine, or, if someone wanted to later extend it, to windows.
Script is attached. Below is commented more.
------------------- #!/bin/sh # sha1sum is available for windows too, neat! #wine `pwd`/wget.exe ftp://ftp.gnupg.org/gcrypt/binary/sha1sum.exe # 4a578ecd09a2d0c8431bdd8cf3d5c5f3ddcddfc9
wget http://users.ugent.be/~bpuype/cgi-bin/fetch.pl?dl=wget/wget.exe # 801a6938e0289d14078487d10152f8ce39af125c
---------All we really need sh for is the initial wget. That's easy enough to workaround, or could add an ftp.exe to wine and eliminate that completely.
From there, wine can use wget to get the other files:
wine `pwd`/wget.exe http://www.autohotkey.com/download/AutoHotkey104800.zip # 593423c075c0e1f58224bd9b8929b14013e09c1a wine `pwd`/wget.exe "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.7/win32/en-..." # 6452f56cb9808b41c402ea55324eea86b50b3b96
--------This isn't ahk/wine, but we could use ahk's silent installer or put the exe itself somewhere, as it has no dependencies unzip -d ahk AutoHotkey104800.zip
--------Again, not ahk/wine. We could have .ahk files stored on a sever and just wget it instead. cat > ahk/firefox.ahk <<_EOF_
Run, "C:\users\$USER\My Documents\Firefox Setup 3.0.7.exe" WinWait, Mozilla Firefox Setup, Welcome to the Mozilla Firefox Setup Wizard, 100, , Send, {ENTER} WinWait, Mozilla Firefox Setup, Choose the type of setup you prefer, 100, , Send, {ENTER} WinWait, Mozilla Firefox Setup, Click Install to continue, 100, , Send, {ENTER} WinWait, Mozilla Firefox Setup, Completing the Mozilla Firefox Setup Wizard, 100, , Send, {SPACE}{ENTER} exit _EOF_
cd ahk wine autohotkey.exe firefox.ahk
---------Here would be sha1sum running to verify firefox.exe's sha1sum for instance, or perhaps a couple other files. cd ..
rm -rf .wine ahk rm wget.exe rm AutoHotkey104800.zip rm "Firefox Setup 3.0.7.exe"
exit -----------------------------------------
It's a quick demo, but it gives an idea of what we can do with ahk. With a proper implementation design, we can setup a tester than can run on Windows or Wine, is easily extensible, and can rapidly test real world applications.