
GoogleDude
Active Members-
Posts
241 -
Joined
-
Last visited
GoogleDude's Achievements
-
Musashi reacted to a post in a topic: Selecting Multiple ListBox items from an array?
-
Selecting Multiple ListBox items from an array?
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
That worked, Thank you very much. I was using ChatGPT but no matter how I worded it or what I gave it it just couldn't figure it out. Thanks again! -
So I have a GUI that creates a listbox with some items in it. when the gui starts it reads a list of items to select from a sqlite db and stores it in an array ($sItemsToSelect). At least it should. The issue is that its not selecting any items and im not sure why. The below example I believe demonstrates this. When the example gui below starts I am expecting it to select Items 1 and Items 3. Can someone help me correct the below please? #include <GUIConstantsEx.au3> #include <GuiListBox.au3> Global $hGUI = GUICreate("Test GUI", 175, 120) Global $idList = GUICtrlCreateList("", 10, 10, 150, 100) GUICtrlSetData($idList, "Item 1|Item 2|Item 3|Item 4") GUISetState(@SW_SHOW, $hGUI) Global $aItemsToSelect = StringSplit("Item 1|Item 3", "|", 2) _SelectItems($idList, $aItemsToSelect) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func _SelectItems($idList, $aItemsToSelect) Local $hList = GUICtrlGetHandle($idList) ConsoleWrite("Selecting specified items..." & @CRLF) Local $iFound, $sItem, $iErrCount = 0 _GUICtrlListBox_SetSel($hList, False, -1) For $i = 0 To UBound($aItemsToSelect) - 1 $sItem = $aItemsToSelect[$i] $iFound = _GUICtrlListBox_FindString($hList, $sItem) If $iFound = -1 Then ConsoleWriteError("Item '" & $sItem & "' not found in ListBox." & @CRLF) $iErrCount += 1 Else _GUICtrlListBox_SetSel($hList, True, $iFound) ConsoleWrite("Selected item: '" & $sItem & "' at index " & $iFound & @CRLF) EndIf Next If $iErrCount > 0 Then MsgBox($MB_ICONERROR, "Error", "One or more items could not be selected. Check the console for details.") Else ConsoleWrite("All items selected successfully." & @CRLF) EndIf EndFunc Many Thanks in Advance!
-
GoogleDude reacted to a post in a topic: How to set a background image?
-
GoogleDude reacted to a post in a topic: Trigger a function when pressing Enter on a GUI-Input
-
GoogleDude reacted to a post in a topic: How to Generate a Random English Word
-
GoogleDude reacted to a post in a topic: Colors and fonts in custom drawn ListViews - UDF version
-
GoogleDude reacted to a post in a topic: Real-Time log file viewer
-
GoogleDude reacted to a post in a topic: Discover on which TCP port a specific Windows Process ID is listening
-
GoogleDude reacted to a post in a topic: All Local IPV4 Address To Array
-
GoogleDude reacted to a post in a topic: for loop to inputboxes
-
[UDF] Gmail API - Emails automation with AutoIt!
GoogleDude replied to Ascer's topic in AutoIt Example Scripts
DELETE- 54 replies
-
- gmail
- send emails
-
(and 3 more)
Tagged with:
-
GoogleDude reacted to a post in a topic: InetRead Prevent Hang Script?
-
GoogleDude reacted to a post in a topic: StringRegExp - replace every n-th occurence of a char
-
Decrypting AES256 Encrypted Strings in Autoit
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
I dont really care so much about the IV or even using block chain so much. Im just looking for a somewhat simple/easy way of encrypting a string from outside of au3 with a key/or password and being able to decrypt it with the same key in au3. Im trying to use this meathod for encrypting data send across a au3 tcp server from a android tablet or other platforms that can send raw tcp/udp data to a au3 tcp server. Doesnt have to be top notch encryption just something basic or at least better than none. ~SG -
Decrypting AES256 Encrypted Strings in Autoit
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
Thanks. At least my train of thought is somewhat valid. How would I set the IV in au3? ~GD -
Decrypting AES256 Encrypted Strings in Autoit
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
The code I am referring to to encrypt a string in au3 is from the help "_Crypt_EncryptData.au3". I am using that as an example. It works great and serves its purpose as an example. But the encrypted string is 0x0blahblahblah. I can decrypt that same string using the other au3 decrypt script, but what I am after is the ability to generate a string from something like android/webpage/*nix etc.. but with the correct key can be decrypted by au3. None of the websites or android type apps iv played with encrypt a string where the encrypted string is in the same format as au3. Im not an expert at all on encryption but I wouldn't call myself a complete noob at it either. my thinking was that if I used some type or common encryption also such as aes128/256 or something on both ends with the same key I should be heading in the correct direction. Thanks for the reply. I will check out that website you refer to. ~GD -
I have 2 very basic scripts. One (from au3 help) that Encrypts a string with a given algo. The encrypted string is something like 0x099363CB45F3F6903ADA0E7100D971ED42632A58DAA78A2C0DB8158B7D20F777. The other script decrypts an encrypted string to a proper string. but only works on au3 encrypted strings/encrypted strings My issue is that, if I go to a website such as https://encode-decode.com/aes256-encrypt-online/ for example and create an encrypted string with a password how can I decode that string in au3? The format of the encrypted string is totally different than one encrypted by au3. Even when I use the same aes256 algo and key! Thanks, GD
-
[UDF] Gmail API - Emails automation with AutoIt!
GoogleDude replied to Ascer's topic in AutoIt Example Scripts
Just wanted to say Thanks for this UDF/Library/API/Goodness! ~GD- 54 replies
-
- gmail
- send emails
-
(and 3 more)
Tagged with:
-
Help Parsing Spaces from cmdline parameters
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
Thank you for that thread. That's even better than my current approach. Thanks again! ~SG -
Help Parsing Spaces from cmdline parameters
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
Thanks, Forgot to mention sorry. Yes there are other switches about 4 to be exact. They all work as long as the values individually doesnt contains spaces. -
I found the below code on the forum a while back when searching around. I have a script that uses the below code that when the compiled script runs with the /Name= switch is reads the part after the = in order to get the value and set the value as $var or in the below case $GetCMDLineValue. It works great if there is no spaces in the value specified. Normally I would put quotes around the value and off it goes but no matter how I format it I only gets the leftside of the first space. There may be a metter way of doing this but this is what I came up with so far based on what I read and found! How can I make it so I can pass /Name="This is a Value" and have $GetCMDLineValue get set as "This is a Value"? $GetCmdLine = $CmdLineRaw $GetCmdLine1 = '/Name=' Global $GetCmdLineValue = StringMid($GetCmdLine, (StringInStr($GetCmdLine, $GetCmdLine1) + StringLen($GetCmdLine1) + 0), StringInStr($GetCmdLine, " ", 0, 1, StringInStr($GetCmdLine, $GetCmdLine1) + StringLen($GetCmdLine1)) - (StringInStr($GetCmdLine, $GetCmdLine1) + StringLen($GetCmdLine1))) MsgBox(0,"",$GetCmdLineValue) Thanks in advance, ~GD
-
OnAutoItErrorRegister - Handle AutoIt critical errors
GoogleDude replied to MrCreatoR's topic in AutoIt Example Scripts
Whenever I register "_OnAutoItErrorRegister('', '', 'My App Error', False, False)" at the top my a test script and run the uncompiled script in SciTe, debugging to scite console seems to stop. Is this expected behavior? How can I use this error handler and still debug to scite console when running uncompiled scripts in SciTe? ConsoleWrite() seems to not show in SciTe console! Thanks ~SG -
Yes I agree with your 'you need to recast your entire "main/include" philosophy!' part. I have become accustomed to what I think are some bad scripting habits and introduce some if not a lot of the misc issue I end up having. Thanks for the immediate problem part. I always thought that includes needed to be at the top of my script before the global $vars. ~GD
-
So I have created a so-called 'master/main' include that basically has a ton of udfs that I have collected over time that I commonly use in my many projects. An issue I have running into is I am looking to set some global $vars in my main script that are used in my master include. I tried setting them as globals in my main script but they dont seem to carry over to my include. Its as though the include is read and $vars are processed before my main script is read at compile time. When I try to compile my main script it complains that $vars in my master/include have not been defined yet when they have been in my main project script. If that makes sense. Hope that makes sense and thanks for any feedback. ~GD
-
Get Desktop Shortcut Position and Set ToolTip?
GoogleDude replied to GoogleDude's topic in AutoIt General Help and Support
Thanks for that link. I check it out. It helped a little. With it I am able to get an array listing all my desktop icons and there positions and even convert the array into a string but I am struggling to extract just the position/column/row of the one icon I am interested in. I tried to use the various string functions but cant help but think that, that is not the right approach. ~GD