PaulIA Posted May 19, 2007 Author Share Posted May 19, 2007 (edited) I have... i downloaded today....Here part from install:Then you need to install Auto3Lib using the custom directory you have specified for AutoIt. AutoIt by default installs in the "C:\Program Files\AutoIt3" directory. You've changed yours to install on your D: drive. So when you install Auto3Lib, make sure you also specify "D:\Program Files\AutoIt3" during the installation.Edit: Better yet, it's almost certain that you've got multiple versions of AutoIt/Auto3Lib on you machine. Uninstall them all and install AutoIt and Auto3Lib using their default ("C:\Program Files\AutoIt3") locations. Edited May 19, 2007 by PaulIA Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Achilles Posted May 20, 2007 Share Posted May 20, 2007 I'm having problems with pictures assigning pictures using GuiCtrlCreatePic() and I think it might be related to my _GDI_Shutdown() not working properly (it returns "0"). This is the code: Func _ChangeDesktopBackground($path) _GDI_StartUp() $hImage = _GDI_LoadFromFile($path) $file = StringSplit($path, '.') $sCLSID = _GDI_GetEncoderClsID("BMP") _GDI_SaveToFile($hImage, @WindowsDir & '\xwall.bmp', $sCLSID) ConsoleWrite("_GDI_DisposeImage success = " & _GDI_DisposeImage($hImage) & @CRLF) ConsoleWrite("_GDI_ShutDown() success = " & _GDI_ShutDown() & @CRLF) Sleep(250) DllCall('User32.dll', 'int', 'SystemParametersInfo', 'int', 20, 'int', 0, 'string', @WindowsDir & '\xwall.bmp', 'int', 0) EndFuncWhenever I run this I end up with the Console showing "True" @CRLF "0" Am I not disposing of the image correctly? Is there another way to delete an image from the _GDI? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Bardokas Posted May 20, 2007 Share Posted May 20, 2007 I reinstalled in c,but same. From examples only dont working pipes, i tryed Auto3Lib\ListView 1.au3 works fine.. Link to comment Share on other sites More sharing options...
Bardokas Posted May 20, 2007 Share Posted May 20, 2007 (edited) I get error then push Send button in client..***Edited****I get working, changed problematic parts with DllStructGetData...Here full server.au3:http://pastebin.ca/498249 Edited May 20, 2007 by Bardokas Link to comment Share on other sites More sharing options...
PaulIA Posted May 20, 2007 Author Share Posted May 20, 2007 (edited) I'm having problems with pictures assigning pictures using GuiCtrlCreatePic() and I think it might be related to my _GDI_Shutdown() not working properly (it returns "0"). This is the code: Func _ChangeDesktopBackground($path) _GDI_StartUp() $hImage = _GDI_LoadFromFile($path) $file = StringSplit($path, '.') $sCLSID = _GDI_GetEncoderClsID("BMP") _GDI_SaveToFile($hImage, @WindowsDir & '\xwall.bmp', $sCLSID) ConsoleWrite("_GDI_DisposeImage success = " & _GDI_DisposeImage($hImage) & @CRLF) ConsoleWrite("_GDI_ShutDown() success = " & _GDI_ShutDown() & @CRLF) Sleep(250) DllCall('User32.dll', 'int', 'SystemParametersInfo', 'int', 20, 'int', 0, 'string', @WindowsDir & '\xwall.bmp', 'int', 0) EndFuncWhenever I run this I end up with the Console showing "True" @CRLF "0" Am I not disposing of the image correctly? Is there another way to delete an image from the _GDI?_GDI_ShutDown isn't returning the correct value on success. It always returns False. Run your code and print @Error after calling _GDI_ShutDown. If it's 0, then the call was successful. I'll change the code to return True when the call is successful for the next release. Thanks for reporting this. Edit: You've got some problems with the SystemParametersInfo call here. Take a look at the Wallpaper.au3 demo in the Auto3Lib Misc folder. The ChangeWallpaper function shows how to change the wallpaper using SystemParametersInfo. Edited May 20, 2007 by PaulIA Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Achilles Posted May 20, 2007 Share Posted May 20, 2007 (edited) _GDI_ShutDown isn't returning the correct value on success. It always returns False. Run your code and print @Error after calling _GDI_ShutDown. If it's 0, then the call was successful. I'll change the code to return True when the call is successful for the next release. Thanks for reporting this.Edit: You've got some problems with the SystemParametersInfo call here. Take a look at the Wallpaper.au3 demo in the Auto3Lib Misc folder. The ChangeWallpaper function shows how to change the wallpaper using SystemParametersInfo.I'm still encountering the same problem, and I'm pretty sure that it's related to the wallpaper function (I'm using the one you suggested in the post above). I have a toolbar with several different images on it. One of these images will be set to the wallpaper background but then the same image will not appear on the toolbar because GuiCtrCreatePic() returns 0 (because it can't create the picture, I've made the sure the directory is correct).Then, within the script, I change the background. Then I delete then recreate the toolbar GUI and now both the prior window's image is not shown and the current wallpaper is not shown. So if I were to change the image again it would make another blank space on the toolbar. I hope I am making this clear, if not please say so and I'll include some pictures to illustrate what I am trying to say. Do you have any ideas what might be causing this?EDIT: I added a _GDI_DisposeImage() and all is working correctly! Edited May 20, 2007 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
PaulIA Posted May 20, 2007 Author Share Posted May 20, 2007 I'm still encountering the same problem, and I'm pretty sure that it's related to the wallpaper function (I'm using the one you suggested in the post above). I have a toolbar with several different images on it. One of these images will be set to the wallpaper background but then the same image will not appear on the toolbar because GuiCtrCreatePic() returns 0 (because it can't create the picture, I've made the sure the directory is correct).Then, within the script, I change the background. Then I delete then recreate the toolbar GUI and now both the prior window's image is not shown and the current wallpaper is not shown. So if I were to change the image again it would make another blank space on the toolbar. I hope I am making this clear, if not please say so and I'll include some pictures to illustrate what I am trying to say. Do you have any ideas what might be causing this?EDIT: I added a _GDI_DisposeImage() and all is working correctly!That would do it. I'm not sure why the Wallpaper demo works, but it definitely should have this too. I'll add it for the next release. Thanks for following up on this. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Achilles Posted May 20, 2007 Share Posted May 20, 2007 That would do it. I'm not sure why the Wallpaper demo works, but it definitely should have this too. I'll add it for the next release. Thanks for following up on this.Your welcome... And thanks for your great library, it's made my current project a lot better then I could of ever done by myself! My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
PaulIA Posted May 21, 2007 Author Share Posted May 21, 2007 Release 4.0.3This release updates the help file with examples up to the Time functions. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Hostage Posted May 23, 2007 Share Posted May 23, 2007 I see on page 25 a discussion about setting individual listview item's colors... did anyone ever write a function to set individual tree view item colors? I'm running up hard against AutoIt's control limit in a program, but the individual treeview node's colors are essential to it. Thanks! Link to comment Share on other sites More sharing options...
JavaScript_Freek Posted May 23, 2007 Share Posted May 23, 2007 Where can I find A3LMenu.au3? [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
PaulIA Posted May 23, 2007 Author Share Posted May 23, 2007 Where can I find A3LMenu.au3?Download Auto3Lib from the first post in this thread or from the Downloads section (upper right hand corner of your screen). Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
JavaScript_Freek Posted May 23, 2007 Share Posted May 23, 2007 I did that already but I get that that I need the file. Au3Menu.au3 [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
DaleHohm Posted May 23, 2007 Share Posted May 23, 2007 If you downloaded the file to a floppy and then put the floppy in your toaster, then it is understandable that AutoIt can't find it. If that is not what you've done, perhaps you should share more details about where you put the file, how you are trying to access it and exactly what error message you receive. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
PaulIA Posted May 24, 2007 Author Share Posted May 24, 2007 I did that already but I get that that I need the file. Au3Menu.au3You are looking for the file A3LMenu.au3, not Au3Menu.au3. Trust me, I wrote it. If you install Auto3Lib using the default installation location, this file will be in "C:\Program Files\AutoIt3\Include" along with the other AutoIt include files. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
PaulIA Posted May 24, 2007 Author Share Posted May 24, 2007 I see on page 25 a discussion about setting individual listview item's colors... did anyone ever write a function to set individual tree view item colors? I'm running up hard against AutoIt's control limit in a program, but the individual treeview node's colors are essential to it. Thanks!Release 4.0.4This release has an update to the TreeView 1 demo that shows a simple method for coloring the individual TreeView nodes. I have plans for a more robust way of doing this in the future, but you can use this for proof of concept until then. I also discovered a small bug in TreeView_Expand where it was trying to expand a node with no children, resulting in a delay. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Thunder-man Posted May 25, 2007 Share Posted May 25, 2007 (edited) Hi, I add a new Column and SubItem to a other Program. I use this in #Obfuscator_off AdlibEnable("auto", 700) #Obfuscator_on It works fine, but when I close the other Program, the script close with _Mem_CtrlInit: Invalid window handle passed [0x000602C6] (Not always, but now and then.) What can I do? Edit: Now I write the Handle in a *. ini. But there remains the same one! Edited May 25, 2007 by Thunder-man Link to comment Share on other sites More sharing options...
PaulIA Posted May 25, 2007 Author Share Posted May 25, 2007 Hi, I add a new Column and SubItem to a other Program. I use this in #Obfuscator_off AdlibEnable("auto", 700) #Obfuscator_on It works fine, but when I close the other Program, the script close with _Mem_CtrlInit: Invalid window handle passed [0x000602C6] (Not always, but now and then.) What can I do? Edit: Now I write the Handle in a *. ini. But there remains the same one!Can you post a small script that show the problem? Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Hostage Posted May 25, 2007 Share Posted May 25, 2007 Release 4.0.4This release has an update to the TreeView 1 demo that shows a simple method for coloring the individual TreeView nodes. I have plans for a more robust way of doing this in the future, but you can use this for proof of concept until then. I also discovered a small bug in TreeView_Expand where it was trying to expand a node with no children, resulting in a delay.That's fantastic, thank you so very much. Link to comment Share on other sites More sharing options...
Thunder-man Posted May 25, 2007 Share Posted May 25, 2007 Can you post a small script that show the problem? snipet ... #Obfuscator_off AdlibEnable("auto", 700) #Obfuscator_on Run("SVSAdmin.exe", $Path) WinActivate("Altiris Software Virtualization Solution Admin", "") Sleep(150) $handle_ = ControlGetHandle("[CLASS:ManageFrame]", "", "[CLASS:ATL:01003A62; 458360]") Sleep(10) IniWrite(@ScriptDir & "\Admin.dat", "GetHandle", "Handle" ,$handle_) Sleep(10) $handle = IniRead(@ScriptDir & "\Admin.dat", "GetHandle", "Handle","NotFound") Sleep(10) $Flags = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\Altiris\SVS", "Flags") _ListView_InsertColumn ($handle, 3, " Comment", 350) _ListView_SetSelectedColumn ($handle, 3) _ListView_AddSubItem ($handle, 0, "| Version:", 3) _ListView_AddSubItem ($handle, 1, "", 3) _ListView_AddSubItem ($handle, 2, "*", 3) ;....... Func auto() If $Flags = "1" Then If _ListView_GetItemText ($handle, 0, 3) = "" Then _ListView_SetItemText ($handle, 0, "| Version:", 3) If _ListView_GetItemText ($handle, 3, 3) = "" Then _ListView_SetItemText ($handle, 3, "| Author:", 3) If _ListView_GetItemText ($handle, 6, 3) = "" Then _ListView_SetItemText ($handle, 6, "| Company:", 3) If _ListView_GetItemText ($handle, 9, 3) = "" Then _ListView_SetItemText ($handle, 9, "| Notes:", 3) EndIf EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts