Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/14/2018 in all areas

  1. 2 points
  2. 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") EndFunc
    2 points
  3. That's called "Learning by doing"
    2 points
  4. 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 EndFunc
    1 point
  5. 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. Jos
    1 point
  6. 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
  7. 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
  8. 1 point
  9. To get the same result when moving from "Read=True" to "Unread=???" which value does ??? need to have?
    1 point
  10. @caramen I think that _GUICtrlListView_GetItemSelected() would be more appropriate
    1 point
  11. Jos

    Lua scripts

    Yes... Gelp? Jos
    1 point
  12. Please have a look at the help file for _Excel_BookSaveAs to see how to overwrite an existing file
    1 point
  13. #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
  14. BrewManNH

    switch case help

    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 this
    1 point
  15. Run the script from within SciTE without compiling it, and read the output of the ConsoleWrite in the output pane in SciTE.
    1 point
  16. but does unc path also fail? what about the shortname?
    1 point
  17. 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
  18. 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 EndIf
    1 point
  19. thats a lot of dirs, might you be running afoul of
    1 point
  20. 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
  21. 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
  22. See this thread: IUIAutomation
    1 point
  23. 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_SIZE
    1 point
×
×
  • Create New...