Jump to content

Andreik

Active Members
  • Posts

    3,959
  • Joined

  • Days Won

    38

Andreik last won the day on July 17 2024

Andreik had the most liked content!

3 Followers

About Andreik

  • Birthday January 1

Profile Information

  • Member Title
    Joker

Recent Profile Visitors

6,268 profile views

Andreik's Achievements

  1. It's good to have a constant desire to write good and fast running code but on this matter I have the same feeling as @argumentum and as long as I use AutoIt I don't care too much so I use a mix of different conditional statements that make sense in each situation. If the performance it's such an issue to make me fight for each 1000th part of a ms probably I want to code in another language. But again as a good practice and for learning purpose your question is legit.
  2. What is the actual implementation of the function? If you can share it I will take a look.
  3. Have a look here and see if any method suggested there works for you.
  4. That's what I suspected but not being familiar with WebDriver I thought it wouldn't hurt to ask. @Danp2 It's good to know that there might be a solution without using geckodriver but seems to imply more technical requirements. I tried few examples with different parameters from wiki and forum but none seems to work as I expect. I have a solution for what I currently need but I would like to investigate this subject for further projects.
  5. It's my first time when I use this UDF and I try to connect to a running browser instance. I read already this post but I am not really sure if this is my case since the existing browser instance it's created by calling ShellExecute() not using _WD_Navigate(). I have this basic example that fails. #include "wd_core.au3" #include "wd_helper.au3" _WD_Option('Driver', 'geckodriver.exe') _WD_Option('Port', 4444) _WD_Option('DriverParams', '--log trace') _WD_Startup() $sCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}' $sSession = _WD_CreateSession($sCapabilities) ShellExecute('https://google.com') Sleep(5000) ConsoleWrite(_WD_Attach($sSession, 'Google', 'title') & @CRLF) _WD_DeleteSession($sSession) Is there any chance to use WebDriver UDF with an instance created via ShellExecute()?
  6. It matters for the script. If it's anything else than empty string or some sort of spaces then most likely you pass to FileDelete() an invalid path.
  7. What is $_sSrcPath2? The following path already looks fine.
  8. Check in help file FileDelete(). You can use wildcards in the path like <DirPath>\*.pdf in order to delete all pdf files from a directory (replace <DirPath> with the full path to your actually directory).
  9. For $x = 90 To 65 Step -1 ... Next
  10. What are you talking about, how it's related to AutoIt and why did you post in this section of the forum reserved for example scripts?
  11. Global Const $DWMWA_SYSTEMBACKDROP_TYPE = 38 $tResult = DllStructCreate('int DWM_SYSTEMBACKDROP_TYPE;') $hWin = WinGetHandle('[ACTIVE]') ; Change with your window handle DllCall('Dwmapi.dll', 'long', 'DwmGetWindowAttribute', 'hwnd', $hWin, 'dword', $DWMWA_SYSTEMBACKDROP_TYPE, 'ptr', DllStructGetPtr($tResult), 'int', DllStructGetSize($tResult)) ConsoleWrite('DWM_SYSTEMBACKDROP_TYPE: ' & $tResult.DWM_SYSTEMBACKDROP_TYPE & @CRLF) Possible results: 0 - DWMSBT_AUTO 1 - DWMSBT_NONE 2 - DWMSBT_MAINWINDOW 3 - DWMSBT_TRANSIENTWINDOW 4 - DWMSBT_TABBEDWINDOW Or simply use _WinAPI_DwmGetWindowAttribute().
  12. If @Dan_555's solution doesn't work you can try this.
  13. You get the answer if you read the documentation. Use a custom GUI with an input or edit control and I think you are fine.
  14. Awesome work, thanks for sharing. One thing I couldn't get to work because I don't know where is _la_adj() defined? It's called on line 44 in example_adjustment_circle.au3. I suppose it's a relic and should be _la_adjustment().
  15. Maybe a mouse hook will work so you can get the info about what window is clicked from MOUSEHOOKSTRUCT structure. In order to find if it's a simple click or a double click you can use a timer and GetDoubleClickTime() function.
×
×
  • Create New...