Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/31/2016 in all areas

  1. (This example uses a "flash" animation and therefore needs the "flash player" to work. Since "flash player" is discontinued and no longer present on many systems, this script may not work. I have therefore prepared a new script which does not use flash, but is based only on javascript. You can find it in this new post: www.autoitscript.com/forum/topic/206853-aquarium) If you set within a window, a given color as transparent, every area of that window painted with that color, act as an hole through wich you can see what's behind, and click on what's behind as well. What's funny is that if you embed a browser control within that window, the "transparent" color works even within the browser! This allow some interesting effects by simply opening any of the many javascript animations, or css effects or whatever within a browser control embedded into a GUI: Here, for example, is a simple effect of fishes swimming around on the screen. For lazyness I have embedded an ready made swf flash by a link to the web, but is of course possible embed any web page with javascripts css or whatever..... Have fun #include <WinAPI.au3> #include <WindowsConstants.au3> #include <Misc.au3> ; for _IsPressed (23 END key) Local $hDLL = DllOpen("user32.dll"), $oIE = ObjCreate("Shell.Explorer.2") Local $hBackground = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUPWINDOW, $WS_EX_LAYERED + $WS_EX_TOPMOST) Local $AlphaKey = 0xF0F7FF ; everything with color $AlphaKey within this window will be transparent ; even if within an embedded browser control!..... _WinAPI_SetLayeredWindowAttributes($hBackground, $AlphaKey, 0, $LWA_COLORKEY) GUISetState(@SW_SHOW, $hBackground) $hIE = GUICtrlCreateObj($oIE, 0, 0, @DesktopWidth, @DesktopHeight) ; <- embedd $oIE in the AutoIt GUI GUISetBkColor($AlphaKey, $hBackground) ; $AlphaKey $hBackground transparent $oIE.navigate('http://cdn.abowman.com/widgets/fish/fish.swf') ; $oIE.navigate('http://cdn.abowman.com/widgets/spider/spider.swf') ; a spider goes around on the screen .... ; !! to use the spider.swf, you need to set $AlphaKey = 0xffffff on line 7 "! While True If _IsPressed("23", $hDLL) Then ExitLoop ; END key was pressed Sleep(250) WEnd $oIE = "" $hDLL = "" GUIDelete($hBackground)
    1 point
  2. wakillon

    SDL2 Firework

    A little try with SDL 2 Library, SDL 2 GFX and Sid music. As usual, no externals files needed. Press "Esc" for quit. SDL2_Fireworks.au3 Happy New Year 2017
    1 point
  3. was the joke not painfully obvious? who names their number $String?
    1 point
  4. Oh crap, i figured it out, first key in registry is *, so of course there it isn't a dot. i need to go to sleep.
    1 point
  5. It is possible to put multiple types in clipboard. If you want to see an example of multiple types, run the example from _ClipBoard_EnumFormats and copy something from somewhere like Firefox. Here is a small example #include <Clipboard.au3> _ClipBoard_Open(0) _ClipBoard_Empty() $iFormat = _ClipBoard_RegisterFormat("Rich Text Format") $sRTF = FileRead("Document.rtf") $t=DllStructCreate("WCHAR["&StringLen($sRTF)&"]") $hT = DllStructGetPtr($t) DllStructSetData($t, 1, $sRTF) _ClipBoard_SetDataEx($hT, $iFormat) $sUnicode = "Document.rtf" $t2 = DllStructCreate("WCHAR["&StringLen($sUnicode)&"]") $hT2 = DllStructGetPtr($t2) DllStructSetData($t2, 1, $sUnicode) _ClipBoard_SetDataEx($hT2, $CF_UNICODETEXT) _ClipBoard_Close()
    1 point
  6. Subz

    Maximize CompMgmt.msc

    CompMgmt.msc is configured to open in a Normal Window, what I had to do was copy C:\Windows\System32\CompMgmt.msc to @ScriptDir then: Open: @ScriptDir@\CompMgmt.msc with NotePad Modify Line 5 <WindowPlacement ShowCommand="SW_SHOWNORMAL"> to <WindowPlacement ShowCommand="SW_SHOWMAXIMIZED"> Save the file then use the following to execute: nb: On Windows 10 Enterprise I require the verb "RunAs" to start mmc ShellExecute(@ScriptDir & '\CompMgmt.msc', '', 'RunAs') You could also use FileInstall, XML Parser or FileWrite to create the CompMgmt.msc file, if you're using this on multiple systems Hope that helps.
    1 point
  7. Here: should be used quotation marks. Here is small modification: #include <Clipboard.au3> _Example() Func _Example() Local $sRTF_FileFullPath = @ScriptDir & '\outfile.rtf' Local $hFile = FileOpen($sRTF_FileFullPath) Local $sRTF_Content = FileRead($hFile) FileClose($hFile) ;~ FileDelete($sRTF_FileFullPath) Local $iClipboardFormat = _ClipBoard_RegisterFormat("Rich Text Format") Local $hMemory = _ClipBoard_SetData($sRTF_Content, $iClipboardFormat) EndFunc
    1 point
×
×
  • Create New...