Leaderboard
Popular Content
Showing content with the highest reputation on 06/19/2020 in all areas
-
Fixed in the 1.5.0.1 version of the UDF which I uploaded today.2 points
-
Doubtful that it will work with your browser based game.2 points
-
Could you please add the following function to your script and call _AD_ListDomainControllersEX instead of _AD_ListDomainControllers? The error should be gone. ; #FUNCTION# ==================================================================================================================== ; Name...........: _AD_ListDomainControllers ; Description ...: Enumerates all Domain Controllers (returns information about: Domain Controller, site, subnet and Global Catalog). ; Syntax.........: _AD_ListDomainControllers([$bListRO = False[, $bListGC = False]]) ; Parameters ....: $bListRO - [optional] If set to True only returns RODC (read only domain controllers) (default = False) ; $bListGC - [optional] If set to True queries the DC for a Global Catalog. Disabled for performance reasons (default = False) ; Return values .: Success - One-based two dimensional array with the following information: ; |0 - Domain Controller: Name ; |1 - Domain Controller: Distinguished Name (FQDN) ; |2 - Domain Controller: DNS host name ; |3 - Site: Name ; |4 - Site: Distinguished Name (FQDN) ; |5 - Site: List of subnets that can connect to the site using this DC in the format x.x.x.x/mask - multiple subnets are separated by comma ; |6 - Global Catalog: If $bListGC = True you get one of the following values: ; True if the DC is a Global Catalog, False if it is no GC, "" if RootDSE of the DC could not be accessed ; Failure - "", sets @error to: ; |1 - No Domain Controllers found. @extended is set to the error returned by LDAP ; Author ........: water (based on VB functions by Richard L. Mueller) ; Modified.......: ; Remarks .......: This function only lists writeable DCs (default). To list RODC (read only DCs) use parameter $bListRO ; Related .......: ; Link ..........: http://www.rlmueller.net/Enumerate%20DCs.htm ; Example .......: Yes ; =============================================================================================================================== Func _AD_ListDomainControllersEX($bListRO = False, $bListGC = False) If $bListRO = Default Then $bListRO = False If $bListGC = Default Then $bListGC = False Local $oDC, $oSite, $oResult Local Const $NTDSDSA_OPT_IS_GC = 1 $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_Configuration & ">;(objectClass=nTDSDSA);ADsPath;subtree" If $bListRO Then $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_Configuration & ">;(objectClass=nTDSDSARO);ADsPath;subtree" Local $oRecordSet = $__oAD_Command.Execute If @error Or Not IsObj($oRecordSet) Or $oRecordSet.RecordCount = 0 Then Return SetError(1, @error, "") ; The parent object of each object with objectClass=nTDSDSA is a Domain ; Controller. The parent of each Domain Controller is a "Servers" ; container, and the parent of this container is the "Site" container. $oRecordSet.MoveFirst Local $aResult[1][7], $iCount1 = 1, $aSubNet, $aTemp, $sTemp Do ReDim $aResult[$iCount1 + 1][7] $oResult = __AD_ObjGet($oRecordSet.Fields("AdsPath").Value) $oDC = __AD_ObjGet($oResult.Parent) $aResult[$iCount1][0] = $oDC.Get("Name") $aResult[$iCount1][1] = $oDC.serverReference $aResult[$iCount1][2] = $oDC.DNSHostName $oResult = __AD_ObjGet($oDC.Parent) $oSite = __AD_ObjGet($oResult.Parent) $aResult[$iCount1][3] = StringMid($oSite.Name, 4) $aResult[$iCount1][4] = $oSite.distinguishedName $aSubNet = $oSite.GetEx("siteObjectBL") For $iCount2 = 0 To UBound($aSubNet) - 1 $aTemp = StringSplit($aSubNet[$iCount2], ",") $sTemp = StringMid($aTemp[1], 4) If $iCount2 = 0 Then $aResult[$iCount1][5] = $sTemp Else $aResult[$iCount1][5] = $aResult[$iCount1][5] & "," & $sTemp EndIf Next If $bListGC Then ; Is the DC a GC? Taken from: http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/computermanagement/ad/ Local $oDCRootDSE = __AD_ObjGet("LDAP://" & $oDC.DNSHostName & "/rootDSE") If @error = 0 Then Local $sDsServiceDN = $oDCRootDSE.Get("dsServiceName") Local $oDsRoot = __AD_ObjGet("LDAP://" & $oDC.DNSHostName & "/" & $sDsServiceDN) Local $iDCOptions = $oDsRoot.Get("options") If BitAND($iDCOptions, $NTDSDSA_OPT_IS_GC) = 1 Then $aResult[$iCount1][6] = True Else $aResult[$iCount1][6] = False EndIf EndIf EndIf $oRecordSet.MoveNext $iCount1 += 1 Until $oRecordSet.EOF $oRecordSet.Close $aResult[0][0] = UBound($aResult, 1) - 1 $aResult[0][1] = UBound($aResult, 2) Return $aResult EndFunc ;==>_AD_ListDomainControllers2 points
-
TheDcoder has now provided me with a new script, rather than an update to the old one. Thanks buddy, works a treat. The new script only works for an Itch.io Collection page. To use it, click the create New script option in something like VioletMonkey, and paste over with the following script. Then click Save & Close. You can also enable at right. And will need to refresh at least once if already at your Collection page. You can toggle the on or off state for the script. // ==UserScript== // @name Itch.io Collection Game Cover Copier // @namespace Violentmonkey Scripts // @match https://itch.io/c/* // @noframes // @grant GM_setClipboard // @run-at document-start // @version 1.0 // @author TheDcoder // @description Started working on 19 Jun 2020, 16:10 PM // ==/UserScript== document.addEventListener("keydown", event => { if (!event.ctrlKey || !event.shiftKey || event.key.toLowerCase() != 'c') return; event.stopPropagation(); event.preventDefault(); var elements = document.getElementsByClassName('game_thumb'); var urls = []; for (let element of elements) urls.push(element.dataset.background_image); var url_count = urls.length; urls = urls.join('\n'); GM_setClipboard(urls); alert(`Copied ${url_count} URL(s) to your clipboard`); }, {capture: true}); alert("Itch.io Collection Game Cover Copier, use Ctrl+Shift+C to copy all URLs"); https://violentmonkey.github.io/1 point
-
Some time ago, I created MPV Assistant, which is now up to v1.3. Until now I haven't gotten around to sharing it ... it happens. Mostly when playing videos locally, I just use Media Player Classic HC, and sometimes VLCPlayer for troublesome files, but I don't like VLCPlayer much. I tried out MPV.exe many years ago, for an under-powered PC, but it kind of slipped off the radar, until TheDcoder mentioned it to me in passing a while back. I then retried it, and made it an additional option in one of my programs, and use it now and then, though my preference is still Media Player Classic HC for its clear GUI benefit and ease of use. https://mpv.io/ https://en.wikipedia.org/wiki/Mpv_(media_player) One area where I have started using MPV.exe a lot, is for youTube videos, because I have this persistent issue across browsers when playing many video clips, especially from youTube. For MPV.exe to work with online videos, you have to get a hold of the very powerful and no doubt controversial program, youtube-dl.exe, which is available at GitHub, and place that in the same directory as MPV.exe. That allows you to play streamed videos with the MPV player. MPV is also cross-platform .... not that that is relevant here ..... not until TheDcoder completes his project ImagineIt .... I mean EasyCodeIt. MPV.exe is a great, low on resources video player, that claims to play everything, and I have certainly found it lives up to that claim ... so far. It is however, not that user friendly unless you use one of the GUI frontends for it, as it is command-line only .... though it does display some stuff if you use hotkeys, of which it supports many. As I am always forgetting the hotkeys, I developed my own assistant for it. Very simple, but extremely useful. As you may note, it doesn't list all the hotkeys available, due to space, but it shows the most common or useful ones. The assistant, apart from helping with the obvious, allows changing the URL and quality settings via the new OPTIONS button. The GUI (toolbar if you like) sits at the bottom of your screen and can be minimized of course (3rd button in from right) and restored at need. Some of you may like, especially if it helps with online playing issues. So without any further ado, here it is. Enjoy! MPV Assistant v1.3.zip P.S. By default it is set to use the quality/format value of "worst" (for youtube-dl.exe), but you can change that. I have found that format value is a great compromise ... but it will depend on the site and what other quality options are available. I mostly use it for GOG.com and lowest quality there is not too bad. It means I can watch without issue (no stuttering, freezes or audio dropouts). P.S.S. This should not be confused with MVP Assistant, which is something else entirely.1 point
-
LOL. We should all be so lucky to have an MVP Assistant .... or maybe that's what we are .... MVP's that assist. Ha ha ha ha. Psst. Don't tell anyone.1 point
-
The answer is in this post where you can read it more compreensively. The quick answer is do a consolewrite with this format: "input filename"(line,column): your text An actual example is this: ConsoleWrite(@ScriptFullPath&'('&3&','&1&'): This is line 3, first char'&@CRLF) ConsoleWrite('' &@CRLF) ConsoleWrite('' &@CRLF) ConsoleWrite('' &@CRLF) ConsoleWrite('' &@CRLF) ConsoleWrite('' &@CRLF) ConsoleWrite('' &@CRLF) ConsoleWrite('' &@CRLF)1 point
-
1 point
-
Something like this? : #Region ;Wrapper #pragma compile(UPX, false) #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Icon=Var.ico #AutoIt3Wrapper_Res_Icon_Add=Var.ico ;#AutoIt3Wrapper_Outfile= ;#AutoIt3Wrapper_Res_Comment= ;#AutoIt3Wrapper_Res_Description= #AutoIt3Wrapper_Res_Fileversion=1.0 #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #EndRegion ;Wrapper ;============================================================================= #Region ;FileInstall FileInstall("Var.ico", @ScriptDir & "\Var.ico") #EndRegion ;FileInstall ;============================================================================= #include <File.au3> #include <Array.au3> #include <Misc.au3> #include <WinAPISysWin.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <TrayConstants.au3> #include <ListViewConstants.au3> Opt("TrayMenuMode", 3) Opt("TrayIconHide", 1) Opt("GUIResizeMode", 1) Opt("TrayIconDebug", 1) Opt("TrayAutoPause", 0) Opt("MouseCoordMode", 2) Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Opt("GUIEventOptions", 1) Opt("TrayOnEventMode", 0) Opt("ExpandEnvStrings", 1) Opt("SendKeyDelay", 0) Opt("WinDetectHiddenText", 1) Opt("WinTitleMatchMode", 2) Local $whdl = WinGetHandle('SciTE') Local $Gui = GUICreate('Variables', 200, 300, @DesktopWidth - 200, @DesktopHeight / 2 - 150, $WS_SYSMENU, BitAND($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $whdl) Local $LView = GUICtrlCreateListView('Vars', 3, 3, 197, 297) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 190) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") GUISetState(@SW_SHOW, $Gui) Local $File, $FileOpen, $FileRead, $Window, $SearchCursorInfo, $GetLTLV, $GetItemTxt, $FRL, $StrLoc, $LVCount, $CursorInfo, $StrExp Local $hDLL = "user32.dll" If $cmdline[0] > 0 And FileExists($cmdline[1]) Then $File = $cmdline[1] Else $File = FileOpenDialog('Au3 Var Searcher', @ScriptDir, 'Au3Files (*.au3)') EndIf If FileExists($File) Then Search() Else MsgBox(64 + 262144, '', 'File Not Found') Exit EndIf ;============================================================================= Func Search() $FileOpen = FileOpen($File) $FileRead = FileRead($FileOpen) Local $aArray = StringRegExp($FileRead, '(\$\w+)\W', 3) ;(\$[A-Za-z0-9_]+)[^A-Za-z0-9_] ;(\$[[:alnum:]_]+)[^[:alnum:]_] If $aArray <> '' Then Local $aArray2 = _ArrayUnique($aArray, 0, 1) If $aArray2 <> '' Then For $i = 1 To $aArray2[0] $StrExp = StringRegExp($FileRead, '(\' & $aArray2[$i] & '+)\W', 3) If UBound($StrExp, 1) = 1 Then GUICtrlCreateListViewItem($aArray2[$i], $LView) EndIf Next EndIf EndIf ;============================================================================= Local $LVCount = _GUICtrlListView_GetItemCount($LView) If $LVCount <> 0 Then Local $Count = _FileCountLines($File) For $v = 1 To $LVCount For $l = 1 To $Count $FRL = FileReadLine($FileOpen, $l) $StrLoc = StringInStr($FRL, _GUICtrlListView_GetItemText($LView, $v - 1, 0), 1, 1) If $StrLoc <> 0 Then ConsoleWrite($File & '(' & $l & ', ' & $StrLoc & ') : Vars' & @CRLF) EndIf Next Next EndIf FileClose($FileOpen) EndFunc ;==>Search ;============================================================================= Do ;Main $Window = WinGetState($Gui) If BitAND($Window, 8) Then If _IsPressed("01", $hDLL) = True Then $CursorInfo = GUIGetCursorInfo($Gui) If $CursorInfo[4] = $LView Then $GetLTLV = _GUICtrlListView_GetNextItem($LView, -1, 0, 8) If $GetLTLV <> -1 Then $GetItemTxt = _GUICtrlListView_GetItemText($LView, $GetLTLV, 0) WinActivate("[CLASS:SciTEWindow]") SendSciTE_Command("find:" & $GetItemTxt) EndIf EndIf EndIf EndIf Sleep(100) Until GUIGetMsg() = $GUI_EVENT_CLOSE ;============================================================================= Func SendSciTE_Command($sCmd) Local $My_Hwnd = WinGetHandle("[CLASS:SciTEWindow]") Local $SciTE_hwnd = WinGetHandle("DirectorExtension") Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']') DllStructSetData($CmdStruct, 1, $sCmd) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr') DllStructSetData($COPYDATA, 1, 1) DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1) DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct)) DllCall('User32.dll', 'None', 'SendMessageA', 'HWnd', $SciTE_hwnd, _ 'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, _ 'Ptr', DllStructGetPtr($COPYDATA)) ConsoleWrite('-->' & $sCmd & @CRLF) EndFunc ;==>SendSciTE_Command ;============================================================================= Func Quit() Exit EndFunc ;==>Quit ;============================================================================= Jos1 point
-
Just do a consolewrite() with this format for each line/col variable you have a warning for: "input filename"(line,column): your text Jos1 point