Leaderboard
Popular Content
Showing content with the highest reputation on 11/26/2020 in all areas
-
If you read this here, I guess it is too early to start playing with it... https://stackoverflow.com/questions/61291674/how-can-i-add-webview2-control-in-visual-studio-toolbar https://docs.microsoft.com/en-us/microsoft-edge/webview2/releasenotes There are quite a lot of dependencies needed to make it all work well... If you have not got all the versions aligned it is a no go at the moment ?2 points
-
The easiest way to get started is probably to translate the code in this AutoHotkey thread into AutoIt or at least take the AutoHotkey code as a starting point. We have tried this before a few years ago with relatively good success.2 points
-
EasyCodeIt A cross-platform implementation of AutoIt Introduction: EasyCodeIt is an attempt at implementing a programming language which is backward compatible with a sub-set of AutoIt which would work across multiple platforms with many aspects being agnostic to the platform-specific differences. Currently the primarily targeted platforms are Linux and Windows, more platforms may be supported in the future as per popular demand. For example it should be easy enough to port to Unix-like platforms such as BSD and Mac with the help of maintainers who are familiar with them. The main motivation behind the creation of this project is the lack of a proper easy-to-use scripting language in Linux, while there are numerous scripting languages which natively support it, none of them are as user-friendly and easy to use as AutoIt. (The "Easy" in "EasyCodeIt" reflects this) There was a previous thread in which the project was originally started, but it got too big and the discussion is too cluttered and hard to follow for any new readers, here is the thread for those who are interested in reading it: Progress: Frontend ✅ Tokenizer 🚧 Parser (work in progress) ✅ Expressions 👷♂️ Statements (current priority) Backend ⏰ Interpreter (scheduled) I am currently working on expression parsing and syntax tree building. -- This section will be updated in the future with new progress. To stay notified 🔔 follow this thread to get update notifications (by using the "Follow" button on the top-right corner of this page) and 👁️ watch the GitHub repository to get any new activity on your feed. Code: The code is available on GitHub, please 🌟 star the project if you like it and would like to show your support, it motivates me a lot! (Also don't forget to 👍 Like this post ) Chat: I created a room in Matrix (an open-source federated chat system) for EasyCodeIt, you can join it to chat with me and others who are in the room, it might be a good way to get the latest status updates from me You can preview the room without joining, and you don't need to be connected to it 24/7 like IRC. It works a bit like Slack for those who are familiar with it. Forum: I have created a dedicated forum to post more frequent updates, possibly in their own threads to better organize the discussion. Please sign-up and follow the blog section to get updates. By the way, you can also post pretty much anything there, both technical and non-technical stuff, it is intended to be a hangout for techies but not only for them. So casual discussions, funny cat videos etc. are allowed!1 point
-
Don't try to overthink it before first trying to use the information provided. Keep it simple -- at least at first. In this case, you don't need to know what those parts of the declaration mean. All you really need to know about those odd declarations are the data types. The description of the function that you provided states that the function only really requires 2 integer values for input. It goes on to state that the result will be placed into a wchar buffer that you need to supply the pointer to and the size of that wchar buffer. #include <Constants.au3> #include <array.au3> #include <WinAPIConv.au3> Example_GetCLRVersionForPSVersion(2, 0) Func Example_GetCLRVersionForPSVersion($iPsMajorVersion, $iPsMinorVersion) Local $aResult Local $tWcharBuffer ;Create wchar buffer to hold result $tWcharBuffer = DllStructCreate("wchar buffer[30];") ;Call function $aResult = DllCall("pwrshplugin.dll", "int:cdecl", "GetCLRVersionForPSVersion", _ "int", $iPsMajorVersion, _ "int", $iPsMinorVersion, _ "ulong_ptr", DllStructGetSize($tWcharBuffer), _ "ptr", DllStructGetPtr($tWcharBuffer), _ "ulong_ptr*", Null) If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "DllCall failed - @error = " & @error) ElseIf _WinAPI_LoWord($aResult[0]) <> 0 Then ;HRESULT return code Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "Bad return code from DllCall - RC = " & $aResult[0] & " (0x" & Hex($aResult[0]) & ")") EndIf _ArrayDisplay($aResult, "DllCall Result") ;Display the results ConsoleWrite("GetCLRVersionForPSVersion Example" & @CRLF) ConsoleWrite("PowerShell Version : " & "v" &$iPsMajorVersion & "." & $iPsMinorVersion & @CRLF) ConsoleWrite("CLR Runtime Version: " & ($tWcharBuffer.buffer = "" ? "PS Version Not Installed" : $tWcharBuffer.buffer) & @CRLF) EndFunc Console: GetCLRVersionForPSVersion Example PowerShell Version: v2.0 CLR Runtime Version: v2.0.507271 point
-
Sorry I searched google, but it did no search deep, when I searched with forum's search, it came up with many answers. for future references for those looking for disabling save password dialog within chrome, they must add this : "prefs": {"credentials_enable_service": false, "profile.password_manager_enabled": false},1 point
-
@Siwa Use the forum's search feature and you should be able to a figure it out.1 point
-
[SOLVED] Download the latest version of WinRar
UE_morf_boon reacted to Marc for a topic
#include <Inet.au3> HttpSetUserAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko") $source = _INetGetSource("https://www.rarlab.com",1) $pos = StringInStr($source, "English (", 0, 1) ; use 2 for the current release version. 1 = beta version) if $pos = 0 Then Exit MsgBox(16,"Oops", "Could not find tag in source code") $pos = StringInStr($source, "/rar/", 0, 2, $pos) ; use 1 for 32 Bit Version, 2 = 64 Bit $endstring = StringInStr($source, ".exe", 0, 1, $pos) $filename = StringMid($source, $pos+5, $endstring-$pos-1) $url = "https://www.rarlab.com/rar/" & $filename InetGet($url, $filename) Not stylish, but works.1 point -
You can look for yourself. They are in the Include folder of your AutoIT installation. But yeah, they are wrappers around dllcalls so that we can live in the matrix of cute function calls.1 point
-
set a pic ontop on a listview ??
AlienStar reacted to pixelsearch for a topic
Hi AlienStar Sooner or later, you will need to resize your GUI, maximize it, restore it etc... When this day comes, you won't be able to do it with the script above because the pic won't cover the listview headers anymore (tested right now), also style $WS_CHILD will then create some display issues after the parent GUI is resized. To prevent this, here is an amended script taking care of a resizable / maximizable parent GUI. It requires : * A child window created with $WS_POPUP style and $WS_EX_MDICHILD extended style. * A pic control which resizes and repositions itself according to any new child window size. * Message WM_SIZE needs to be registered. * Events $GUI_EVENT_MAXIMIZE and $GUI_EVENT_RESTORE are added inside the While... Wend loop. Thanks to Melba23 & Nine for some ideas in the script and I hope it will work for you. #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> ;====================== $hGUI = GUICreate("Test", 620, 140, -1, -1, BitOr($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) $idListView = GUICtrlCreateListView("#|sections", 30, 20, 579, 93) $hListView = GUICtrlGetHandle($idListView) $hHeader = _GUICtrlListView_GetHeader($idListView) $iHeaderHeight = _WinAPI_GetWindowHeight($hHeader) ; ControlDisable($hGUI, "", $hHeader) For $i = 1 To 20 GUICtrlCreateListViewItem($i & "|" & $i*100, $idListView) Next ;====================== $hGUI_Child = GUICreate("", 579, $iHeaderHeight, 30, 20, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $idPic = GUICtrlCreatePic("head_main.jpg", 0, 0, 579, $iHeaderHeight) GUICtrlSetResizing($idPic, $GUI_DOCKAUTO) ; +++ ; GUICtrlSetState($idPic, $GUI_DISABLE) _Resize() ; prevent pic from overlapping above an eventual vertical scrollbar arrow GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hGUI_Child) GUIRegisterMsg($WM_SIZE, "WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESTORE _Resize() Case $idPic ConsoleWrite("Pic clicked" & @lf) ; GUISetState(@SW_HIDE, $hGUI_Child) ; Sleep(1000) ; GUISetState(@SW_SHOW, $hGUI_Child) EndSwitch WEnd GUIDelete($hGUI) GUIDelete($hGUI_Child) ;============================================ Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd = $hGUI Then _Resize() EndIf EndFunc ;============================================ Func _Resize() Local $aTag = _WinAPI_GetWindowRect($hHeader) Local $Left = DllStructGetData($aTag, "Left"), _ $Top = DllStructGetData($aTag, "Top"), _ $Right = DllStructGetData($aTag, "Right"), _ $Bottom = DllStructGetData($aTag, "Bottom") ; WinMove($hGUI_Child, "", $Left, $Top, $Right - $Left, $Bottom - $Top) ; a more precise way (pic won't overlap above an eventual vertical scrollbar arrow) Local $aLVPos = WinGetPos($hListView) ; including eventual scrollbars Local $aClientSize = WinGetClientSize($hListView) ; excluding eventual scrollbars WinMove($hGUI_Child, "", $Left, $Top, _ $Right - $Left - ($aLVPos[2] - $aClientSize[0] - 4), _ $Bottom - $Top) EndFunc1 point -
What to look into to replace a relative spreadsheet?
Tripredacus reacted to JLogan3o13 for a topic
What about a small sqlite db? I have moved a number of scripts away from using spreadsheets to sqlite, and am able to do calculations pretty easily (depending on their complexity of course).1 point -
Background Intelligent Transfer Service (BITS)
DonChunior reacted to Nine for a topic
@DonChunior I was able to DL a file. The problem you where facing was certainly the wrong order of the methods. The full script :1 point -
Background Intelligent Transfer Service (BITS)
DonChunior reacted to Nine for a topic
Ok it is working now with a this CLSID : Global Enum $BG_JOB_TYPE_DOWNLOAD, $BG_JOB_TYPE_UPLOAD, $BG_JOB_TYPE_UPLOAD_REPLY Global Const $sCLSID_BackgroundCopyManager = "{659cdea7-489e-11d9-a9cd-000d56965251}" ; 2.5 ;Global Const $sCLSID_BackgroundCopyManager = "{5FD42AD5-C04E-4D36-ADC7-E08FF15737AD}" ; 10.3 Global Const $sIID_IBackgroundCopyManager = "{5CE34C0D-0DC9-4C1F-897C-DAA1B78CEE7C}" Global Const $tagBackgroundCopyManager = _ "CreateJob hresult(wstr;int;clsid*;ptr*);" & _ "GetJob hresult(clsid;ptr*);" & _ "EnumJobs hresult(dword,ptr*);" & _ "GetErrorDescription hresult(hresult,dword,str*)" Global Const $sIID_IBackgroundCopyJob = "{37668D37-507E-4160-9316-26306D150B12}" Global Const $tagIBackgroundCopyJob = _ "AddFileSet hresult(ulong;struct*);" & _ "AddFile hresult(wstr;wstr);" & _ "EnumFiles hresult(ptr*);" & _ "Suspend hresult();" & _ "Resume hresult();" & _ "Cancel hresult();" & _ "Complete hresult();" & _ "GetId hresult(clsid*);" & _ "GetType hresult(int*);" & _ "GetProgress hresult(struct*);" & _ "GetTimes hresult(struct*);" & _ "GetState hresult(int*);" & _ "GetError hresult(ptr*);" & _ "GetOwner hresult(wstr*);" & _ "SetDisplayName hresult(wstr);" & _ "GetDisplayName hresult(wstr*);" & _ "SetDescription hresult(wstr);" & _ "GetDescription hresult(wstr*);" & _ "SetPriority hresult(int);" & _ "GetPriority hresult(int*);" & _ "SetNotifyFlags hresult(ulong);" & _ "GetNotifyFlags hresult(ulong_ptr*);" & _ "SetNotifyInterface hresult(ptr);" & _ "GetNotifyInterface hresult(ptr*);" & _ "SetMinimumRetryDelay hresult(ulong);" & _ "GetMinimumRetryDelay hresult(ulong_ptr*);" & _ "SetNoProgressTimeout hresult(ulong);" & _ "GetNoProgressTimeout hresult(ulong_ptr*);" & _ "GetErrorCount hresult(ulong_ptr*);" & _ "SetProxySettings hresult(int;str*;str*);" & _ "GetProxySettings hresult(int*;wstr*;wstr*);" & _ "TakeOwnership hresult();" Main() Func Main() Local $oBackgroundCopyManager = ObjCreateInterface($sCLSID_BackgroundCopyManager, $sIID_IBackgroundCopyManager, $tagBackgroundCopyManager) ConsoleWrite (IsObj($oBackgroundCopyManager) & @CRLF) Local $sJobId = "" Local $pJob = 0 ConsoleWrite ("create job " & $oBackgroundCopyManager.CreateJob("TestCreationJob", $BG_JOB_TYPE_DOWNLOAD, $sJobId, $pJob) & @CRLF) ConsoleWrite($sJobId & @CRLF) ConsoleWrite(VarGetType($pJob) & @CRLF) Local $oBackgroundCopyJob = ObjCreateInterface($pJob, $sIID_IBackgroundCopyJob, $tagIBackgroundCopyJob) ConsoleWrite(VarGetType($oBackgroundCopyJob) & @CRLF) MsgBox ($MB_SYSTEMMODAL,"","check") ConsoleWrite ("cancel " & $oBackgroundCopyJob.Cancel() & @CRLF) EndFunc ;==>Main1 point -
Maybe you can use something like this. It might be necessary to exclude the window being dragged from the list. #include <misc.au3> HotKeySet("{ESC}", "_Exit") Local $aMousePos, $_hWnd_OnPos While 1 Sleep(10) If _IsPressed("01") Then $aMousePos = MouseGetPos() $_hWnd_OnPos = _hWnd_Visible_AtPos($aMousePos[0], $aMousePos[1]) ConsoleWrite($_hWnd_OnPos & @TAB & WinGetTitle($_hWnd_OnPos) & @CRLF) While _IsPressed("01") Sleep(10) WEnd EndIf WEnd Func _hWnd_Visible_AtPos($x, $y) Local $aWinlist = WinList() Local $aWinlist_Final[100][6], $iEnum, $aPos For $i = 1 To $aWinlist[0][0] If BitAND(WinGetState($aWinlist[$i][1]), 2) Then ; is visible $aWinlist_Final[$iEnum][0] = $aWinlist[$i][0] $aWinlist_Final[$iEnum][1] = $aWinlist[$i][1] $aPos = WinGetPos($aWinlist[$i][1]) $aWinlist_Final[$iEnum][2] = $aPos[0] ; x $aWinlist_Final[$iEnum][3] = $aPos[1] ; y $aWinlist_Final[$iEnum][4] = $aPos[2] ; w $aWinlist_Final[$iEnum][5] = $aPos[3] ; h $iEnum += 1 If Not Mod($iEnum, 100) Then ReDim $aWinlist_Final[UBound($aWinlist_Final) + 100][6] EndIf Next ReDim $aWinlist_Final[$iEnum - 1][6] For $i = 0 To $iEnum - 1 If $x >= $aWinlist_Final[$i][2] And $x <= ($aWinlist_Final[$i][2] + $aWinlist_Final[$i][4]) And _ $y >= $aWinlist_Final[$i][3] And $y <= ($aWinlist_Final[$i][3] + $aWinlist_Final[$i][5]) Then Return $aWinlist_Final[$i][1] Next Return 0 EndFunc ;==>_hWnd_Visible_AtPos Func _Exit() Exit EndFunc ;==>_Exit1 point