Leaderboard
Popular Content
Showing content with the highest reputation on 05/02/2017 in all areas
-
Animated Gif Analyzer
coffeeturtle reacted to wakillon for a topic
Animated Gif Analyzer Display internal infos from animated gifs Global and Local Palettes supported A value in red indicate that value is false or useless Flashing green text ( BK or TR) indicate background color and transparent color Download available in download section I created this script because I needed, for an other project, to know in detail the internal characteristics of animated gif I had searched a similar soft on internet but I didnt found anything ...1 point -
Looks pretty neat. My only criticism is that the password is randomized each time. It would be nice if there was a "seed" mode that could consistently generate the same password like a hashing function. I could see both methods being useful (consistent output and random) depending on the use case. Without downloading and running the exec, can you share the contents of the GenPass.html file?1 point
-
Select an item from a listbox - newbie
Kirky reacted to JLogan3o13 for a topic
@Kirky welcome to the forum. Can you please post the information from the Window Info Tool for the listbox? I am guessing it will be a combination of ControlGetHandle and _GUICtrlListBox_ClickItem, but the window info tool will help immensely.1 point -
Note that you don't need the empty square brackets: Local $aArry = ['a','b','c'] works as well. There is one more incentive to omit []: it's the syntax for declaring a Map in the beta (and most probably future releases). #AutoIt3Wrapper_Version=B ;(B/P) Use Beta or Production for AutoIt3 and Aut2Eex. Default is P Local $a[0] ; an empty array ConsoleWrite(VarGetType($a) & @LF) Local $aa = [] ; an empty array (preferrable syntax) ConsoleWrite(VarGetType($aa) & @LF) Local $b[] = [1, 2, 3] ; an initialized array ConsoleWrite(VarGetType($b) & @LF) Local $bb = [1, 2, 3] ; an initialized array (preferrable syntax) ConsoleWrite(VarGetType($bb) & @LF) Local $c[] ; a Map under beta (or syntax error under release) ConsoleWrite(VarGetType($c) & @LF) The similarity between declarations of $b and $c may lead to confusion when Maps become solid. Also by the time the beta has been out and since it doesn't show regressions I'd consider it release-class. One more point: the size of an array is UBound($aArray), while UBound($aArray) - 1 which is the index of the last element.1 point
-
This example only allows into the input control the following characters:- "a to z" upper and lower case; "0 to 9" numbers; One underscore "_", one minus sign, "-", or one space, " ", at a time, and, only after any letter\s or digit\s. This will not allow an underscore, a minus sign, or a space at the beginning of the input string. Examples:- "_Abc12" not allowed because underscore is not after a letter or digit; "A-_bc 12" not allowed because underscore is not after a letter or digit; "Abc__12" not allowed because there are two consecutive underscores; "Abc-12 34_De_" allowed. Note - If you give examples like this (what you want, and what you don't want), it would be easier to understand and help you. #include <GUIConstants.au3> #include <WinApi.au3> ; Modified from https://www.autoitscript.com/forum/topic/187551-custom-formating-text-in-inputbox-possible/?do=findComment&comment=1349344 GUIRegisterMsg($WM_COMMAND, _WM_COMMAND) Global $sStr = _FormatedInput() ; Get formated data from input control. MsgBox(0, "Returned Results", $sStr) Func _FormatedInput() Local $Res Global $hFormatedInput = GUICreate("Example", 300, 150) Global $idInput = GUICtrlCreateInput("", 10, 10, 180, 25) GUICtrlSetFont(-1, 11) Local $idBut = GUICtrlCreateButton("Done", 200, 10, 80, 25) GUICtrlCreateLabel('Characters allowed:- ' & @CRLF & _ '"a - z" upper and lower case;' & @CRLF & _ '"0 - 9" numbers; and,' & @CRLF & _ 'One underscore "_", one minus sign, "-", or' & @CRLF & _ 'one space, " ", but only after any letter\s or digit\s.', 10, 40, 280, 100) GUICtrlSetFont(-1, 9) GUISetState(@SW_SHOW, $hFormatedInput) While 1 Switch (GUIGetMsg()) Case $GUI_EVENT_CLOSE, $idBut $iReply = MsgBox(33, "Check Input", "Characters input:- " & @CRLF & @CRLF & _ ; 1 OK (1) and Cancel (2) + 32 Question-mark icon GUICtrlRead($idInput) & @CRLF & @CRLF & _ 'Press "OK" to accept input data, or;' & @CRLF & _ 'Press "Cancel" to continue to enter input data.') If $iReply = 1 Then ; OK (1) Pressed ExitLoop ; Accept lesser length input. Else ControlFocus($hFormatedInput, "", $idInput) ; Return focus to input EndIf EndSwitch WEnd $Res = GUICtrlRead($idInput) GUIDelete($hFormatedInput) Return $Res EndFunc ;==>_FormatedInput ; Ref to: https://www.autoitscript.com/forum/topic/180138-custom-input-mask/?do=findComment&comment=1293201 Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) ; abcde 1234 f If $hWnd = $hFormatedInput And _WinAPI_HiWord($wParam) = $EN_CHANGE And _WinAPI_LoWord($wParam) = $idInput Then Local $s = StringRegExpReplace(GUICtrlRead($idInput), "(?i)[^\w\-\h]", "") ; Remove all characters that ae not in square brackets. $s = StringRegExpReplace($s, "(?i)(\A|[a-z0-9][\-_\h])[\-_\h]+", "\1") ; Allow only one space, " ", "-", or "_" character only after any letter\s or digit\s. GUICtrlSetData($idInput, $s) EndIf Return "GUI_RUNDEFMSG" EndFunc ;==>_WM_COMMAND1 point
-
It's been a while since I looked at this. Disclaimer: an older version of your code is now intertwined in my program along with several modifications. Having said that, you might want to check (and consider) what I have discovered after playing around with your code. For a while I was getting problems with arrow key navigation and general functionality. I couldn't trace the problem and continued to work on other aspects of my program in the mean time. It seemed to be a random occurence and I thought it was happening while spamming the keyboard, but this may not be the case because . . . Yesterday I discovered something new. When a child GUI has focus (and I imagine other controls too), hitting the Enter key was triggering the problem. The old version I am using has three Globals : $bEditOpen, $bEditDoNotOpen and $bEditEscape. If I reset these globals (to the default values = False) immediately after closing the child GUI, it seems to fix the problem. Previously I also found that the problem sometimes remained after closing the program and required a complete reboot to get the thing working again. So you might want to take a look at this. Reproducer on the way: I need to restart my PC right now. Func KillIt() MsgBox(0, "Kill It", "Press Escape or Enter") EndFunc Actually I have just discovered that I can reset initial conditions without a reboot, however it took me a while to figure it out. I don't know if the same problem exists with the current keyboard version. With the ListView running, call the above function using an accelerator key (as I did) or by other means. Follow the instructions and see if you can still navigate the listview using the left and right arrow keys after the message box has disappeared. If not, then you might want to think about checking control focus before making changes (just a suggestion).1 point
-
Resident scripts and cpu time issue
JLogan3o13 reacted to Jos for a topic
You want a real piece of bossy/bad attitude? Just reread your posts and try seeing that from our side. Do you seriously think we are waiting for this bs? My shirt won't get wet when you simply repeat what you did then, so either try playing nice here or simply bugger off. Jos1 point -
They didn't tell you on your way in? ... I am a robot.1 point
-
Hello everybody ! You want a source code for Wake On LAN without copyright ? It's here ! ENJOY ! $IPAddress = "192.168.1.255"; This is the broadcast address ! $MACAddress = "000D8787E226" UDPStartUp() $connexion = UDPOpen($IPAddress, 7) $res = UDPSend($connexion, GenerateMagicPacket($MACAddress)) MsgBox(0, "", $res) UDPCloseSocket($connexion) UDPShutdown() ; =================================================================== ; Functions ; =================================================================== ; This function convert a MAC Address Byte (e.g. "1f") to a char Func HexToChar($strHex) Return Chr(Dec($strHex)) EndFunc ; This function generate the "Magic Packet" Func GenerateMagicPacket($strMACAddress) $MagicPacket = "" $MACData = "" For $p = 1 To 11 Step 2 $MACData = $MACData & HexToChar(StringMid($strMACAddress, $p, 2)) Next For $p = 1 To 6 $MagicPacket = HexToChar("ff") & $MagicPacket Next For $p = 1 To 16 $MagicPacket = $MagicPacket & $MACData Next Return $MagicPacket EndFunc Thanks for your remarks... Next to see you !1 point
-
How to use FileInstall()
Xandy reacted to Blue_Drache for a topic
Q: How do you code someone eating a whale? A: One byte at a time. Ok, horrible parable ... but I think you understand. The short answer is: Yes.1 point -
The application monitors multiple mailboxes a day. Upon receipt of a html formatted email the email is printed and saved as a PDF file. Then the email is scanned for URLs and each URL is launched and this information is printed and saved as a PDF file. The process is automated and I provided simple code as an example. All is unattended, PDF file names are generated from email subject lines with appended info. Bottome line. Example is simplified, between the send keys are routines to wait for Windows activation for Print/PDF Save As diallog boxes. Just want to have an automated PDF saving process that is a little more compact. Thanks for the response.1 point