Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/10/2024 in all areas

  1. #include <WindowsConstants.au3> #include <SendMessage.au3> $hWndWord = WinGetHandle("[CLASS:OpusApp]") ConsoleWrite("$hWndWord=" & $hWndWord & @CRLF) $hNavigation = ControlGetHandle($hWndWord, "", "[CLASS:MsoCommandBar; TEXT:Navigation]") ConsoleWrite("$hNavigation=" & $hNavigation & @CRLF) _SendMessage($hNavigation, $WM_CLOSE)
    1 point
  2. If your multidimensional array have two dimensions then you can still think at the array in terms of rows and columns but it's good to know that dimensions are not the same thing as rows and columns.
    1 point
  3. Hi @donnyh13 Array sizes are fixed to the number of dimensions you need between 1 and 64. Each dimension in the array is represented via one pair of square brackets. ; One dimension Global $a[1] ;Two dimensions Global $a[1][1] ;Three dimensions Global $a[1][1][1] So your current ReDim expression changes the size the the size of that dimension, but not the number of dimensions. Yes that would reduce your 2D array to a 1D array. I am not entirely sure i understand what your function should do, but if you only need to add a column to the array, maybe something like this: #include <Array.au3> Global $aTest[1][2] $aTest[0][0] = 10 $aTest[0][1] = 20 _ArrayDisplay($aTest) MyFunction($aTest, 25, True) _ArrayDisplay($aTest) MyFunction($aTest, 30, False) _ArrayDisplay($aTest) Func MyFunction(ByRef $array, $value, $addColumn = False) If $addColumn Then Redim $array[1][UBound($array, 2) + 1] $array[0][UBound($array, 2) - 1] = $value EndFunc
    1 point
  4. It has nothing to do with ReDim, it fails because you have a multidimensional array so when you assign a value you must specify the dimensions. If I understand well what you need, you can have a 1D array and the value assigned for each index should be a simple value or an array based on the option selected by the user. Something like that. Local $aTest[10] Local $Options[2] $aTest[0] = 0 $aTest[1] = $Options ...
    1 point
  5. pixelsearch

    Drag-Adjust

    Thanks funkey, will do. I guess my purple dragbar was more than visible in the example above But it was only for the example purpose. In the real script, I just did this : 1) Dragbar color is now "3DLight color" (as named by Koda) with the following good result, first with my grey PC theme : Then with a more usual theme where white color predominates, we can see that the dragbar color goes fine with white edit controls : 2) The greenish $idCharStatus control is no more draggable : there's no use of 2 draggable controls and who knows, maybe one day I'll find a more useful purpose when it is clicked. 3) While dragging, to avoid serious flicker problems (in both edit fields filled with text) with OS's that are not Win10+ then the extended style $WS_EX_COMPOSITED (applied during GUI creation) is a big help, as discussed in this thread Thanks for reading and a have a great evening
    1 point
  6. funkey

    Drag-Adjust

    You can have a look at Melba's version:
    1 point
  7. SOLVE-SMART

    AutoIt Cheat Sheet

    Hi folks 👋 , I was thinking about how I decide to learn a new programming language. I mean, apart of professional requirements, there are some criteria for how I (and also some of my colleagues) choose a new technology or programming language. To get a good overview about how the language is written, how the syntax looks like and fits this my interests and expectations, I use cheat sheets for the specific programming language, a technology or methodology. Also for experienced programmers who want to switch a language or as an addition, it could be helpful to understand some basics, syntax etc. Is there any cheat sheet for AutoIt? I didn't find any. Do we need it as a community or at least would it be helpful? Would there be some of you supporting the idea of creating one? Do some of you know about templates that could be used (out of the box)? In case you are not familiar with the topic¹ and you do not know what I am talking about, please simple do a google search for "cheat sheet programming languages". 💡 There are hundreds of them, but non of these are for the AutoIt language². To spread this wonderful language to more people in the world, to support the accessibility, it should be a "must have" (among other things). I plan to build one => in best case as a community project with several of yours. Who wants to join? Best regards Sven ¹ A cheat sheet is a quick look-up reference chart or set of simple, brief instructions for accomplishing a specific task. ² It does not matter whether it's a PDF or a image in the forum which is well linked and present (next to the help) or a website. 📅 Update 2023-02-21: AutoIt (en) Cheat Sheet 🔗 AutoIt (en) Cheat Sheet as website on cheatography (a website which is made to create and publish cheat sheets by the help of templates) 🔗 AutoIt (en) Cheat Sheet as PDF (generated by cheatography) 🔗 Alternative Link to the PDF
    1 point
  8. Linbeardy

    AutoIt Cheat Sheet

    I found this cheat sheet very convenient when I started learning AutoIt some time ago. It really helped simplify the scripting process, especially given these complex syntactic features. By the way, if you want to explore more resources on scripting languages, I recently came across a great site: https://notesonline.com which, during the training, will be able to help you create quite convenient notes. Try to simplify your life as much as possible. It's always useful to have different sources to expand your toolkit, isn't it?
    1 point
  9. You're welcome 🙂. Maybe querying for the parent process and including elevated process is of any further help? #RequireAdmin #include <array.au3> #include <WinAPIProc.au3> Local $aProcessList = ProcessList() Global $aProcessList_Enhanced[UBound($aProcessList)][11] $aProcessList_Enhanced[0][0] = $aProcessList[0][0] For $i = 1 To $aProcessList[0][0] $aProcessList_Enhanced[$i][0] = $aProcessList[$i][0] $aProcessList_Enhanced[$i][1] = $aProcessList[$i][1] $aProcessList_Enhanced[$i][2] = _WinAPI_GetProcessFileName($aProcessList[$i][1]) $aProcessList_Enhanced[$i][3] = FileGetVersion($aProcessList_Enhanced[$i][2], "FileDescription") $aProcessList_Enhanced[$i][4] = FileGetVersion($aProcessList_Enhanced[$i][2], "InternalName") $aProcessList_Enhanced[$i][5] = FileGetVersion($aProcessList_Enhanced[$i][2], "ProductName") $aProcessList_Enhanced[$i][6] =_WinAPI_GetParentProcess($aProcessList_Enhanced[$i][1]) $aProcessList_Enhanced[$i][7] = _WinAPI_GetProcessFileName($aProcessList[$i][1]) $aProcessList_Enhanced[$i][8] = FileGetVersion($aProcessList_Enhanced[$i][7], "FileDescription") $aProcessList_Enhanced[$i][9] = FileGetVersion($aProcessList_Enhanced[$i][7], "InternalName") $aProcessList_Enhanced[$i][10] = FileGetVersion($aProcessList_Enhanced[$i][7], "ProductName") Next _ArrayDisplay($aProcessList_Enhanced)
    1 point
  10. Is this of any help? #include <array.au3> #include <WinAPIProc.au3> Local $aProcessList = ProcessList() Global $aProcessList_Enhanced[UBound($aProcessList)][6] $aProcessList_Enhanced[0][0] = $aProcessList[0][0] For $i = 1 To $aProcessList[0][0] $aProcessList_Enhanced[$i][0] = $aProcessList[$i][0] $aProcessList_Enhanced[$i][1] = $aProcessList[$i][1] $aProcessList_Enhanced[$i][2] = _WinAPI_GetProcessFileName($aProcessList[$i][1]) $aProcessList_Enhanced[$i][3] = FileGetVersion($aProcessList_Enhanced[$i][2], "FileDescription") $aProcessList_Enhanced[$i][4] = FileGetVersion($aProcessList_Enhanced[$i][2], "InternalName") $aProcessList_Enhanced[$i][5] = FileGetVersion($aProcessList_Enhanced[$i][2], "ProductName") Next _ArrayDisplay($aProcessList_Enhanced)
    1 point
  11. _TempFile -> TmpFile FileCreateShortcut -> CreateLink
    1 point
  12. OK, I may have found the problem. For If statements like the following: If $aDTC_Data[7][1] & $aDTC_Data[7][2] = "" Then ; Check AM/PM set I replaced the '&' with 'And' If $aDTC_Data[7][1] And $aDTC_Data[7][2] = "" Then ; Check AM/PM set which seemed to fix the problem.
    1 point
  13. StringStripWS https://www.purebasic.fr/english/viewtopic.php?t=79183
    1 point
  14. BigNum.au3 = bigint.pbi FileRecycle -> on WinAPI FileGetShortcut -> similar _ProcessGetPath -> ProcessNameFromHwnd
    1 point
×
×
  • Create New...