Leaderboard
Popular Content
Showing content with the highest reputation on 02/25/2022 in all areas
-
Extended Message Box - New Version: 16 Feb 24
hudsonhock reacted to Melba23 for a topic
Are you annoyed by the limitations of the standard Windows message dialog created by MsgBox? Would you like to have coloured backgrounds and text? To choose the justification and font? Do you want to be able to place the message box other than in the centre of the screen? Centred on your GUI, for example, or at a particular location on screen? What about having user-defined text on as many buttons as you need? And user-defined icons? Or a visible countdown of the timeout? Finally, would you like to choose whether the message box has a button on your already too-crowded taskbar? If the answer to any of these questions is "YES" then the ExtMsgBox UDF is for you! [NEW VERSION] 16 Feb 24 Changed: Some additional functionality added to the "TimeOut" parameter of _ExtMsgBox: - A positive integer sets the EMB timeout as before. - A negative integer will double the size of the countdown timer if it is used. - A colon-delimited string (eg: "10:5") will set the normal EMB timeout (first integer) and will also initially disable the EMB buttons for the required period (second integer). New UDF and examples in the zip. Older version changes: ChangeLog.txt As always, I realise nearly all of the DLL calls in these UDFs could be made by using commands in other UDFs like WinAPI.au3 - but as with all my UDFs (which you can find in my sig below) I am trying to prevent the need for any other include files. The UDF and examples (plus StringSize) in zip format: ExtMsgBox.zip Courteous comments and constructive criticisms welcome - guess which I prefer! M231 point -
@Danp2 could be right with his assumption regarding TLS, see e.g. reading-data-from-web-https-on-windows-7 @TheXman 's post (and the rest of the thread) might also shed some light into the dark, see problem-with-winhttp1 point
-
@CYCho Thanks for all of your efforts and your kind words. I will trust your translation and whether or not you captured everything because from the exchanges we have had I would bet that you did. I am also super impressed with how fast you were able to get it done.1 point
-
crypt weirdness?
crackdonalds reacted to Melba23 for a topic
crackdonalds, Nothing to do with the Crypt library. The return value from _Crypt_DecryptData is binary and should be converted to a string before being written to the console. It would seem that for some reason ConsoleWrite is being extra-nice in the first call and doing the translation for you - even though the Help file says: If you do the conversion explicitly you do get matching returns: #include <crypt.au3> Global $trash = _Crypt_DecryptData("0x79C031100AB21FCCA613C0ECBCDF498E", "A3D2E1F021BB095", $CALG_AES_256) ConsoleWrite(BinaryToString($trash) & @CRLF) funcy() func funcy() ConsoleWrite(BinaryToString($trash) & @CRLF) EndFunc M231 point -
TheDcoder, If I understand your question correctly, _WinAPI_ClientToScreen would seem to be the answer. Set the the client coordinates in the $tagPOINT structure to 0, 0 and the actual screen coordinates are returned. M231 point
-
_WinAPI_HiWord and LoWord: signing mismatch?
matwachich reacted to Nine for a topic
Lol 10 years after. One of my favorite rock groups. Kind of useless answer IMHO.1 point -
@Jfish, My translation is almost done, and I uploaded my draft onto the Korean AutoIt cafe for proofreading. Thank you for your permission for translation. I must admit that I liked the way you present the core concepts of AutoIt and I learned a lot by translating it. I hope that my translation will not damage the authenticity and reputation of your book. Attached is the image of the cover page where I stated your name as the author and my name as the translator. Please note that I also kept the footnote for every page where your copyright information is stated. Thanks and regards, CYCho1 point
-
#include <GUIConstantsEx.au3> Local $GUI = GUICreate(" My GUI input control", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1) Local $idInput = GUICtrlCreateInput("", 10, 5, 300, 20) Local $CurInfo GUISetState(@SW_SHOW) While 1 $CurInfo = GUIGetCursorInfo($GUI) If $CurInfo[4] = $idInput And $CurInfo[2] = 1 Then MsgBox(64 + 262144, '', '') EndIf ;============================================================================= Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(100) WEnd Or like this1 point
-
Function Name Lister 06/27/2014
obiwanceleri reacted to jaberwacky for a topic
Hi. Have you ever tried to manually maintain a list of function names for your various projects? What I mean is when you start an AutoIt project you might have tried to maintain a running list of all of the functions that are in your project. This is fine when your project is small. When the project grows out of control then you may be like me and you simply stop maintaining that list. So I am hacking together a simple script to automate that process. Instructions: 1) Paste this into your user options file (Scite -> Options -> Open User Options File): # 37 FunctionNameLister command.37.$(au3)="$(SciteDefaultHome)\FunctionNameLister\FunctionNameLister.exe" "$(FilePath)" command.name.37.$(au3)=FunctionNameLister command.shortcut.37.$(au3)=Ctrl+Shift+Alt+f command.save.before.37.$(au3)=1 command.is.filter.37.$(au3)=1 Note: the number 37 may be changed to a number which suits you. 2) Create a folder named FunctionNameLister in the "...AutoIt3SciTE" directory. 3) Place the FunctionNameLister.exe into the folder that was created in step 2. FunctionNameLister.zip downloads:26 4) Browse to an AutoIt source. Paste the following two lines wherever you would like for your list of function names to appear in your source: #region ; Functions #endregion ; Functions Press Ctrl + Shift + Alt + f. Updates: Here is just the main code for those interested. The zip file contains the required exe. #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 6 -w 7 -d -q #Region ; Functions ; alert ; backup_original_copy ; create_function_list_string ; erase_function_list ; file_stream_read_line ; get_source_path ; main ; write_function_list_to_string #EndRegion ; Functions #include-once #include "SciTE Director.au3" #include <Array.au3> #include <File.au3> #include <String.au3> ; These tags are required to be in the au3 source in order for FunctionNameLister to work properly. ; They may be changed by editing the settings.ini file. Const $tag_begin = IniRead(@ScriptDir & "\settings.ini", "Tags", "TagBegin", "#Region ; Functions") Const $tag_end = IniRead(@ScriptDir & "\settings.ini", "Tags", "TagEnd", "#EndRegion ; Functions") ; Constants for FileStream functionality. Const $file_stream_eof = -1 Const $file_stream_other_error = 1 main() Switch @error Case 0 alert("FunctionNameLister was successful.") Case 1 alert("You must provide a path to an au3 source.", True) Case 2 alert("Could not make a back up of the original file.", True) Case 3 alert("Could not find the required tags.", True) EndSwitch Func main() Local Const $source_path = get_source_path() If @error Then Return SetError(1, 0, False) EndIf Switch backup_original_copy($source_path) Case True Local Const $autoit_source = erase_function_list($source_path) ; find the function names and write them to an array -- thanks Yashied Local Const $func_list = StringRegExp(StringRegExpReplace($autoit_source, "(?ims)#c[^#]+#c", ''), "(?ims)^\s*func\s*([^(]*)", 3) Local Const $func_string = create_function_list_string($func_list, True) Local Const $file_overwrite = FileOpen($source_path, $FO_OVERWRITE) Switch $file_overwrite <> -1 Case True Local Const $new_au3 = write_function_list_to_string($func_string, $autoit_source) If @error Then Return SetError(3, 0, False) EndIf FileWrite($file_overwrite, $new_au3) FileClose($file_overwrite) scite_close($source_path) scite_open($source_path) EndSwitch Case False Return SetError(2, 0, False) EndSwitch Return True EndFunc Func get_source_path() Local $source_path Select Case UBound($cmdline) <= 1 $source_path = FileOpenDialog("Browse to an au3 source.", '', "AU3 (*.au3)" ) If @error Then Return SetError(1, 0, False) EndIf Case Else $source_path = $cmdline[1] EndSelect Return $source_path EndFunc Func backup_original_copy(Const $source_path) Local $drive, $dir, $name, $ext _PathSplit($source_path, $drive, $dir, $name, $ext) Local Const $backup_path = _PathMake($drive, $dir, $name, ".BAK") Return FileCopy($source_path, $backup_path, 1) ? True : SetError(1, 0, False) EndFunc Func write_function_list_to_string(Const $func_string, Const $autoit_source) Local Const $tag_position = StringInStr($autoit_source, $tag_begin) If Not $tag_position Then Return SetError(1, 0, False) EndIf Local Const $tag_length = StringLen($tag_begin) Local Const $insert_string = ((StringInStr($func_string, $tag_end) > 0) ? $func_string : ($func_string & $tag_end)) Return _StringInsert($autoit_source, $insert_string & @CRLF, ($tag_position + $tag_length + 1)) EndFunc Func create_function_list_string($func_array, Const $sort) If Not IsArray($func_array) Then Return SetError(1, 0, False) If $sort Then _ArraySort($func_array, 0) Local $func_string = '' For $function In $func_array $func_string &= "; " & $function & @CRLF Next Return $func_string EndFunc Func erase_function_list(Const $source_path) Local $line = '' Local $autoit_source = '' Local $within_func_list = False Do $line = file_stream_read_line($source_path) Switch @error Case 0 Switch $line Case $tag_begin $within_func_list = True $autoit_source &= $tag_begin & @CRLF ContinueLoop Case $tag_end Switch $within_func_list Case True $within_func_list = False ContinueLoop EndSwitch EndSwitch Case $file_stream_eof, $file_stream_other_error ExitLoop EndSwitch Switch $within_func_list Case False $autoit_source &= $line & @CRLF Case True Select Case StringLeft($line, 1) <> ';' $within_func_list = False EndSelect EndSwitch Until False Return $autoit_source EndFunc Func file_stream_read_line(Const $path) Local Const $file_stream_close = -2 Local Const $file_stream_ready = -3 Local Const $file_stream_open_error = -1 Local Static $file_open = FileOpen($path, $FO_READ) Switch $path Case $file_stream_close FileClose($file_open) $file_open = $file_stream_ready Return True EndSwitch Select Case $file_open = $file_stream_open_error $file_open = $file_stream_ready Return SetError(2, 1, False) Case $file_open = $file_stream_ready $file_open = FileOpen($path, $FO_READ) Switch $file_open Case $file_stream_open_error $file_open = $file_stream_ready Return SetError(2, 2, False) EndSwitch ContinueCase Case $file_open >= 0 Local Const $file_line = FileReadLine($file_open) Switch @error Case 0 Return $file_line Case $file_stream_eof FileClose($file_open) $file_open = $file_stream_ready Return SetError($file_stream_eof, 0, False) Case $file_stream_other_error FileClose($file_open) $file_open = $file_stream_ready Return SetError($file_stream_other_error, 0, False) EndSwitch EndSelect EndFunc Func alert(Const $message, Const $error = False) Switch @Compiled Case True Switch $error Case False MsgBox($MB_OK, "FunctionNameLister", $message) Case True MsgBox($MB_OK + $MB_ICONERROR, "FunctionNameLister", $message) EndSwitch Case False Switch $error Case False ConsoleWrite(@CRLF & "> " & $message & @CRLF & @CRLF) Case True ConsoleWrite(@CRLF & "! " & $message & @CRLF & @CRLF) EndSwitch EndSwitch EndFunc1 point