Leaderboard
Popular Content
Showing content with the highest reputation on 11/14/2018 in all areas
-
Thanks for sharing solution.2 points
-
Thanks everyone, that was the problem using this code i get my array correctly displayed #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Example() Func Example() $Searchfor = "%21006051" $path = "\\?\T:\dir\dir\dir\dir\dir\dir" $aArray = _FileListToArrayRec($path, $Searchfor &"*" &"|", $FLTAR_FOLDERS, $FLTAR_RECUR, $FLTAR_SORT) _ArrayDisplay($aArray, "Sorted tree") EndFunc2 points
-
That's called "Learning by doing"2 points
-
Parse String based on multiple conditions to array
boomingranny reacted to mikell for a topic
Funny challenge #Include <Array.au3> $str = "+AA1/AA2/AA3+BB1/BB2+CC1/CC2/CC3/CC4+DD4" $a = StringRegExp($str, '[^+]+', 3) Local $aRes[0][UBound($a)], $string, $sRes _LetsGo(0, "") _ArrayAdd($aRes, StringTrimRight($sRes, 2)) _ArrayDisplay($aRes) Func _LetsGo($k, $string) Local $tmp = StringSplit($a[$k], "/", 2) For $i = 0 to UBound($tmp) -1 If $k = UBound($a) -1 Then $sRes &= $string & $tmp[$i] & @crlf Else _LetsGo($k + 1, $string & $tmp[$i] & "|") EndIf Next EndFunc1 point -
About detecting changes to files?
FrancescoDiMuro reacted to Jos for a topic
It works sort-of as it returns all changes to the GUI but the GUI is unresponsive. I actually have the proper working code prepared but simply refuse to provide code to people unwilling to make any progress themselves first and make this a learning experience. Jos1 point -
Extract some content from a Word document and email it
abdulahhamzic reacted to water for a topic
To handle the Word part I suggest to have a look at the Word UDF that comes with AutoIt. The mail creation/sending part depends on the mail client you run to access your GMail account. Outlook, Web-client ...?1 point -
It can be solved by using ResHacker with commandline "-open -action delete" (see http://www.angusj.com/resourcehacker/) called from #AutoIt3Wrapper_Run_After section so it will be called automatically AFTER each compilation. example of RunAfter from AutoIt3Wrapper.au3: #AutoIt3Wrapper_Run_After=copy "%in%" "..\..\Programs_Updates\AutoIt3Wrapper" #AutoIt3Wrapper_Run_After=copy "%out%" "..\..\Programs_Updates\AutoIt3Wrapper" #AutoIt3Wrapper_Run_After=copy "%in%" "c:\Program Files (x86)\autoit3\SciTE\AutoIt3Wrapper" #AutoIt3Wrapper_Run_After=aaCopy2Prod.exe "%scriptfile%.EXE" "%out%" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper" "%in%" %fileversion% %fileversionnew%1 point
-
[SOLVED] How to change the status of an email from unread to read
nooneclose reacted to water for a topic
That's it You get smarter every day1 point -
[SOLVED] How to change the status of an email from unread to read
nooneclose reacted to water for a topic
To get the same result when moving from "Read=True" to "Unread=???" which value does ??? need to have?1 point -
_GUICtrlListView_
caramen reacted to FrancescoDiMuro for a topic
@caramen I think that _GUICtrlListView_GetItemSelected() would be more appropriate1 point -
1 point
-
1 point
-
View AutoIt Code When Program Is Compiled
bs27975 reacted to FrancescoDiMuro for a topic
@Skeletor FAQ #271 point -
Please have a look at the help file for _Excel_BookSaveAs to see how to overwrite an existing file1 point
-
#include <Excel.au3> Global $oExcel = _Excel_Open() If @error Then Exit MsgBox(0, "Error", "_Excel_Open returned @error = " & @error & ", @extended = " & @extended) Global $sWorkbook = "J:\OPS\OPS_Share\Planners\2 - Weekly Reports\Auto download\.xls files\INV_PLAN_PUR_ORDER " & $yy & $mm & $dd Global $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook & ".xls") If @error Then Exit MsgBox(0, "Error", "_Excel_BookOpen returned @error = " & @error & ", @extended = " & @extended) _Excel_BookSaveAs($oWorkbook, $sWorkbook & ".xlsx", $xlWorkbookDefault) If @error Then Exit MsgBox(0, "Error", "_Excel_BookSaveAs returned @error = " & @error & ", @extended = " & @extended) _Excel_BookClose($oWorkbook) If @error Then Exit MsgBox(0, "Error", "_Excel_BookClose returned @error = " & @error & ", @extended = " & @extended) _Excel_Close($oExcel) If @error Then Exit MsgBox(0, "Error", "_Excel_Close returned @error = " & @error & ", @extended = " & @extended)1 point
-
Add this before the While line Global $flag = 0 ; <<<<<<<<<<<<< While $charcnt < 40 And change this part too. If Not $flag Then ; <<<<<<<<<<<<<<<<< Add this $sFileSelectFolder = FileSelectFolder("Select a folder", "J:\OPS\OPS_Share\Planners\2 - Weekly Reports\Auto download") If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No folder was selected.") Exit Else ; Display the selected folder. MsgBox($MB_SYSTEMMODAL, "", "You chose the following folder:" & @CRLF & $sFileSelectFolder) $Flag = 1 ; <<<<<<<<<<<<<<<<< Add this EndIf EndIf ; <<<<<<<<<<<<<<<<< Add this1 point
-
Run the script from within SciTE without compiling it, and read the output of the ConsoleWrite in the output pane in SciTE.1 point
-
but does unc path also fail? what about the shortname?1 point
-
Do you, by any chance, use #RequireAdmin in your real script? If so, you would probably need to use the UNC path instead of the relative path to the folder.1 point
-
Problem with _FileListToArrayRec while using a network path
Reher reacted to FrancescoDiMuro for a topic
Hi @Reher, and welcome to the AutoIt forums _FileListToArrayRec(), as almost every function, returns an @error code in case of error. Try to add this little snippet after the call of _FileListToArrayRec(), so you can see if there is an error, and what kind of error it is: ; Call _FileListToArrayRec() If @error Then ConsoleWrite("Error while calling _FileListToArrayRec()! Error: " & @error & @CRLF) Else ; Do something EndIf1 point -
thats a lot of dirs, might you be running afoul of1 point
-
Sprint run in game when i press W - (Locked)
ibrahem reacted to Sanjay_Jayan for a topic
COuld you guys help me with a script which can activate the shift key as i press the W key inorder to sprint run ... please ... so i dont have to press both w and shift at same time.1 point -
Ok, finally... I have downloaded ALL examples and UIA... files and checked all they content and finally found missing libraries... and it seems like I was able to pass this error. I will proceed with my task... Thank you.1 point
-
1 point
-
[Solved] Auto-resizing RichEdit control
pixelsearch reacted to Mat for a topic
You have to handle the WM_SIZE message yourself unfortunately, and then use ControlMove (Or MoveWindow as I have). This means doing all the maths yourself as well, as you don't get the easy to use resizing flags. This is a simple case with a 2px border on all sides, so the maths wasn't hard. #include<GUIRichEdit.au3> #include<WindowsConstants.au3> #include<EditConstants.au3> #include<WinAPI.au3> Global $hGUI = GUICreate("Testing WM_SIZE", 350, 250, -1, -1, BitOR($WS_THICKFRAME, $WS_POPUP, $WS_CAPTION, $WS_SYSMENU)) Global $hRichEdit = _GUICtrlRichEdit_Create($hGUI, "This is a test.", 2, 2, 346, 246, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUISetState() While True $iMsg = GUIGetMsg() Select Case $iMsg = -3 _GUICtrlRichEdit_Destroy($hRichEdit) GUIDelete() Exit EndSelect WEnd Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) Local $iWidth = _WinAPI_LoWord($lParam) Local $iHeight = _WinAPI_HiWord($lParam) _WinAPI_MoveWindow($hRichEdit, 2, 2, $iWidth - 4, $iHeight - 4) Return 0 EndFunc ;==>WM_SIZE1 point