
Zazza
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by Zazza
-
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Yes, you see it? That's the main problem. I'll attach the SWF without fading effect. Thank you very much... If you find anything... EDIT: yes, the problem obviously relies in the wrong rendering of the alpha channel in PNG images. I wonder if it's some kind of limitation. SWF.zip -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Hi... Try to run the script over (for example) a video or a non-white background. Is everything alright? No white parts surrounding the two objects like in this screenshot? -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Greetings, you'll find a zip file attached. It contains the sample SWF and the script. The SWF background is white. Try to run the script on your desktop and tell me what you see, please. Thank you. test.zip -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Hi monoscout,using _WinAPI_SetLayeredWindowAttributes() gives me strange rendering problem with shadows. I don't know if it's related to $WS_COMPOSITE style not working in Aero environment. -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Hi iamtheky, because the main video (Mandelbrot iterations) in your example (that we can consider as a background) can't be set semitrasparent: you'll never will see through it unless you set the entire window opacity with the WinSetTrans command. I think I have to live with that. The closest solution I found is: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $GUI = GUICreate("Page", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUP) $object = _IECreateEmbedded () $object_ctrl = GUICtrlCreateObj($object, 0, 0, @DesktopWidth, @DesktopHeight) _IENavigate($object, @ScriptDir & "\page.html") GUISetState() WinSetTrans("Page","",235) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd The file "page.html" is an HTML page with a solid blue background and a SWF animation with wmode set to transparent. WinSetTrans will slightly change the opacity of the window (obviously including the SWF) allowing to see thru the HTML page. -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Really thanks Martin... And no, you're not irritating me. On the contrary, you and the others, have dedicated much time to me. I'll try to sum up, since I realize my observations could be confusing. The DVB application (DVBViewer) needs to communicate thru the COM (Component Object Model) interface with Flash and vice versa. To do this, I'm trying to use AutoIt as a "bridge" between the two. So the sequence is: 1) Start the DVB application 2) Start AutoIt script that create a GUI with the SWF inside 3) Interact with the DVB application using the SWF The problem is that, by default, SWF backgrounds are opaque. So, inserting (ObjCreate) the SWF in an AutoIt GUI and run it would mean to cover the DVB application completely. Instead, I need to see thru the SWF animation. The only ways (I found) to have the SWF with a transparent background are: 1) inside a HTML page. But, then again, the HTML page background would be opaque and cover the DVB application. 2) using for the SWF a wrapper like Zinc. But then, the executable can't be interrogated with ObjCreate and COM interface. I'd be happy to be proved wrong about this. I know it's just an aesthetic problem but it's quite important to me. Hope this clarifies things more. -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
I'm afraid not, because in that case, I would have a white background in the SWF file since Flash can only render animations with transparent background when embedded in a HTML page.A wrapper (like Zinc) would convert the SWF in an executable with a transparent background but then AutoIt wouldn't communicate with the COM interface of the DVB application (that's the main point of the entire project). Since I'm really no expert, maybe there's some kind of "workaround"... -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Thanks iamtheky but this seems not what I'm looking for. Anyway, I think a picture is worth a thousand words so here's what I'm trying to accomplish: The video image is the DVB application running, the bluish background is a semi-transparent overlay, the white circle is the Flash swf file with transparent background. I was thinking about using two GUIs (one inside another) but, for what I've seen, the child one can't be set as fully opaque while the parent is semi-transparent. Is that so? Thanks again for your contribution... -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
Thanks Martin but with HTML, I think the problem is just the same: an HTML page has got a white background. I need this white to be transparent. Is there a way to have an HTML page or iframe totally transparent? -
Embedding Flash object with alpha blending
Zazza replied to Zazza's topic in AutoIt GUI Help and Support
I'm sorry to bother but... No one ever tried that? Thanks... Again. -
Greetings, I saw many requests like mine on this forum but I couldn't find a ultimate solution to the problem. Here's the scenario: I'm building a flash fullscreen GUI for a DVB program. AutoIT should embed the .swf file and display it with alpha blending background. In other words, I need to see the DVB application running under my GUI. The problem is that I always end up with an opaque background. Among others, someone suggested to use the WinSetTrans command but this will not work since it controls the alpha value of the entire window. I know that projectors like Zinc could make that but the final file would be an executable I couldn't embed anymore. I saw no solution on the net. I wonder if it's really possible? Thanks...
-
Thanks Psalty... To be honest I should edit my previous post since I finally understood where was the problem: I was calling the wrong index in my array. Thank you very much for your support.
-
Greetings, I'm trying to use this wrapper while passing one variable from ActionScript to AutoIt. In AutoIt if I "trace" the XML coming from ActionScript (ExternalInterface.Call), I can see: <invoke name ="switch" returntype="xml"><arguments><string>test</string></arguments></invoke>and this is RIGHT. But if I use _XMLGetValue() to get the string "test" I come up with an empty string: $param = _XMLGetValue("/invoke/arguments/string") _XMLGetValue should return an array but not in this case. What am I doing wrong? Thanks...
-
[SOLVED] Send an Array with callfunction to Flash...
Zazza replied to Zazza's topic in AutoIt General Help and Support
Ok, found by myself: $oRP.CallFunction('<invoke name="checkFavs" returntype="xml"><arguments><array><property id="0"><string>first</string></property><property id="1"><string>second</string></property></array></arguments></invoke>') In ActionScript: function checkFavs(message:Array) { trace(message[1]); // will type "second" } See ya. -
Greetings, AFAIK the Flash ExternalInterface API should support Boolean, String, Number, Array, Object types. Supposing I have this Array in AutoIt script: $Array = [1,2,3]and this callback function in Flash: ExternalInterface.addCallback("sendArray",null,sendArray) Function sendArray(message:Array) { ... }I know that with: $oFlash.CallFunction('<invoke name="sendArray"><arguments><string>some string</string></arguments></invoke>')I can send a single string to Flash. How can I send a single or multidimensional array to Flash? Which is the correct CallFunction syntax? Thank you very much for your time...
-
Thanks again Psalty for your contribution. By the way, now I'll try to integrate this new function you wrote in my script (as always that this as a noob script, ok? ). #include "ProcessListProperties.au3" #include <array.au3> Local $sum Local $num Local $total Local $avg Local $finished = 0 Local $readings[1] Local $PollFrequency = 5000 TrayTip("Batch Test","Started...",5,1) While $finished = 0 Sleep($PollFrequency) $avRET = _ProcessListProperties() for $n = 2 to $avRET[0][0] $sum = $sum + $avRET[$n][6] Next if $sum<100 then _ArrayAdd($readings,$sum) $num = $num +1 EndIf if $num = 10 Then for $a = 1 to Ubound($readings) - 1 $total = $total + $readings[$a] Next $avg = int($total / $a) If $avg < 4 Then $finished = 1 TrayTip("Batch Test","Computer in idle status.",10,1) Sleep(10000) Exit Else TrayTip("Batch Test","Waiting for idle status... (" & $avg & ")",10,2) EndIf $num=0 $total=0 local $readings[1] EndIf $sum = 0 Wend Basically this script "monitors" idle CPU usage, takes 10 readings (discarding erroneous ones) and makes an average of the resulting array. If, through time, this average is below a certain value ("4" seems to work) the computer is considered in an idle state. If not, the loop continues. What do you think about it? Thanks again... Oh... and Merry Christmas to you, too!
-
Yesterday I was trying a different approach to the problem: #include "ProcessListProperties.au3" Local $sum Local $PollFrequency = 500 Local $PollCount = 50 For $X = 1 to $PollCount $avRET = _ProcessListProperties() for $n = 2 to $avRET[0][0] $sum = $sum + $avRET[$n][6] Next ConsoleWrite("idle CPU% = " & (100-$sum) & @CRLF) $sum = 0 Sleep($PollFrequency) Next It's not perfect but at least it can report idle usage in a rough way... Maybe I could "filter" the AutoIt process from the $sum since this script uses a little CPU time. What do you think? Thanks...
-
Hi and thanks for the reply... I've followed your suggestions and edited that line. Anyway here's this piece of code: #include "ProcessListProperties.au3" $processName = 0 Local $PollFrequency = 500 Local $PollCount = 12 For $X = 1 to $PollCount $avRET = _ProcessListProperties($processName) ConsoleWrite($avRET[1][6]) Sleep($PollFrequency) Next The problem is: this script always reports a "System Idle Process" CPU usage at 100% and that's not true since my computer is not completely idle. I'm checking this againts a CPU stress benchmark (Linx). On the opposite, the script works with other processes and shows correct CPU usage (ie: explorer.exe). What am I doing wrong? Thanks...
-
Greetings, is it possible to monitor the "System Idle Process" with this script? I've tried to use zero as PID or "System Idle Process" as process name but I always get "process not running". Thank you for your time...