Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/24/2022 in all areas

  1. @mLipok 1) Check the running instance's command line for " --marionette" 2) There are also ways to detect it within the user profile
    1 point
  2. MarcusD

    Letter Counter

    Hi, sure - i found a solution by searching in these forum
    1 point
  3. First q&d try. Only one function (_ExcelPivot_CacheCreate) has been brushed up. Added headers according to the UDF specification Replaced magic numbers with the constants used by MS, added links to the MS docs Renamed the function names to start with the object name (SCRIPT BREAKING CHANGE) e.g. _ExcelPivot_CreateCache became _ExcelPivot_CacheCreate Added sensible default values for parameters similar to the Excel UDF e.g. If Range is not specified the UsedRange property is used Parameters now allow multiple formats e.g. Worksheet can be the name, the index or the worksheet object Added error handling so @error and @extended are set. Added documentation to the header. A COM error handler might still be needed. What do you think? is anything missing? ExcelPivot_FirstTry.au3
    1 point
  4. Did you run your script at least once by yourself ? WinActivate expects as non-optional parameter : a title/hWnd/class of the window to activate. I hope you didn't omit the window title due to the fact that it contains, for example, the name of a game. That would violate the forum rules. MouseClick("left"),117,984) and MouseClick("left"),243,985) produces a syntax error, because there is one closing parenthesis too much. Edit : @SkysLastChance was a few seconds faster . I agree with his advice to use an alternative way of doing things.
    1 point
  5. I would not recomend using pixels to do your automation. 99% of the time there is a better way to do it. You may want to look into ControlSend() However, WinActivate(" Put the title of the program you are wanting to activate ") HotKeySet('q', "Kill") Func Kill() Exit 0 EndFunc ;==>Kill $iColor = PixelGetColor(475, 1021) If $iColor = 0xF0F0F0 Then MouseClick("left", 210, 984) Sleep(250) MouseClick("left", 117, 984) Sleep(250) MouseClick("left", 243, 985) Send("{DELETE}") Else MouseClick('left', 116, 985) EndIf
    1 point
  6. When you select multiple items, the item you actually click on is the first one in the array, which is why I made it show the array. Also, note that the list box is made to not sort the items. Hopefully, this will help: #include <Array.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global $__aGUIDropFiles = 0 $Form1 = GUICreate("Form1", 600, 229, -1, -1, -1, $WS_EX_ACCEPTFILES) $List1 = GUICtrlCreateList("", 16, 24, 545, 175, $WS_BORDER) ; Unsorted list!!!! GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_DROPFILES, 'WM_DROPFILES') While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_DROPPED _ArrayDisplay($__aGUIDropFiles) $sList = _ArrayToString($__aGUIDropFiles, "|", 1) ; The 1 is to start at array[1] (second item), since the array's first item array[0] is the item count GUICtrlSetData($List1, "") ; Clears the list GUICtrlSetData($List1, $sList) ; Sets new data EndSwitch WEnd Func WM_DROPFILES($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $lParam Switch $iMsg Case $WM_DROPFILES Local Const $aReturn = _WinAPI_DragQueryFileEx($wParam) If UBound($aReturn) Then $__aGUIDropFiles = $aReturn Else Local Const $aError[1] = [0] $__aGUIDropFiles = $aError EndIf EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_DROPFILES
    1 point
  7. That's because Windows PCs are little-endian machines. The value 50332162 converts to hex 0x3000202 and is stored in a little-endian long. Here's how this value is stored in memory [the function vd() is a variable dump and cw() is a kind of ConsoleWrite]: $tLong = DllStructCreate("ulong value") $tBytes = DllStructCreate("byte b3; byte b2; byte b1; byte b0", DllStructGetPtr($tLong)) $tLong.value = 50332162 vd($tlong) vd($tBytes) cw('Version is: ' & $tBytes.b0 & '.' & $tBytes.b1 & '.' & $tBytes.b2 & '.' & $tBytes.b3) Outputs: Struct (4) @:000001382BD8A680 (structure alignment is unknown) uint 50332162 Struct (4) @:000001382BD8A680 (structure alignment is unknown) byte 2 byte 2 byte 0 byte 3 Version is: 3.0.2.2
    1 point
  8. Check out v0.24 in the first post! There are a number of improvements in this one. Test it, use it, break it, and report it please. Changes ADDED: Now you can set properties for the main GUI! ADDED; Added file menu item "Export to au3" for a more convenient and obvious way to save the generated code ADDED; Keyboard shortcuts to save to (Ctrl+S) or load from (Ctrl+O) definition file ADDED; Keyboard shortcut (Ctrl+A) and edit menu item to select all controls ADDED; Save window positions ADDED; Started implementation of main menu controls (no menu items yet) ADDED; Setting to generate code using OnEvent mode or Msg mode ADDED; Move control's creation order up or down the tree ADDED; Selecting a control will also highlight it in the object explorer (single select only, for now) FIXED: Wrong GUI width and height displayed in the titlebar at startup FIXED: Control names not applied when loading from agd definition file FIXED: Text looked slightly different in design vs runtime FIXED: Property Inspector window did not minimize/restore with the main GUI FIXED: Inconsistencies with displayed vs saved vs loaded GUI sizes FIXED: Controls not cleared when re-loading agd file FIXED: Sanitized some of the property inputs for invalid entry or removal (ex: -1 or "") UPDATE: More code generation improvements
    1 point
  9. $s = BinaryToString(StringToBinary(ChrW(0x2705), $SB_UTF8), $SB_UTF8) CW($s)
    1 point
×
×
  • Create New...