Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/08/2023 in all areas

  1. instead of this “F:\autoit\Maccosoe nepeumeHosanne\test.exe” this “F:\autoit\Maccosoe nepeumeHosanne\test.exe” "%1"
    1 point
  2. New version: ComUDF.au3
    1 point
  3. $oShell.Windows() returns a collection of items, just choose what item do you want by LocationName or LocationURL. $Location = 'Local Disk (C:)' $hExplorer = WinGetHandle( "[REGEXPCLASS:^(Cabinet|Explore)WClass$]" ) If Not $hExplorer Then Exit $oShell = ObjCreate("Shell.Application" ) $oWindows = $oShell.Windows() For $Index = 0 To $oWindows.Count - 1 If $oWindows.Item($Index).LocationName = $Location Then $oWindow = $oWindows.Item($Index) ExitLoop EndIf Next For $oItem In $oWindow.Document.SelectedItems() ConsoleWrite( $oItem.Path() & @CRLF ) Next
    1 point
  4. @mLipok sure do it. I don't care. It would be great to have it on GitHub. You're the boss Saludos
    1 point
  5. If you are asking can you use an existing XML element (and all of its children) to append or insert somewhere else in the XML structure, then yes. Instead of dynamically building the structure, you can just select the single node, clone it, modify it as necessary, and then append or insert it the same way as in the example. The key is that you need to clone the node. You can't use one object and try to append it in several places. I think I've mention this to you before in a previous post. Personally, I don't use the XML UDF. I guess for some it may make some tasks a little easier but it is missing some functionality, has a few bugs/issues (some I have pointed out years ago that still are not fixed), and for the most part, just adds a lot of unnecessary overhead to the use of the COM objects themselves. Obviously, _XML_Tidy() was not necessary. I only used it to make the output more easily readable for anyone who ran the script. There are plenty of ways to pretty-print XML. I prefer to use a much more feature-rich command line utility (xmlstarlet) to do my XML formatting. As far as site/documentation that will help you learn how to use and implement XML DOM methods and properties, I would start at the source, MS XML DOM Reference. Another very good site for all things WWW, is W3Schools Online Web Tutorials and References. In terms of XML-related information, here is the link to the main XML page. There you can learn about XML in general, the XML DOM and how to navigate it, XPath, XSLT, and much more. Plus, many of the tutorials allow you to interactively try and test the information you are learning. It is a VERY good site for learning W3 stuff. On a side note as it relates to KML styles, are you aware that you can define the styles once and reference them in your Placemarks by using a <styleUrl> tag? Defining the styles once makes it much easier to maintain the KML files if you need or want to change a style later. Creating duplicate <style> nodes throughout a document is a maintenance nightmare. Here is a sample on the Google Developer's Site that shows what I mean.
    1 point
  6. if the @DesktopWidth, @DesktopHeight is not enough for you take a look here Moves and/or resizes and arrange windows between multi monitors. Func _MM_GetMonitorsArray() hope it helps
    1 point
  7. Hi. Taken from some other posting in this forum, just a snippet to give you a start: Func DesktopWorkingAreaHeight() Local $dRECT = DllStructCreate("long; long; long; long") Local $spiRet = DllCall("User32.dll", "int", "SystemParametersInfo", _ "uint", 48, "uint", 0, "ptr", DllStructGetPtr($dRECT), "uint", 0) If @error Then Return 0 If $spiRet[0] = 0 Then Return 0 Local $aRet[4] = [DllStructGetData($dRECT, 1), DllStructGetData($dRECT, 2), DllStructGetData($dRECT, 3), DllStructGetData($dRECT, 4)] Local $MaxHeight = $aRet[3] - $aRet[1] ; substract height of task bar $TitleBarHeight = _WinAPI_GetSystemMetrics($SM_CYCAPTION) Return $MaxHeight - $TitleBarHeight - 10 EndFunc ;==>DesktopWorkingAreaHeight
    1 point
  8. C++ header files are unfamiliar to me, but I'm trying to figure something out. My intention is to automatically extract from these files the necessary information to be able to then use them in the ObjCreateInterface() and/or ObjectFromTag() function. To get started I followed some guidance from this post by @LarsJ : https://www.autoitscript.com/forum/topic/205154-using-objcreateinterface-and-objectfromtag-functions This script is a first draft to try to translate variable types from MSDN types to AutoIt types. A lot of this code could definitely be improved by replacing some parts with more effective regular expressions (if only I could....). For some of the conversions I used a function posted in this post by @wolf9228 from some time ago (https://www.autoitscript.com/forum/topic/113824-windows-data-types/). With that function it is possible to translate the default types, but I see that there are types in the header that are not foreseen in that function. They look like types declared elsewhere in the header itself. also sometimes the type declaration contains 2 strings where the first of the 2 appears to be the type declaration, but sometimes it contains three, where the first of the three strings may be for example 'const' or something different and in that case the declaration of type is the second string. So it would be necessary to find a way to parse that group of strings which is variable. In this draft script I tried in the case of 3 strings not to consider the first one, but surely this method is not infallible and perhaps the possible cases could include even more than 3 strings in the declaration of a type? Is there anyone who can give some suggestions on how to proceed in those cases? To run this script, you also need to save a C++ header file in the same directory. I used the header file related to webview2 WebView2.h which can be found in this post by @LarsJ (https://www.autoitscript.com/forum/topic/205154-using-objcreateinterface-and-objectfromtag-functions) in the file ObjectFromTag.7z inside the 'Includes' folder. The script returns a draft of the intended result where unrecognized types are marked with ?????. The output script is also copied to the clipboard so that it can be easily pasted into the SciTE editor for better analysis. immediately below the translated declarations, the declarations of the original types are also reported, as a reminder. welcome to anyone who is interested in developing this script or has useful suggestions for converting a c++ header to AutoIt. Thank you Header_Parser.au3
    1 point
×
×
  • Create New...