
ZDS
Members-
Posts
11 -
Joined
-
Last visited
Everything posted by ZDS
-
[R] Icon in the Windows taskbar (for non-AutoIt windows)
ZDS replied to ZDS's topic in AutoIt General Help and Support
@jguinch : You are awesome ! I just had (in my example code) to wait before calling _WinAPI_DestroyIcon($icon) ! Adding the Sleep(200) is enough to fix the problem Thanks for all ! Problem solved -
[R] Icon in the Windows taskbar (for non-AutoIt windows)
ZDS replied to ZDS's topic in AutoIt General Help and Support
@MyEarth : Next time, try to read what I took the trouble to write ^^ I searched, and my code is based on the very same code from Mikell (the one in your link, see the first line of the code ; Author: Mikell ). Also, this example in your link has the same result : pixellated Please, is there anyone with an idea of where the problem is? -
[R] Icon in the Windows taskbar (for non-AutoIt windows)
ZDS replied to ZDS's topic in AutoIt General Help and Support
-
[R] Icon in the Windows taskbar (for non-AutoIt windows)
ZDS replied to ZDS's topic in AutoIt General Help and Support
I think you missed the problem : The icon in the taskbar at the bottom of the screen is pixellated (but when I create a GUI with GUICreate and GUISetIcon, there is not pixellisation; only when I set a new icon on a not-AutoIt window). Please zoom in to see properly the icon issue : -
Bonjour, Hello, My name is Glass Joe ! [FYI, I'm under Windows 7 Pro & Windows 8.1 Family Edition] I based my code on the WinSetIcon function brought to me by Mikell on the french AutoIt forum ( here is the [link] ). This is the example code I used (with the _WinAPI_LoadImage function in order to force the icon size) : #include <WinAPI.au3> ShellExecute(StringRegExpReplace(@AutoItExe, '(.+)\\[^\\]+', "$1") & "\AutoIt.chm") Do Sleep(10) Until WinExists("AutoIt Help") $handle = WinGetHandle("AutoIt Help") WinSetIcon($handle, @ScriptDir&"\Icone.ico") Func WinSetIcon($hwnd, $file) Local $icon = _WinAPI_LoadImage(0, $file, $IMAGE_ICON, 32, 32, BitOR($LR_LOADFROMFILE, $LR_CREATEDIBSECTION)) If Not $icon Then Return False _SendMessage($handle, 0x0080, 1, $icon) ; $WM_SETICON = 0x0080 Sleep(200) ; [[Fix]] _WinAPI_DestroyIcon($icon) EndFunc And this is the screenshot concerning my problem : http://www.autoitscript.fr/forum/download/file.php?id=3612&mode=view As you can see, the icon I created has several sizes : 48x48, 32x32 and 16x16. All my taskbar icons are 32x32, but when the code above is executed, the icon is pixellated. The one in the upperleft corner of the window is correct, but it's the one is the taskbar that matters to me. Could you help me please !? Thanks in advance for your help, and see you soon ! PS: When using a single-sized icon 48/32/16, I've got the same result : pixellated. PS2: The green arrow icon in Mikell's example is also pixellated on each computer I used. Attachment: The icon used with this sample code EDIT: Problem solved, see the line [[Fix]] in the code Icone.ico
-
Hi everyone (sorry if I don't speak well, I'm a frog eater ^^). I'm looking for help in order to make a simple script able to detect hover/unhover a control with a GUIRegisterMsg command. Same thing with push/release the control (a button in my example). I'm avoiding the _IsPressed function (because of the possible false-positives with BitDefender and others, like with the UPX) and trying to make something short which will consume the minimum resources. Here is my base-code : Many thanks for considering my request ! ZDS PS: I have found many UDFs like TommyDDR's/MrCreatoR's one, but nothing like I'm looking for (I'm not sure it's possible, but there are things like the example in AutoIt's help specific to a button : _GUICtrlButton_GetSplitInfo )
-
Thanks a lot, I'll try it as soon as I can. PS: How did you learn the definition of an "ICINFO" structure? I've looked all over the MSDN documentation, but found nothing like that. In your conversation with Andreik, did you found the same thing for the "lpFormat" attribute? EDIT: It doesn't seem to work, maybe the structure of lpParms is not enough correct, because in my debug, - I make a first capture and store it in an array of _screen_capturehwnd elements in order to re-use it multiple times - I make a first test with XVid Codec with a "10" quality value => 138 Ko for the video - I copy aco in aco_sav, and choose an another quality value "3" => 256 Ko for the video - I restore aco_sav in aco, and therefor relaunch the first quality value => 138 Ko Here is my debug result : As you see the three times the readings of the structures $aco and $aco.lpParms are the same, so it's maybe not enough to differenciate the lpParms values. Never mind, thanks for your work on this UDF (and your help), it's really amazing to make video/screen captures with AutoIt EDIT: I confirm, this structure definition is not enough, the size of the generated lpParms is 3540, the size or an ICINFO sdd is 568.
-
Hi UEZ ! Thank you for your UDF, it's really amazing I'm trying to use it with one more functionnality but I'm not able to catch the proper values : I try to rebuild the $aco structure without calling the "AVISaveOptions" thing (only one time, at the first launch). Do you know what is behind the "lpParms" pointer of $aco (in order to marshallizing the data in a file, and rebuild it in an other script) ? There is no real information on MSDN for this. Thanks for all, and sorry for my speaking, I'm a french user (a frog eater, yes, that's it ^^) Aurélien / ZDS PS: I'm using Koepi's Xvid Codec for my tests.
-
How to read custom extended properties of an exe
ZDS replied to ZDS's topic in AutoIt General Help and Support
Hi, In fact I was working with a very very old version of AutoIt. With 3.2.X and newer the FileGetVersion function use a new parameter, exactly what I needed. Example for the micro-script in my first topic : FileGetVersion("foobar.exe", "foo") This is my personal function to get the information from a script or a compiled script : Func FileGetAdvancedProperty($file, $property) Local $value = "" If StringRegExp(StringLower($file), ".AU3$") Then Local $start = "#AutoIt3Wrapper_Res_Field="&$property&"|", $flux = FileOpen($file, 0) If Not @error And $file <> -1 Then For $i = 1 To 25 Local $line = FileReadLine($flux, $i) If @error Then ExitLoop If StringLeft($line,StringLen($start)) = $start Then $value = StringTrimLeft($line,StringLen($start)) ExitLoop EndIf Next EndIf FileClose($file) Else $value = FileGetVersion($file, $property) If @error Then $value = "" EndIf Return $value EndFunc Thanks for your help ! -
Bonjour tout le monde / Hi to everyone ! First of all, I apologize in advance, I'm a french user and my last English lesson was near to 5 years ago ^^ I'm trying to read the extended property of a compiled script, NOT THE CLASSIC ONES (not the version for example, I know how to use FileGetVersion). When the following code is compiled to "foobar.exe", I'd like to catch (in another script) the value in a property named "foo", aka "bar" in the example below. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Field=foo|bar #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** MsgBox(0,"","foobar !")Here is a little screenshot from the Properties Window (sorry french version of Windows) : Thanks for all the help you could give to me ! A bientôt / See you ! ZDS PS: I forgot, I'm looking for a function for an executable, this is the kind of function for a not-compiled script : Func FileGetAdvancedPropertyForSRC($file, $property) Local $value = "", $start = "#AutoIt3Wrapper_Res_Field="&$property&"|" Local $flux = FileOpen($file, 0) If Not @error And $file <> -1 Then For $i = 1 To 25 Local $line = FileReadLine($flux, $i) If @error Then ExitLoop If StringLeft($line,StringLen($start)) = $start Then $value = StringTrimLeft($line,StringLen($start)) ExitLoop EndIf Next EndIf FileClose($file) Return $value EndFunc