Leaderboard
Popular Content
Showing content with the highest reputation on 11/09/2020 in all areas
-
Version 1.4.0.0
1,677 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate the Outlook GUI. There are other UDFs available to automate Outlook: OutlookEX: Automates the processing of items (folders, mails, contacts ...) in the background. Can be seen like an API. OutlookTools: Allows to import/export contacts and events to VCF/ICS files. Theads: Development - General Help & Support - Example Scripts - Wiki Known Bugs: (last changed: 2020-03-27) None Things to come: (last changed: 2020-03-27) None BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort1 point -
1 point
-
Windows 7 (a major release) was launched 2009 and lasted over 12 years. Millions of users are still using it and will continue using it for a number of years. Windows 10 (a major release) was launched in 2015 and IE is still available under that platform. So you can expect Win10 to be here for quite a few years with IE in it. But some Web sites start refusing an IE connection. I think this is key. Unless the Web site you have automated will in a short term unsuport IE, then you should definitely move on to WebDriver. If you have some control over the Web site in question, and you have invested quite a large effort to develop your script, then I wouldn't personally start reprogramming everything now. I would make my priority over an area of the company which requires immediate automation. But I agree panic is never a good thing.1 point
-
Hey WinMacBear, Sorry if I confused you with the "close connection" part of my first post, should have left those 4 lines out as I merely copy pasted from your post. The important part was how to return different values, and exitloop for avoiding unnecessary computation (if that was the case). I am an AutoIt newbie, and have very little knowledge of connecting to databases. Most of my posts are about the algorithm involved and usually not in AutoIt syntax. I leave the conversion to the experts and/or the person asking for advice if they deem it worthy. Please consider this as a late disclaimer.1 point
-
May I have some help about Recordset question?
WinMacBear reacted to mLipok for a topic
New ADO_EXAMPLE_WinMacBear_Test_XLS.au3 #AutoIt3Wrapper_UseX64=N #Tidy_Parameters=/sort_funcs /reel #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <Array.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #include "ADO.au3" ; SetUP ADO.au3 UDF COMError Handler _ADO_ComErrorHandler_UserFunction(_ADO_COMErrorHandler_Function) _Example_MSExcel() Func _Example_MSExcel() Local $sFileFullPath = @ScriptDir & '\ADO_EXAMPLE_WinMacBear_TEST.xls' ; Here put FileFullPath to your Access File or use Default to open FileOpenDialog Local $sProvider = 'Microsoft.Jet.OLEDB.4.0' Local $sExtProperties = Default Local $HDR = Default Local $IMEX = Default Local $sConnectionString = _ADO_ConnectionString_Excel($sFileFullPath , $sProvider, $sExtProperties, $HDR, $IMEX) _Example_2_RecordsetDisplay($sConnectionString, "Select * FROM [testable$]") EndFunc ;==>_Example_MSExcel #Region Common / internal Func _Example_2_RecordsetDisplay($sConnectionString, $sQUERY) ; Create connection object Local $oConnection = _ADO_Connection_Create() ; Open connection with $sConnectionString _ADO_Connection_OpenConString($oConnection, $sConnectionString) If @error Then Return SetError(@error, @extended, $ADO_RET_FAILURE) ; Executing some query directly to Array of Arrays (instead to $oRecordset) Local $aRecordset = _ADO_Execute($oConnection, $sQUERY, True) ; Clean Up _ADO_Connection_Close($oConnection) $oConnection = Null ; Display Array Content with column names as headers _ADO_Recordset_Display($aRecordset, 'Recordset content') EndFunc ;==>_Example_2_RecordsetDisplay #EndRegion Common / internal1 point -
Hack that tells you what line# a compiled script actually crashed on...
JockoDundee reacted to mLipok for a topic
This script is UTF + BOM1 point -
I'm assuming "item" means service. If so, then here's a very simple way to open the service.msc and select an existing service. #RequireAdmin #include <Constants.au3> If Not ShellExecute("services.msc") Then Exit 1 $hMMC = WinWait("[TITLE:Services; CLASS:MMCMainFrame]", "", 3) If Not $hMMC Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "Timed out waiting for services.msc window.") Send("{tab}Print Spooler") Tested & working on Windows 7.1 point
-
A cross-platform implementation of the AutoIt language
seadoggie01 reacted to TheDcoder for a topic
@seadoggie01 I missed my bi-weekly updated... isn't that surprising? Seriously though, I did remember it but I didn't have any working or complete code, so I couldn't share it. In other words, it is still a work in progress. There has been progress since the last post: I have started work on the statement parser, I am currently working on parsing declarations, as well as making other required tweaks in the tokenizer. Oh, and I also implemented a rudimentary error handling method using longjmp, because it gets complex in C. There is a lot of new code that I wish I could share, but it is all a mess so I can't do it in a meaningful way. -- And I am doing all that while dealing with some issues on my professional end, no doubt many would be in the same situation thanks to the deadly cough going around. I am resuming work on ECI now, after taking a break for 2 day, so hopefully I will have a more proper update out soon next week1 point -
@t0nZ One of the pages I came accross while searching how to avoid false positives. https://www.pelock.com/autoit-obfuscator/ Don't need it myself (the project I am working on will be completely open), but maybe can help you if you are a commercial developer.1 point
-
Sorry, the bit about the GO command was in relation to sqlcmd, osql, or SSMS. Applications based on the ODBC or OLE DB APIs will receive a syntax error if they try to execute a GO command, as you have seen.1 point
-
Hi folks, Last morning I needed to know programmatically which were my DNS(s) for the current connection, and I searched for an API which fitted my needs... I just tried dnsqueryconfig, which shows the DNS(s) used, if you have manually selected them in the past. The API is little tricky (or maybe I'm little rusty), so I decided to write a small UDF function to avoid a waste of time in the future... here you are. ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinAPI_DnsQueryConfig ; Description ...: Retrieves the currently used DNS servers, if they were selected by user ; Syntax.........: _WinAPI_DnsQueryConfig() ; Return values .: On success it returns an array with the list of currently used DNS servers ; ; On failure it returns 0 and sets @error to non zero (these values are useful only for debugging reasons): ; |1 - DllCall error ; |2 - Generic error, DNS could be generated automatically ; Author ........: j0kky ; Modified ......: 1.0.0 14/11/2018 ; Link ..........: https://docs.microsoft.com/en-us/windows/desktop/api/windns/nf-windns-dnsqueryconfig ; =============================================================================================================================== Func _WinAPI_DnsQueryConfig() Local Const $DnsConfigDnsServerList = 6 Local $aRet = DllCall("Dnsapi.dll", "LONG", "DnsQueryConfig", "int", $DnsConfigDnsServerList, "dword", 0, "ptr", Null, "ptr", 0, "ptr", Null, "dword*", 0) If @error Then Return SetError(1, 0, 0) if $aRet[6] <= 4 Then Return SetError(2, 0, 0) Local $tagBuffer = "" For $i = 1 To ($aRet[6] / 4) $tagBuffer &= "dword;" Next Local $tBuffer = DllStructCreate($tagBuffer) $aRet = DllCall("Dnsapi.dll", "LONG", "DnsQueryConfig", "int", $DnsConfigDnsServerList, "dword", 0, "ptr", Null, "ptr", 0, "ptr", DllStructGetPtr($tBuffer), "dword*", $aRet[6]) Local $aDNS[($aRet[6] / 4) - 1] For $i = 2 to (UBound($aDNS) + 1) $aRet = DllCall("Ws2_32.dll", "str", "inet_ntoa", "dword", DllStructGetData($tBuffer, $i)) if @error Then Return SetError(1, 0, 0) $aDNS[$i - 2] = $aRet[0] Next Return SetError(0, 0, $aDNS) EndFunc1 point
-
Hi, I recently used _WinAPI_GetProcessFileName, I noticed it uses GetModuleFileNameEx function to retrieve the path, and it requires PROCESS_QUERY_INFORMATION and PROCESS_VM_READ. Well, from Vista there is another function, QueryFullProcessImageName, which requires only PROCESS_QUERY_LIMITED_INFORMATION access rights, and it allows to retrieve some process which GetModuleFileNameEx can't get because of its requirements. Here is an example which shows the issue: #include <WinAPIProc.au3> $array = ProcessList() For $i = 1 To $array[0][0] If $array[$i][1] Then $output1 = _WinAPI_GetProcessFileName2($array[$i][1]) $output2 = _WinAPI_GetProcessFileName($array[$i][1]) If @error Then $output2 = -1 If Not ($output1 = $output2) Then If Not ($output1 = -1) Then ConsoleWrite($output1 & "--> _WinAPI_GetProcessFileName2" & @CRLF) If Not ($output2 = -1) Then ConsoleWrite($output2 & "--> _WinAPI_GetProcessFileName" & @CRLF) EndIf EndIf Next Func _WinAPI_GetProcessFileName2($iPID) Local $dwDesiredAccess = __Iif($__WINVER < 0x0600, 0x0410, 0x1000), $sPath = "" Local $aRet = DllCall("Kernel32.dll", "HANDLE", "OpenProcess", "DWORD", $dwDesiredAccess, "BOOL", False, "DWORD", $iPID) If @error Or $aRet[0] = Null Or $aRet[0] = 0 Or $aRet[0] = Ptr(0) Then Return SetError(-1, 0, -1) Local $hProcess = $aRet[0] If $dwDesiredAccess = 0x0410 Then $aRet = DllCall(@SystemDir & "\psapi.dll", "DWORD", "GetModuleFileNameExW", "HANDLE", $hProcess, "HANDLE", 0, "wstr", "", "DWORD", 65535) Else $aRet = DllCall("Kernel32.dll", "BOOL", "QueryFullProcessImageNameW", "HANDLE", $hProcess, "DWORD", 0, "wstr", "", "dword*", 65535) EndIf If Not (@error Or $aRet[0] = 0) Then $sPath = $aRet[3] DllCall("Kernel32.dll", "BOOL", "CloseHandle", "HANDLE", $hProcess) Return $sPath = "" ? SetError(-1, 0, -1) : $sPath EndFunc ;==>_GetProcessPath1 point