Leaderboard
Popular Content
Showing content with the highest reputation on 02/02/2021 in all areas
-
#cs AutoIt Version: 3.3.14.5 Author: Medallyon Script Function: Enable or Disable a Windows HotKey. Does not work for *reserved* reserved keys 'L' and 'U'. API: Settings: > [Bool] $dwhk_setting_verbose: Whether the program should spew debugging strings to the console. [Bool] _IsHotKeyDisabled($letter) > Returns 1 if the specified HotKey is already in the "DisabledHotkeys" list. [Array] _FetchDisabledHotKeys() > Fetch all hotkeys that are currently disabled. [Void] _DisableWindowsHotKey($letter, $refresh = True) > Disable the given $letter. Pass a truthy value for $refresh to restart explorer.exe for the change to take effect immediately. [Void] _EnableWindowsHotKey($letter, $refresh = True) > Enable the given $letter. Pass a truthy value for $refresh to restart explorer.exe for the change to take effect immediately. #ce #include <array.au3> ; Constants Local $REG_PATH = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" Local $ALPHABET = " 0123456789ABCDEFGHIJKLMNOPQRSTUVXYZ" ; Settings Local $dwhk_setting_verbose = True ; <========== Private Functions Func _PRINT($msg) If (Not $dwhk_setting_verbose) Then Return ConsoleWrite("[DisableWindowsHotKey] " & $msg & @CRLF) EndFunc Func _FETCH_DISABLED_HOTKEYS() Local $existing = RegRead($REG_PATH, "DisabledHotkeys") If (@error = 0) Then Return $existing ElseIf (@error = -1) Then Return "" Else _PRINT("Encountered an error trying to read the Registry.") Return 1 EndIf EndFunc Func _WRITE_DISABLED_HOTKEYS($keys) $aKeys = StringSplit($keys, "", $STR_NOCOUNT) _ArraySort($aKeys) _ArrayDisplay($aKeys) $keys = _ArrayToString($aKeys, "", -1, -1, "") _PRINT($keys) If (StringLen($keys) = 0) Then If (RegDelete($REG_PATH, "DisabledHotkeys") = 2) Then _PRINT("Encountered an error trying to remove the HotKeys from the Registry.") Return 1 EndIf Return 0 ElseIf (RegWrite($REG_PATH, "DisabledHotkeys", "REG_SZ", $keys) = 0) Then _PRINT("Encountered an error trying to write to the Registry.") Return 1 EndIf Return 0 EndFunc Func _REFRESH_EXPLORER() Local $pidExplorer = ProcessExists("explorer.exe") If ($pidExplorer = Not 0) Then ProcessClose($pidExplorer) ProcessWaitClose($pidExplorer, 3) EndIf Return RunWait("explorer.exe", 3) EndFunc ; ==========> Private Functions ; <========== API Func _IsHotKeyDisabled($letter) Return StringInStr(_FETCH_DISABLED_HOTKEYS(), $letter) EndFunc Func _FetchDisabledHotKeys() Return StringSplit(_FETCH_DISABLED_HOTKEYS(), "") EndFunc Func _EnableWindowsHotKey($letter, $refresh = True) Local $disabled = _FETCH_DISABLED_HOTKEYS() $letter = StringUpper($letter) If (Not StringInStr($disabled, $letter, True)) Then _PRINT("This Windows HotKey (" & $letter & ") is already enabled.") If ($refresh) Then _REFRESH_EXPLORER() Return 0 EndIf $disabled = StringReplace($disabled, $letter, "") _PRINT($disabled) _WRITE_DISABLED_HOTKEYS($disabled) If ($refresh) Then _REFRESH_EXPLORER() _PRINT("Successfully removed '" & $letter & "' from DisabledHotkeys.") Return 0 EndFunc ; ===> _EnableWindowsHotKey Func _DisableWindowsHotKey($letter, $refresh = True) Local $disabled = _FETCH_DISABLED_HOTKEYS() $letter = StringUpper($letter) If (StringInStr($disabled, $letter, True)) Then _PRINT("This Windows HotKey (" & $letter & ") is already disabled.") If ($refresh) Then _REFRESH_EXPLORER() Return 0 EndIf If (Not StringInStr($ALPHABET, $letter, True)) Then _PRINT("Ensure that the Windows HotKey being disabled is not a special character.") Return 1 EndIf $disabled &= $letter _WRITE_DISABLED_HOTKEYS($disabled) If ($refresh) Then _REFRESH_EXPLORER() _PRINT("Successfully added '" & $letter & "' to DisabledHotkeys.") Return 0 EndFunc ; ===> _DisableWindowsHotKey ; ==========> API2 points
-
You do it this way: #include <GuiMenu.au3> ; Create GUI. $hGui = GUICreate("Autoit GUI", 200, 100) $hMenu = _GUICtrlMenu_CreateMenu() _GUICtrlMenu_InsertMenuItem( $hMenu, 0, "none" ) $hMain = _GUICtrlMenu_CreateMenu( $MNS_MODELESS ) _GUICtrlMenu_InsertMenuItem( $hMain, 0, "none", 0, $hMenu ) _GUICtrlMenu_SetMenu( $hGui, $hMain ) ; Crate label to control progress. $label = GUICtrlCreateLabel("Working: " , 60, 30, 160) ; Set start time point script. $startPoint = 0 ; Show GUI. GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 ; Set new time to label. GUICtrlSetData($label, "Working: " & $startPoint & "%") ; add point $startPoint += 1 ; When point is above 100 reset If $startPoint >= 100 Then $startPoint = 0 ; Listen signal from GUI. Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd2 points
-
AutoIt GUI Creators (Designers)
nguyentoannta3 reacted to TheSaint for a topic
As many of you may not be aware, of much about AutoIt's humble beginnings, and aspects related to the first GUI version of AutoIt, I thought it might be nice to create a historical reference here for all the many GUI creators that have been created by various people over the years. NOTE - While one could argue, that this topic might be better placed in one of the Chat forums, I would argue, that it links to heaps of good code. While much may be redundant in that code, it is still interesting and forms a great perspective. Many are bound to find useful elements at the very least. Koda, is no doubt the most well-known GUI creator now, but there was a time, when CyberSlug's legendary GUIBuilder (first known as AutoBuilder) ruled the roost, and AutoIt coder's saw it as a Godsend. AutoIt coding was much simpler back then of course. Below, will be a timeline, of any AutoIt GUI creators listed in forum pages. It will be added to by myself as I find them or as others here find them and place a link in a subsequent post ... PLEASE HELP! Comments welcome too. (Also note, that this is also intended to include updates, branches etc by others) Apr 20 2004 - AutoBuilder by CyberSlug. Sep 27 2004 - An interesting topic, where CyberSlug talks about the future of AutoBuilder (etc) and renaming to GUIBuilder and you see the first mentions and links to updates by others (including myself & livewire). Nov 05 2004 - A topic where lookfar is working on a SciTE replacement, talks about starting a Form Designer. Aug 10 2005 - GuiBuilder first update by TheSaint. Sep 26 2005 - GUIBuilder updates by livewire (he also talks about transferring his efforts to Koda). Nov 02 2005 - KODA FormDesigner v1.3 by lookfar Nov 03 2005 - Seemingly interesting topic about forms by tonedeaf Dec 26 2005 - AutoIt Studio(beta) by BillLuvsU Jan 09 2006 - AutoBuilder update (or branch) by _^__darkbytez (livewire also posts). Feb 19 2006 - Koda v1.5 by lookfar Sep 07 2006 - Koda v1.7.3.0 by Lazycat Jan 07 2007 - Form/GUI Builder by FlintBrenick Jun 10 2007 - Gorganizer by _Kurt (more of an assister than actual GUI maker) Jun 27 2007 - Basic GUI Designer by Mast3rpyr0 May 03 2008 - Autoit Programmer's Desktop (APD) by Ealric Jul 11 2008 - Gui Designer by Alek Aug 11 2008 - Gorganizer update by _Kurt Jun 19 2009 - Easy GUI by Mat Aug 13 2009 - GUI Script Creator by Pandemic (not sure this qualifies, but it made me think of templates) Aug 16 2010 - Creation Gui by AZJIO Jan 22 2012 - ISN AutoIt Studio by ISI360 (includes ISN Form Studio 2, a GUI editor) Mar 19 2012 - Arduino GUI Programmer by nikosliapis (creates a specific type of GUI) Aug 01 2012 - GuiBuilder Resurrected update/branch to GUIBuilder by baroquebob Dec 01 2012 - Form Builder beta (v1.0.6) by BuckMaster Jan 12 2015 - GUIBuilderNxt update by jaberwacky of GUIBuilder v0.8 (as a new prototype, modified to work with latest AutoIt) (not a update to the Resurrected version) Aug 12 2016 - The GuiBuilder Return by DFerrato as an update to GUIBuilder, Jan 17 2017 - GUIBuilder Project by TheSaint (a work in progress based on CyberSlug's original ... and later versions, updated by Roy, TheSaint & others). May 29 2019 - The GuiBuilder Return by DFerrato as an update to GUIBuilder, His new and improved version. May 9 2022 - GuiBuilderPlus by kurtykurtyboy as an update to GUIBuilder. A new an improved version with more to come. There are a significant number of creators/designers that have been started and never completed. +++++ STILL UNDER CONSTRUCTION +++++ P.S. Well that's it from me tonight. I know of at least one other major creator, but cannot recall it's name or the name of the coder, though I think it starts with 'L'. Bound to be a few I've missed, and some I cannot seem to find their first appearance here (Koda, Form Builder, etc), but there may be an obvious reason for that. Will probably rely on feedback from others now that I've got the ball rolling. NOTE - If anyone wants to discuss any of these programs above or give some background history, then by all means do so. I will cross-reference (link to) any important comments.1 point -
CryptoNG UDF - Cryptography API: Next Generation
Stormgrade reacted to TheXman for a file
Version v2.2.0
1,427 downloads
Encryption / Decryption / Hashing / Signing Purpose Cryptography API: Next Generation (CNG) is Microsoft's long-term replacement for their CryptoAPI. Microsoft's CNG is designed to be extensible at many levels and cryptography agnostic in behavior. Although the Crypt.au3 UDF lib that is installed with AutoIt3 still works well, the advapi32.dll functions that it uses have been deprecated. In addition the Crypt.au3 UDF lib, as it is currently written, has a very limited ability to decrypt AES data that was not encrypted using Crypt.au3 functions. That is because Crypt.au3 functions do not allow you to specify an actual key or initialization vector (IV). It only lets you specify data to be used to derive a key and uses a static IV. This UDF was created to offer a replacement for the deprecated functions used by Crypt.au3. According to Microsoft, deprecated functions may be removed in future release. It was also created to allow more flexibility and functionality in encryption/decryption/hashing/signing and to expand the ability for users to implement cryptography in their scripts. Description This UDF implements some of Microsoft's Cryptography API: Next Generation (CNG) Win32 API functions. It implements functions to encrypt/decrypt text and files, generate hashes, derive keys using Password-Based Key Derivation Function 2 (PBKDF2), create and verify signatures, and has several cryptography-related helper functions. The UDF can implement any encryption/decryption algorithms and hashing algorithms that are supported by the installed cryptography providers on the PC in which it is running. Most, if not all, of the "magic number" values that you would commonly use to specify that desired algorithms, key bit lengths, and other magic number type values, are already defined as constants or enums in the UDF file. To flatten the learning curve, there is an example file that shows examples of all of the major functionality. This example file is not created to be an exhaustive set of how to implement each feature and parameter. It is designed to give you a template or guide to help you hit the ground running in terms of using the functions. I have tried to fully document the headers of all of the functions as well as the code within the functions themselves. As of v1.4.0, there is also a Help file that includes all of the functions, with examples. Current UDF Functions Algorithm-Specific Symmetric Encryption/Decryption Functions _CryptoNG_AES_CBC_EncryptData _CryptoNG_AES_CBC_DecryptData _CryptoNG_AES_CBC_EncryptFile _CryptoNG_AES_CBC_DecryptFile _CryptoNG_AES_ECB_EncryptData _CryptoNG_AES_ECB_DecryptData _CryptoNG_AES_GCM_EncryptData _CryptoNG_AES_GCM_DecryptData _CryptoNG_3DES_CBC_EncryptData _CryptoNG_3DES_CBC_DecryptData _CryptoNG_3DES_CBC_EncryptFile _CryptoNG_3DES_CBC_DecryptFile Generic Symmetric Encryption/Decryption Functions _CryptoNG_EncryptData _CryptoNG_DecryptData _CryptoNG_EncryptFile _CryptoNG_DecryptFile Hashing Functions _CryptoNG_HashData _CryptoNG_HashFile _CryptoNG_PBKDF2 Asymmetric (Public/Private Key) Cryptography Functions _CryptoNG_ECDSA_CreateKeyPair _CryptoNG_ECDSA_SignHash _CryptoNG_ECDSA_VerifySignature _CryptoNG_RSA_CreateKeyPair _CryptoNG_RSA_EncryptData _CryptoNG_RSA_DecryptData _CryptoNG_RSA_SignHash _CryptoNG_RSA_VerifySignature Misc / Helper Functions _CryptoNG_CryptBinaryToString _CryptoNG_CryptStringToBinary _CryptoNG_GenerateRandom _CryptoNG_EnumAlgorithms _CryptoNG_EnumRegisteredProviders _CryptoNG_EnumKeyStorageProviders _CryptoNG_LastErrorMessage _CryptoNG_Version Related Links Cryptography API: Next Generation - Main Page Cryptography API: Next Generation - Reference Cryptography API: Next Generation - Primitives Cryptography API: Next Generation - Cryptographic Algorithm Providers1 point -
Why the abbrevs are case sensitive, and more important, is how to fix it? mb expanded, but MB or Mb does not. 🤨1 point
-
BF*, the programming language with a silly name, is now visualized in AutoIt. First, here is the console only version, which executes faster than the Gui-version 😠#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=bf.ico #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Func InputConsole() If @Compiled = 1 Then CW( @crlf & "enter single char>", 0) Do Local $inp = ConsoleRead() Until $inp <> "" if StringLen($inp)>1 Then $inp=StringLeft($inp,1) ;CW("GOT: (" & $inp & ")") Else $inp = InputBox("BF-Console", "Please enter a single char") If @error <> 0 Then Exit EndIf EndIf Return $inp EndFunc ;==>InputConsole CW("Autoit BrainF* Console version" & @crlf) Const $filetype = "BF (*.b;*.bf)|Text (*.txt;*.ini)|All Files (*.*)" $tmpfile = FileOpenDialog("Open ABF script", @ScriptDir, $filetype) $p = FileRead($tmpfile) CW("Loaded: " & $tmpfile) Global $ERROR = "" Global $datastack = 1000 Global $d[$datastack] ; Data stack Global $b[31] ; bracket stack Local $dp = 1 ; Data pointer Local $ip = 1 ; instruction pointer Local $bp = 1 ; bracket pointer Local $bc = 0 ; Bracket matching Local $be = 0 ; Bracket Ending Local $e = StringLen($p) ;The length of the code $ERROR = "" While 1 Local $a = StringMid($p, $ip, 1) Select Case $a = ">" $dp = $dp + 1 If $dp > $datastack - 1 Then ;$dp = 1 CW("Emergency loop out >") ExitLoop EndIf Case $a = "<" $dp = $dp - 1 If $dp < 0 Then ;$dp = $datastack - 1 CW("Emergency loop out <") ExitLoop EndIf Case $a = "+" $d[$dp] = Mod($d[$dp] + 1, 256) ;If $d[$dp] > 255 Then $d[$dp] = 0 Case $a = "-" $d[$dp] = Mod($d[$dp] + 255, 256) ;$d[$dp] = $d[$dp] - 1 ;If $d[$dp] < 0 Then $d[$dp] = 0 Case $a = "." If $d[$dp] = 13 Then ;Or $d[$dp] = 10 CW(@CRLF) Else CW(Chr($d[$dp]), 0) EndIf Case $a = "," Local $inp = InputConsole() If $inp <> "" Then $d[$dp] = Asc($inp) Else Exit EndIf Case $a = "[" Local $bc = 1 ; bracket counter For $x = $ip + 1 To $e If StringMid($p, $x, 1) = "[" Then $bc = $bc + 1 If StringMid($p, $x, 1) = "]" Then $bc = $bc - 1 If $bc = 0 Then ; bc will be 0 once all the subnests have been counted over $b[$bp] = $ip $be = $x $x = $e EndIf If $bc = 0 And $d[$dp] = 0 Then $ip = $be $bp = $bp - 1 EndIf Next $bp = $bp + 1 Case $a = "]" $bp = $bp - 1 If $d[$dp] <> 0 Then $ip = $b[$bp] - 1 EndSelect $ip = $ip + 1 If $ip > $e Then ExitLoop WEnd if @compiled=1 Then cw("THE END - Press CTRL C or STRG C to stop") While 1 Sleep (10) WEnd Else CW("The END") EndIf Func CW($txt, $crlf = 1) Local $nl = "" If $crlf = 1 Then $nl = @CRLF ConsoleWrite($txt & $nl) EndFunc ;==>CW The console version works from the Scite and in the console. When ran under dos it accepts input through the stdio, and when ran from Scite it uses the Message Box to get the input. The interpreter code is from Rosettacode.org The Gui-Visualiser looks like this: The attached 7z archive contains the source code and compiled versions (32,64 bit) of the visualiser, 32 bit console version, custom icon and few bf test apps. AutoBF.7z1 point
-
If you need much more options than ControlCommand, you can use SendMessage directly to the control. To get a list of all the possibilities see : https://docs.microsoft.com/en-us/windows/win32/controls/window-controls Look under Control Library for a detailed list of all available messages. Remember that some messages cannot be sent between threads (mostly when trying to set some attributes), but reading should not be a problem.1 point
-
Not sure if anyone can use this. I decided to make my own database program to catalog all of my movies. I chose TheMovieDB.org as my information base to pull data and media from. You WILL need to sign up for a license key at https://www.themoviedb.org/ to use this library. Insert your key in the TMDB.AU3 file between the quotes where it says: Global $ApiKey = "" I freely give this to the community to do as you will. Please do not ask for revisions or upgrades as this UDF performs perfectly for me and my needs. But, I encourage anyone to improve on it if they wish and share their results. Thanks to Ward for the JSON UDF used here. Run EXAMPLE.AU3 to give you an idea of what data it can actually pull for an individual movie. I make no apologies for the condition or consistency of my code. There are a thousand ways from sundown to program anything. I am not a professional programmer but have been using AutoIT since version 2. Enjoy. BinaryCall.au3 Example.au3 JSON.au3 TMDB.au31 point
-
Hello. Check ControlCommand. Saludos1 point
-
Multiple user created hotkeys
Dan_555 reacted to standardUser54 for a topic
That was it, thank you Dan. Quite a simple solution after all this time ahah. Here is my hackjob solution for any who might stumble across this. $hotkey = "" ;user input here, but initializing random .ini info IniWrite("file.ini", "1", "Key", "a") IniWrite("file.ini", "1", "text", "fuu") IniWrite("file.ini", "2", "Key", "s") IniWrite("file.ini", "2", "text", "bar") IniWrite("file.ini", "3", "Key", "d") IniWrite("file.ini", "3", "text", "hello") global $aSecNames = IniReadSectionNames("file.ini") For $i = 1 to $aSecNames[0] $hotkey = IniRead("file.ini", $aSecNames[$i], "Key", "") HotKeySet($hotkey, "_test") Next While 1 WEnd Func _test() ;loop through all sections while and compare key value to the @hotkeypressed value For $i = 1 to $aSecNames[0] if IniRead("file.ini", $aSecNames[$i], "Key", "") = @HotKeyPressed Then $text = IniRead("file.ini", $aSecNames[$i], "text", "") EndIf Next MsgBox(0, "",$text) EndFunc1 point -
1 point
-
Multiple user created hotkeys
standardUser54 reacted to Dan_555 for a topic
See the Autoit Help for HotKeySet, the "Example 2, @HotKeyPressed usage" Yes, a variable which is assigned in a loop, gets overwritten by each loop. You can use an array or the above suggestion instead.1 point -
Thanks Assuming that all of the information in the cryptii image is correct, the only issue I see with your script is where you are building $MESSAGE. If you change the following line, you should see the same result as cryptii. Change Local $MESSAGE = Binary("0x" & $license&"""") to Local $MESSAGE = Binary("0x" & $license) #include <Constants.au3> #include <MyIncludes\CryptoNG\CryptoNG.au3> ;<== Modify as needed example() Func example() Local $license = "D99DD3A4FAF00B8AF905CD64358C1021" Local $MESSAGE = Binary("0x" & $license) Local $keystr = Binary("0x66d9130b181a3c2d72b81ba22570c9d1f118af90ad35c41d181a11da83ec35d1") Local $ivstr = Binary("0x7140bfc917037177e77984704f20729c") Local $decryptstr = _CryptoNG_AES_CBC_DecryptData($MESSAGE, $keystr, $ivstr) If @error Then MsgBox($MB_OK + $MB_ICONERROR,"ERROR: Invalid license", "ERROR: " & _CryptoNG_LastErrorMessage()) ;$license_result = "Fail" Exit 1 EndIf MsgBox($MB_SYSTEMMODAL, "", "decrypt: " & $decryptstr) EndFunc I don't understand this statement. Are you saying that you are trying to decrypt data that was encrypted using AES128-CBC? Where are you getting the key & IV? If you get the right result on cryptii, then if you provide the same information to the CryptoNG functions, you should get the same result. Is that not what your are seeing?1 point
-
$LBS_STANDARD wrong value ?
pixelsearch reacted to junkew for a topic
You can open a trac ticket as compared to winuser.h the value is not correct. I wouldn't know how we created all the windows xxxx constants manual labour or generated based on SDK headerfiles. For that we need one of the developers. but it would help probably in prioritizing if you have a real world example of whats functionally going wrong under which circumstances. The example you give you miss the scrollbar when there are more items but you can still reach them with your keyboard up/down keys workaround: BitOR($LBS_NOTIFY, $LBS_SORT , $WS_VSCROLL , $WS_BORDER (0x00800000) Example you refer to ; $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($LBS_STANDARD, $LBS_EXTENDEDSEL)) $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR(BitOR($LBS_NOTIFY, $LBS_SORT , $WS_VSCROLL , $WS_BORDER ), $LBS_EXTENDEDSEL)) Full example copied below #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListBox.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $idListBox ; Create GUI GUICreate("List Box Get Sel", 400, 296) ; $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($LBS_STANDARD, $LBS_EXTENDEDSEL)) ; $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($LBS_STANDARD, $LBS_EXTENDEDSEL)) $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR(BitOR($LBS_NOTIFY, $LBS_SORT , $WS_VSCROLL , $WS_BORDER ), $LBS_EXTENDEDSEL)) GUISetState(@SW_SHOW) ; Add strings _GUICtrlListBox_BeginUpdate($idListBox) For $iI = 1 To 9 _GUICtrlListBox_AddString($idListBox, StringFormat("%03d : Random string", Random(1, 100, 1))) Next _GUICtrlListBox_EndUpdate($idListBox) ; Select a few items _GUICtrlListBox_SetSel($idListBox, 3) _GUICtrlListBox_SetSel($idListBox, 4) _GUICtrlListBox_SetSel($idListBox, 5) ; Show the item selection state MsgBox($MB_SYSTEMMODAL, "Information", "Item 5 Selected: " & _GUICtrlListBox_GetSel($idListBox, 4)) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example consolewrite(hex(BitOR($LBS_NOTIFY, $LBS_SORT , $WS_VSCROLL , $WS_BORDER )))1 point -
1 point
-
Run Script (x64)
marvel_master reacted to Jos for a topic
Ok, so you are running the x32 version and are NOT running the full SciTE4AutoIt3 version. Install that first and then the directive will run the x64 version.1 point -
Help me to randomize simple algorithm
Earthshine reacted to Melba23 for a topic
DesireDenied, You appear to be confusing "truly random" with what you perceive as "random". It is quite likely that successive numbers in a truly random sequence will be close neighbours - just look at any lottery draw. So trying to avoid such occurrences is in fact making the series less random, not more. M231 point -
TheSaint, Amended for the next release - thanks. M231 point
-
GetParent versus GetDesktop and GetAncestor(parent)
Professor_Bernd reacted to BrewManNH for a topic
Is the window an unowned top-level window? If so, GetParent won't return a value, it only returns the owner window. GetAncestor will return the parent window, but not the owner, when using the $GA_PARENT parameter.1 point -
To get all the coordinates of a window
helenmichell4U reacted to SAN123SAD for a topic
Hi All, I am quite an intermediate in using AUTOIT and i am using it to automate one of our application. From past two months i am working on AUTOIT, Right now i am using the mouse coordinates to move to the certain point in the GUI and then click on the same. The question i am stuck with is, Instead of using mouse coordinates I want store all the coordinates and calculate based on the requirements and then click on the same. Kindly, help me if there is any where i can get all the coordinates like $left, $right, $top, $bottom and perform calculations on the same.1 point -
Input placeholder instead of raw text
pixelsearch reacted to Melba23 for a topic
Glutch (and UEZ), No need to be quite so complicated - use a cuebanner: #include <GUIConstantsEX.au3> #include <EditConstants.au3> $hGui = GUICreate("", 500, 500) $cInput = GUICtrlCreateInput("", 10, 10, 200, 20) GUICtrlSendMsg($cInput, $EM_SETCUEBANNER, False, "Keys to press (optional)") $cButton = GUICtrlCreateButton("Test", 10, 100, 80, 30) GUICtrlSetState($cButton, $GUI_FOCUS) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I hope that helps. M231 point -
UEZ, It looks like the problem is in the GUIFrame UDF not this one, as you only have a problem when $fSingleSel = False. In that case, the UDF creates a treeview within a frame created by GUIFrame and this is obviously not happening. Have you tried to run the GUIFrame UDF and its examples - if not could you please do do? I wonder if there is a problem with it on x64 systems - it uses many DllCalls so I would not be at all surprised. M231 point
-
I get an error on example 6 when I select my C drive -> Line 419 (File "C:\Coding\AU3\GUI\ChooseFileFolder\ChooseFileFolder.au3"): $hTreeView = GUICtrlCreateTreeView(0, 0, $iW - 20, $aTV_Pos[3]) $hTreeView = GUICtrlCreateTreeView(0, 0, $iW - 20, $aTV_Pos^ ERROR Error: Subscript used with non-Array variable. Btw, nice coding! Br, UEZ1 point
-
If you start Ex 6 with $sRet = _CFF_Choose("Ex 6: Select multiple files", 300, 500, -1, -1, "", Default, 0, True) it is working properly. If $fSingle_Sel = False it will fail. Test system: Win7 x64 with latest AutoIt version. Ex 6 debug lines when $fSingle_Sel = False @@ Debug(249) : $sRoot = >Error code: 0 @@ Debug(250) : $fSingle_Sel = False >Error code: 0 @@ Debug(325) : $hTreeView = 0 >Error code: 0 @@ Debug(326) : $hTreeView_Handle = 0 >Error code: 0 Ex 6 debug lines when $fSingle_Sel = True @@ Debug(249) : $sRoot = >Error code: 0 @@ Debug(250) : $fSingle_Sel = True >Error code: 0 @@ Debug(325) : $hTreeView = 7 >Error code: 0 @@ Debug(326) : $hTreeView_Handle = 0x004A08CE >Error code: 0 Br, UEZ0 points
-
I'm starting ChooseFileFolder_Ex.au3. Ex 1: seems to be ok -> I can see the tree Ex 2: seems to be ok -> I can see the tree Ex 3: seems to be ok -> I can see the tree Ex 4: seems not to be ok -> nothing is displayed -> $hTreeView = 0 Ex 5: no tree. I can select a drive and it starting to indexing it Ex 6: no tree. I can select a drive. When I select my C drive the error appears. I've only one local drive - C. -> $hTreeView = 0 Ex 7: files are listed Looks like there is no handle to the treeview. If I find the the bug I will tell you! Br, UEZ0 points
-
I selected another Drive and then the C:\ Drive and I didn't get the same error! I also repeated Example 6 with just selecting the C:\ Drive and still no problem. Very weird indeed why UEZ got this error.0 points
-
UEZ, That has nothing to do with the C: drive - it is a result of an existing treeview not being found. I cannot reproduce it at the moment - which makes it a bit tricky to debug. When you first run Example 6 do you get a visible list control under a vertically moveable separator bar? Had you selected any other drive before your C: drive or was this the first one? Aside from that, it must have taken an eternity to index the whole C: drive - I just did it once and nearly died of boredom. M230 points