Leaderboard
Popular Content
Showing content with the highest reputation on 11/30/2022 in all areas
-
OpenSSL Compliance - (Moved)
argumentum reacted to Radix for a topic
The final tools that I originally intended to write: (UPDATE) Thanks for the tips! EncryptCLI.au3 EncryptFileGUI.au3 EncryptTextGUI.au3 B64UFD.au31 point -
there are sooooo many caveats to the flexibility I've build in with ignoring the _. I have now made a change that the _ is only ignored in the target Function, but when typed it needs to be there in the target. (update uploaded)1 point
-
If you want to be able to display a console and write there in all 4 cases (GUI or CUI, compiled or not) you just need to use this: Func CW($s = "") If @Compiled Then _CUI_ConsoleWrite($s) Else _ConsoleWrite($s) EndIf EndFunc ;==>CW Func _CUI_ConsoleWrite(ByRef $s) Local Static $hDll = DllOpen("kernel32.dll") Local Static $hCon = __CUI_ConsoleInit($hDll) DllCall($hDll, "bool", "WriteConsoleW", "handle", $hCon, "wstr", $s & @LF, "dword", StringLen($s) + 1, "dword*", 0, "ptr", 0) Return EndFunc ;==>_CUI_ConsoleWrite ; internal use only Func __CUI_ConsoleInit(ByRef $hDll) DllCall($hDll, "bool", "AllocConsole") ;~ DllCall("Kernel32.dll", "bool", "SetConsoleCP", "uint", 65001) ;~ DllCall("Kernel32.dll", "bool", "SetConsoleOutputCP", "uint", 65001) Return DllCall($hDll, "handle", "GetStdHandle", "int", -11)[0] EndFunc ;==>__CUI_ConsoleInit ; Unicode-aware ConsoleWrite Func _ConsoleWrite(ByRef $s) ConsoleWrite(BinaryToString(StringToBinary($s & @LF, 4), 1)) EndFunc ;==>_ConsoleWrite CW($text) outputs the string $text to the (resp. a new) console if compiled for CUI (reps. GUI) or the SciTE console if not compiled.1 point
-
Centered FileOpenDialog() using self-terminating WM_TIMER call
KaFu reacted to pixelsearch for a topic
I guess you wrote this in case the 2nd parameter in _WinAPI_SetTimer is set to 0 ($iTimerID) then the function returns 1 (tested) and _WinAPI_KillTimer() fails because of this 0/1 discrepancy. msdn SetTimer adds 4 crucial words at the very beginning of this 2nd parameter description : A nonzero timer identifier. Unfortunately these 4 words aren't found in AutoIt help file, topic _WinAPI_SetTimer, maybe because at the very end of the description, we also read the following sentence, where this 2nd parameter can sometimes be = 0 in a special case : If the call is not intended to replace an existing timer, $iTimerID should be 0 if the $hWnd is 0. Nevertheless (imho) this important short sentence "A nonzero timer identifier" should be indicated in AutoIt help file, at the same place where it's found on msdn, making it clearer for the user.1 point -
Please stop added these type of thank you posts as it doesn't contribute at all to the thread and only resurrects it. there is a "Like" option for that available you should use.1 point
-
if the default action for AU3 files is run, then it should be sufficent to add the full-path-name to your AU3 file when defining your windows task. If not, then the program to call is "C:\Program Files (x86)\AutoIt3\AutoIt3.exe" and the parameter will be /AutoIt3ExecuteScript "C:\path with spaces\path\path\your autoit 3 script.au3" From SciTE editor you can press CTRL+1 ("1", not "F1") to get this dialog, there you can adjust the default behaviour:1 point
-
ghost911 look at the file (AU3toPB) more detailed1 point
-
1 point
-
Maybe something like this? #include <Excel.au3> ; Pass the following parameters: ; * Object of the Workbook ; * Number or Name of the Worksheet ; * Name or Index number of the table ; * Name or Index number of the Column Func FindLastRowInExcelTable($oWorkbook, $vWorksheet, $sTable, $iColumn) Local $xlByRows = 1 ; Searches across a row, then moves to the next row. Local $xlPrevious = 2 ; Search for previous matching value in range. Local $iLastRow, $oWorksheet, $oTable $oWorksheet = $oWorkbook.Sheets($vWorksheet) $oTable = $oWorksheet.ListObjects($sTable) With $oTable.ListColumns($iColumn).Range $iLastRow = .Find("*", .Cells(1), $xlFormulas, $xlPart, $xlByRows, $xlPrevious, False).Row EndWith EndFunc ;==>FindLastRowInExcelTable1 point
-
remin, If this a GUI you are creating then I suggest you use a flag of some sort to indicate the current status of the GUI - then the HotKey can adjust its action. I use a label in this snippet: #include <GUIConstantsEx.au3> HotKeySet("^t", "_SendToTop") $hGUI = GUICreate("Test", 100, 100) $cLabel = GUICtrlCreateLabel("Not on Top", 10, 10, 80, 80) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _SendToTop() ; Check status of GUI If GUICtrlRead($cLabel) = "On Top" Then ; Remove OnTop attribute WinSetOnTop($hGUI, "", 0) ; Change label GUICtrlSetData($cLabel, "Not on Top") Else ; Send to top Winactivate($hGUI) ; And keep it there WinSetOnTop($hGUI, "", 1) ; Change label GUICtrlSetData($cLabel, "On Top") EndIf EndFunc How does that work for you? Please ask if you have any questions. Always the case when comparing languages - something simple in one is ofter more complicated in the other. I am sure we could find examples where AutoIt is much simpler than AHK - but then as this is not a competition, I am not really bothered. M231 point
-
; Windows - copy with progress ; Author - JdeB ;~ 4 Do not display a progress dialog box. ;~ 8 Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists. ;~ 16 Respond with "Yes to All" for any dialog box that is displayed. ;~ 64 Preserve undo information, if possible. ;~ 128 Perform the operation on files only if a wildcard file name (*.*) is specified. ;~ 256 Display a progress dialog box but do not show the file names. ;~ 512 Do not confirm the creation of a new directory if the operation requires one to be created. ;~ 1024 Do not display a user interface if an error occurs. ;~ 2048 Version 4.71. Do not copy the security attributes of the file. ;~ 4096 Only operate in the local directory. Don't operate recursively into subdirectories. ;~ 8192 Version 5.0. Do not copy connected files as a group. Only copy the specified files. _FileCopy("C:\Installed Apps\Patches\WindowsXP-KB835935-SP2-ENU.exe","C:\temp") Func _FileCopy($fromFile,$tofile) Local $FOF_RESPOND_YES = 16 Local $FOF_SIMPLEPROGRESS = 256 $winShell = ObjCreate("shell.application") $winShell.namespace($tofile).CopyHere($fromFile,$FOF_RESPOND_YES) EndFunc MSDN Documentation http://msdn.microsoft.com/en-us/library/ms723207(VS.85).aspx ; to copy a directory ; the destination directory must exist _FileCopy("C:\Installed Apps\Patches\*.*","C:\temp\test") 8)1 point