Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/03/2019 in all areas

  1. Seems to work for me: Local $oShellApplication = ObjCreate("Shell.Application") Local $oShellFolder = $oShellApplication.NameSpace(36) ; this is c:\windows. Local $oShellFolderItems = $oShellFolder.Items() Local $oShellFolderItemsFilterFlags = 64 $oShellFolderItems.Filter($oShellFolderItemsFilterFlags, "*.exe;*.log") For $oShellFolderItem In $oShellFolderItems ConsoleWrite ($oShellFolderItem.name & @CRLF) Next Lists all *.exe and *.log from my windows-dir.
    2 points
  2. Exit

    problems scite

    WIN+left arrow
    1 point
  3. Jos

    problems scite

    Doesn't double clicking the top of the scite window work to maximise it? Go into the same directory as is used for sciteuswr.properties and check for the scite.session file and reset the position parameters. Jos
    1 point
  4. Melba23

    AutoItExe Return Error.

    Nas, When you reply in future, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - responders know what they wrote and it just pads the thread unnecessarily. Thanks in advance for your cooperation. M23
    1 point
  5. water

    AutoIt Snippets

    Sorry, I do not understand the point of this post. I would mark a negative number/string this way: Func _PrefixNeg($vNumber) If IsNumber($vNumber) Then ; $vNumber is numeric If $vNumber > 0 Then Return $vNumber * -1 ; $vNumber is > 0 Else Return $vNumber ; $vNumber is already negative, return unchanged EndIf ElseIf IsString($vNumber) Then ; $vNumber is a string Return "-" & $vNumber ; Prefix $vNUmber with "-" Else Return SetError(1, 0, 0) ; Neither string nor number, return error EndFunc ;==>_PrefixNeg
    1 point
  6. Nine

    AutoItExe Return Error.

    I would assume he wants to show a progress bar or something similar during the copy... Here how I would do it : #include <Constants.au3> Local $sSourceFolder = "C:\Apps\Temp" Local $sDestFolder = @ScriptDir & "\Temp" Local $sCommand = ' /AutoIt3ExecuteLine "FileWriteLine (''DirCopy.log'',DirCopy(''' & $sSourceFolder & ''',''' & $sDestFolder & '''))"' Local $pid = Run(@AutoItExe & $sCommand) While ProcessExists ($pid) Sleep (100) ; show progress bar here for example WEnd Local $sStatus = FileRead ("DirCopy.log") FileDelete ("DirCopy.log") MsgBox ($MB_SYSTEMMODAL,"",$sStatus)
    1 point
  7. Have you ever been in the country with nobody around? What can you hear the most? Crickets and that’s what he was getting at It’s a metaphor for getting no real response
    1 point
  8. @junichironakashima, You seriously reported that reply as being rude? Well let me tell you you ain't seen nothing yet, so you better explain without any further moaning what you are exactly doing and answer the questions raised this time! so: What are you trying to automate with this script? Jos
    1 point
  9. You need to figure out the correct method to retrieve the desired value. Best way to do that is to use the browser's developer tools to examine the element and see what properties / attributes are available. From what I can tell, you should be able to use either InnerText or textContent to retrieve the text you're after. Not positive, but I think these are properties, so I would try that before attribute.
    1 point
  10. in before the good regexes show up #include<array.au3> Local $aCheck[10] = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] Local $aIgnore[3] = ["b", "d", "g"] msgbox(0, '' , stringreplace(stringregexpreplace(_ArrayToString($aCheck , ",") , _ArrayToString($aIgnore) , "") , ",," , ","))
    1 point
  11. Technically, just putting a MsgBox in place of the ConsoleWrite works just fine; you get one MsgBox per letter in your for loop, just like consolewrite is outputting one letter per cycle through the loop: I am guessing, though, what you mean is that you're after one MsgBox at the end with the entire string, something like this: #include <MsgBoxConstants.au3> Local $aCheck[10] = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] Local $aIgnore[3] = ["b", "d", "g"] $sString = "" For $j = 0 To UBound($aCheck) - 1 ; Get the next item in the array to check $sItem = $aCheck[$j] ; Set a flag $fValid = True ; Now loop through the exceptions For $i = 0 To UBound($aIgnore) - 1 ; If it matches clear the flag If $sItem == $aIgnore[$i] Then $fValid = False EndIf Next ; If the flag is set it is a valid item If $fValid Then $sString &= $aCheck[$j] & "," Next MsgBox($MB_OK, "MyString", StringTrimRight($sString, 1))
    1 point
  12. Your attitude thus far leaves a lot to be desired. I am fine with the thread continuing, if anyone wants to bother trying to help you; though based on your posts thus far it wouldn't surprise me if you hear nothing but crickets....
    1 point
  13. Why not just use FileListToArrayRec with a depth parameter set?
    1 point
  14. I see what is the problem, with the _IECreate, now try this : #include <Constants.au3> #include <IE.au3> Opt ("MustDeclareVars", 1) Global $website_link = "https://www.google.com/" Global $TextToAdd = "Hello there", $oIE Global $hWnd = WinGetHandle ("[CLASS:IEFrame]") If $hWnd Then $oIE = _IEAttach ($hWnd, "hwnd") If @error Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error attaching IE") Else $oIE = _IECreate () If @error Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error creating IE") $hWnd = _IEPropertyGet ($oIE, "hwnd") EndIf WinSetState($hWnd, "", @SW_MAXIMIZE) WinActivate($hWnd) WinWaitActive($hWnd) _IENavigate($oIE, $website_link) If @error Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error navigating IE") Global $oTitle = _IEGetObjByName($oIE, "q") _IEFormElementSetValue($oTitle, $TextToAdd)
    1 point
  15. You can use _WinAPI_GetDlgCtrlID() to get the control id from the handle. Br, UEZ
    1 point
  16. Nas

    AutoItExe Return Error.

    Hello guys, Is there a way to get DirCopy return code from this command : local $pid = Run(@AutoItExe & ' /AutoIt3ExecuteLine "DirCopy(' ' ' & $sSourceFolder & ' '', ' ' ' & $sDestFolder & ' ' ') " ') Something like this but it doesn't work : local $pid = Run(@AutoItExe & ' /AutoIt3ExecuteLine " $Check = DirCopy(''' & $sSourceFolder & ''', ''' & $sDestFolder & ''')"') Thank you
    0 points
×
×
  • Create New...