Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/14/2021 in all areas

  1. 2 points
  2. Nooooooooooooooooooooooooooooooooooooooo! Run! Seriously though, what happens when you suddenly need to change a file from last year because you made a mistake? Use the file name and convert it to sort your files
    2 points
  3. 2 points
  4. 1. A small note (you probably just forgot ) : Use #include <FileConstants.au3> [...] ;Collect file list Local $aFileList = _FileListToArray($sSourceDir, default, $FLTA_FILES) instead of ;Collect file list Local $aFileList = _FileListToArray($sSourceDir) Otherwise the folders will also be listed. 2. Regarding LastModified date, I would like to quote a post written by @seadoggie01 : (I agree with that !) As far as I understand it, the date within the file name is the controlling element. The problem is just the sorting, since the month name is given as a shortened string. I would therefore modify @spudw2k approach a bit. Instead of a date, replace the month part in the original filename with a numeric value (Jan=01 ... Dec=12) and insert it into the additional column. The suggestions of @pseakins and @pixelsearch would also be a solution, of course .
    2 points
  5. If you go back and reread my post, you'll see that it wasn't directed at you. 😛
    1 point
  6. Thank you argumentum for you reply. When I run your script the DBUG window opens up, but I have no idea what to do next. I need to do a lot of reading on this debugger to learn how to use it. Thanks for getting me started with it though. In the meantime, I need to sort out different issues with the GUI functions.
    1 point
  7. @Marlon13 You missed one minor detail. You must alter the line _WD_Option('DriverParams', '--log trace') to include some additional instructions to tell geckdriver the correct port to use. The modified line should look like this -- _WD_Option('DriverParams', '--log trace --marionette-port 2828')
    1 point
  8. after using this snippet: Local $s_FireFox_exe = StringReplace('C:\Program Files (x86)\Mozilla Firefox\firefox.exe','\', '\\') $sDesiredCapabilities = '{"capabilities":{"alwaysMatch":{"moz:firefoxOptions":{"binary":"' & $s_FireFox_exe & '", "args": ["-profile", "' & GetDefaultFFProfile() & '"],"log": {"level": "trace"}}}}}' It works well. Thanks @Danp2
    1 point
  9. @mLipok You can do it as part of the DesiredCapabilities string -- $sDesiredCapabilities = '{"capabilities":{"alwaysMatch": {"moz:firefoxOptions": {"binary":"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "args": ["-profile", "' & GetDefaultFFProfile() & '"],"log": {"level": "trace"}}}}}'
    1 point
  10. If you are on Windows 10, then I don't think it's possible to automate a menu on a locked PC. For safety reasons. Also, keep in mind that all AutoIt documentation was written before Windows 10 was released.
    1 point
  11. @Marlon13 This works for me. Please test and report back -- #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupGecko() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.facebook.com/") MsgBox(0, "Pause", "") _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace --marionette-port 2828') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"capabilities":{"alwaysMatch": {"moz:firefoxOptions": {"args": ["-profile", "' & GetDefaultFFProfile() & '"],"log": {"level": "trace"}}}}}' EndFunc ;==>SetupGecko Func GetDefaultFFProfile() Local $sDefault, $sProfilePath = '' Local $sProfilesPath = StringReplace(@AppDataDir, '\', '/') & "/Mozilla/Firefox/" Local $sFilename = $sProfilesPath & "profiles.ini" Local $aSections = IniReadSectionNames ($sFilename) If Not @error Then For $i = 1 To $aSections[0] $sDefault = IniRead($sFilename, $aSections[$i], 'Default', '0') If $sDefault = '1' Then $sProfilePath = $sProfilesPath & IniRead($sFilename, $aSections[$i], "Path", "") ExitLoop EndIf Next EndIf Return $sProfilePath EndFunc
    1 point
  12. Hi there, glad my code was able to help you get started with incorporating Webview2 into AutoIt! I haven't updated that post in a while but I've wrapped more of the functionality since then. Certainly not all of it because I don't have a use for a lot of the methods right now. Awesome you were able to pick this up for the AutoIt community!
    1 point
  13. Version 1.6.4.0 of the UDF has been released. Please test before using in production! For download please see my signature.
    1 point
  14. water

    OutlookEX_GUI UDF

    Version 1.4.0.0 of the UDF has been released. Please test before using in production! For download please see my signature.
    1 point
  15. Is it possible that you have forgotten #include <Date.au3> ?
    1 point
  16. @GeorgeP One of many ways: #include <Array.au3> #include <Date.au3> #include <File.au3> Test() Func Test() Local $strFilePath = @ScriptDir & "\TestDirectories\", _ $arrPathList, _ $strMonthName $arrPathList = _FileListToArray($strFilePath, "*", $FLTA_FOLDERS) If @error Then Return ConsoleWrite("_FileListToArray ERR: " & @error & @CRLF) For $i = 1 To $arrPathList[0] Step 1 $strMonthName = StringRegExp($arrPathList[$i], '(?i)\d{4}([a-z]+)\d{2}', $STR_REGEXPARRAYMATCH)[0] $arrPathList[$i] = StringRegExpReplace($arrPathList[$i], '(?i)(\d{4})([a-z]+)(\d{2})', '${1}' & _MonthNameToNumber($strMonthName) & '${3}') Next _ArraySort($arrPathList) _ArrayDisplay($arrPathList) EndFunc Func _MonthNameToNumber($strMonthName) For $i = 1 To 12 Step 1 If StringRegExp($strMonthName, '(?i)' & _DateToMonth($i, $DMW_LOCALE_SHORTNAME), $STR_REGEXPMATCH) Then Return ($i > 9 ? $i : '0' & $i) Next EndFunc
    1 point
  17. Shouldn't it be WinMenuSelectItem($hMenu, "", _GUICtrlMenu_GetItemText($hMenu, $i)) And move the last line outside the loop.
    1 point
  18. Hi Tick, The only way I found to solve your case is to Send a couple of Key down then Send Enter when you reach the desired context menu item. I really wish another reader could provide a better solution for this, as it would be useful in many cases.
    1 point
  19. Thanks I'd hoped this would do the trick (but didn't): Func SetupGecko() $ff = '--binary C:\Program Files (x86)\Mozilla Firefox\firefox.exe' _WDOption('Driver', 'geckodriver') _WDOption('DriverParams', $ff) _WDOption('Port', 2828) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc
    1 point
×
×
  • Create New...