Leaderboard
Popular Content
Showing content with the highest reputation on 11/21/2017 in all areas
-
The RE pattern means when there is a "/" at the end of a line then replace the "/" character with "", nothing (delete it). $sFileName = "\\poop\IC3.txt" ; FileToWorkOn MsgBox(0, "", StringRegExpReplace(FileRead($sFileName), "(?m)/*$", "")) ; See StringRegExp() in AutoIt help to lookup meaning of regular expression's pattern.1 point
-
Make CapsLock Great Again
Earthshine reacted to willichan for a topic
I miss my old Focus FK-5001. Nice heavy touch. Mechanical click. Dual sets of macro programmable (no software needed) function keys. A real programmers keyboard. --snif-- Why did they have to move away from the 5-pin DIN connector? --snif--1 point -
Change folder names and file names
Earthshine reacted to mexykanu for a topic
I don't quite understand what you are trying to do. If you want to rename your files, you could use FileMove, for both Files and Directories.1 point -
Change folder names and file names
Earthshine reacted to AdamUL for a topic
Look at using FileMove. From the help file. Adam1 point -
See post #160 in this thread, VirusTotal is a joke and completely unreliable. Stop flogging the dead horse, it's not going to rise from the dead.1 point
-
Question on Controls / Targeting with AutoIT Info Finder
Earthshine reacted to LarsJ for a topic
Hello Mr. zenocon and welcome to our forums. The "AutoIt Window Info" tool generally detects standard Windows controls in the Control Library, but has only very limited support for Windows Forms controls in .NET Framework. The idea of enumerating the child windows will not really help. The controls are still Windows Forms controls and "AutoIt Window Info" tool will probably not give much information. That some kind of 3rd party code is the reason why you cannot identify the controls is unlikely. The reason is simply the "AutoIt Window Info" tool's lack of support for these controls. The best chance to identify the controls is the UI Automation framework and the "Simple spy tool". Microsoft's answer to this tool is Inspect.exe which is included in the Windows SDK. You can also download a copy in this post.1 point -
StdoutRead displaying output in the scite console output instead of msgbox
Earthshine reacted to Au3Builder for a topic
I ran into a problem as the title says. #include <AutoItConstants.au3> $Run = Run("cmd.exe" & " /c " & "net stop wuauserv",@SystemDir,@SW_HIDE,$STDOUT_CHILD) ProcessWaitClose($Run) $Output = StdoutRead($Run) MsgBox(0,'',$Output)1 point -
StdoutRead displaying output in the scite console output instead of msgbox
Au3Builder reacted to funkey for a topic
Why not use example in help file!!?? #include <AutoItConstants.au3> Local $line Local $Run = Run("cmd.exe" & " /c " & "net stop wuauserv", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line &= StdoutRead($Run) If @error Then ExitLoop WEnd MsgBox(0, "STDOUT read:", $line) $Line = "" While 1 $line &= StderrRead($Run) If @error Then ExitLoop WEnd MsgBox(0, "STDERR read:", $line)1 point -
StdoutRead displaying output in the scite console output instead of msgbox
Au3Builder reacted to Floops for a topic
Did you also replace $STDOUT_CHILD with $STDERR_CHILD ?1 point -
Make CapsLock Great Again
Draygoes reacted to Earthshine for a topic
Chrome has a built-in task viewer and it will show you what all those instances are for. Chrome manages it’s on tasks and every tab is another task and that way if one crashes they don’t all crash so that’s a good reason1 point -
keep gui data in array UDF/framework idea ?
argumentum reacted to water for a topic
I have tried something similar (but not very elaborated) in my ADAT tool (posted in the example scripts section). A tab per GUI, a few lines to create the GUI and a function per GUI to process the entered data.1 point -
Google Speech API
falcontechnics reacted to Deye for a topic
falcontechnics more info from this topic Finding alternatives to what I was seeking to do ,I didn't get to do anything more then whats described in the thread so keep in mind that you will need to search through Google's help to further advance your goal.. As stated in the second from the last post in the thread Hope this helps1 point -
keep gui data in array UDF/framework idea ?
argumentum reacted to mikell for a topic
1) why not ? it depends on the wanted subsequent use 2) no 3) not really. see 2nd part of 1) 4) very subjective. It looks a lot like IBM (intense brain masturbation) , but ... see both parts of 1)1 point -
Error calculating the last row in excel
Earthshine reacted to JLogan3o13 for a topic
@LoneWolf_2106 when you say last row I am assuming you mean last used row, correct? If so, there are a couple of ways you can do it. Something like this is you want all of the data in an array, for later manipulation: #include <Array.au3> #include <Excel.au3> Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, @DesktopDir & "\defects.xlsx") Local $aRange = _Excel_RangeRead($oWorkbook, Default, $oExcel.ActiveSheet.UsedRange) _Excel_BookClose($oWorkbook) _Excel_Close($oExcel) $iLastRow = (UBound($aRange)) ConsoleWrite($iLastRow & @CRLF) Or something like this is you purely want to know the row count: #include <Array.au3> #include <Excel.au3> Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, @DesktopDir & "\defects.xlsx") Local $iLastRow = $oExcel.ActiveSheet.UsedRange.Rows.Count _Excel_BookClose($oWorkbook) _Excel_Close($oExcel) ConsoleWrite($iLastRow & @CRLF)1 point -
@Deye download this udf https://github.com/inververs/googletoken This is example with OAuth 2.0 client ID. But it is better for you to make a service account I have no google drive. Therefore, I can not say what the result will be. Set your own json file and file id #include '_googletoken.au3' $client_json_file = 'client_secret_878378520961-hehpvlick1fkk1f24f1kbhqnl4vep6so.apps.googleusercontent.com.json' _googleapis_setupDesktopOAuth2FromFile($client_json_file) _googleapis_setScope('https://www.googleapis.com/auth/drive') $sAccessToken = _googleapis_getToken() MsgBox(0, 'Token', $sAccessToken) If Not $sAccessToken Then Exit $sFileId = 'enter here fileid' $sURL = 'https://www.googleapis.com/drive/v2/files/' & $sFileId & '/touch' $sHead = 'Authorization=' & 'Bearer ' & $sAccessToken $sResponse = __googleapis_request('POST', $sURL, '', $sHead) MsgBox(0, 'Response', $sResponse)1 point
-
OOP-like approach in AutoIt
seadoggie01 reacted to guinness for a topic
I posted this the other day, but thought I would post in a separate topic instead. #include <MsgBoxConstants.au3> ; ---- Start of Person Class ; Stored in the 'object' to verify it's our 'object' and not some random array Global Const $PERSON_GUID = '4197B285-6AB1-489B-8585-08C852E33F3D' ; Friendly names for 0, 1, 2 and 3 Global Enum $PERSON_AGE, $PERSON_NAME, $PERSON_ID, $PERSON_MAX ; Constructor Func Person($sName, $iAge) Local $hPerson[$PERSON_MAX] ; Set the GUID, so as the verification will work $hPerson[$PERSON_ID] = $PERSON_GUID Person_SetAge($hPerson, $iAge) Person_SetName($hPerson, $sName) ; Return the Person 'object' Return $hPerson EndFunc ;==>Person ; Getter for the age property Func Person_GetAge(ByRef $hPerson) Return _Person_IsObject($hPerson) ? $hPerson[$PERSON_AGE] : Null EndFunc ;==>Person_GetAge ; Setter for the age property Func Person_SetAge(ByRef $hPerson, $iAge) ; If not a valid 'object' or integer then return If Not _Person_IsObject($hPerson) Or Not IsInt($iAge) Then Return ; Set the age $hPerson[$PERSON_AGE] = $iAge EndFunc ;==>Person_SetAge ; Getter for the name property Func Person_GetName(ByRef $hPerson) Return _Person_IsObject($hPerson) ? $hPerson[$PERSON_NAME] : Null EndFunc ;==>Person_GetName ; Setter for the name property Func Person_SetName(ByRef $hPerson, $sName) ; If not a valid 'object' then return If Not _Person_IsObject($hPerson) Then Return ; Set the name $hPerson[$PERSON_NAME] = $sName EndFunc ;==>Person_SetName ; ToString() for the 'object' Func Person_ToString(ByRef $hPerson) Return _Person_IsObject($hPerson) ? StringFormat('Name: %s, Age: %i', $hPerson[$PERSON_NAME], $hPerson[$PERSON_AGE]) : Null EndFunc ;==>Person_ToString ; Check if it's a valid 'object' and not some random array. "NTERNAL ONLY! Func _Person_IsObject(ByRef $hPerson) Return UBound($hPerson) = $PERSON_MAX And $hPerson[$PERSON_ID] == $PERSON_GUID EndFunc ;==>_Person_IsObject ; ---- End of Person Class Example() Func Example() ; Store the Person 'object', which is just a glorified array Local $hP1 = Person('John', 30) ; Display the 'object' MsgBox($MB_SYSTEMMODAL, 'Person 1', Person_ToString($hP1)) ; Create a new person ; Store the Person 'object', which is just a glorified array Local $hP2 = Person('James', 36) ; Display the 'object' MsgBox($MB_SYSTEMMODAL, 'Person 2', Person_ToString($hP2)) ; Set the age for Person 2 Person_SetAge($hP2, 45) ; Display the 'object' MsgBox($MB_SYSTEMMODAL, 'Person 2 - Revised', Person_ToString($hP2)) EndFunc ;==>Example1 point -
Hey folks! I bring this JSON generator I made, which uses a syntax that reminds OOP a little. Here's an example: #include "JSONgen.au3" $oJson = New_Json() ; Let's add some stand-alone elements Json_AddElement($oJson, "test") ; A string Local $aArray[2] = ['hai', 'halo'] Json_AddElement($oJson, $aArray) ; An array ; Let's add some associative elements Json_AddElement($oJson, "hey", 2.55) Json_AddElement($oJson, "delete", "me") ; We will delete this one Json_AddElement($oJson, "hoo", True) Json_AddElement($oJson, "edit", "this") ; And edit this one ; Let's do some editing Json_DeleteElement($oJson, "delete") ; Deleting that one Json_EditElement($oJson, "edit", "that") ; Editing that one ; Let's now add an associated (non-associative) array :) Local $aArray[2] = ['hey', 'bye'] Json_AddElement($oJson, 'array', $aArray) ; Now we get the JSON $sTheJsonCode = Json_GetJson($oJson) MsgBox(0, "Json code", $sTheJsonCode)This will show: Includes help. License: CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/) Download: https://www.autoitscript.com/forum/files/file/345-jsongen-json-generator/1 point
-
Here's the secret sauce behind the hood: Local $sText = "中國 한국어 ไทย" Local $sUTF8 = BinaryToString(StringToBinary($sText, 4), 1) IniWrite("my.ini", "test", "key", $sUTF8) Local $sRaw = IniRead("my.ini", "test", "key", "I'm not there") Local $sValue = BinaryToString(StringToBinary($sRaw, 1), 4) MsgBox(0, "Round-trip check", $sValue)1 point