Jump to content

Andreik

Active Members
  • Posts

    3,955
  • 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,143 profile views

Andreik's Achievements

  1. 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()?
  2. 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.
  3. What is $_sSrcPath2? The following path already looks fine.
  4. 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).
  5. For $x = 90 To 65 Step -1 ... Next
  6. 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?
  7. 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().
  8. If @Dan_555's solution doesn't work you can try this.
  9. 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.
  10. 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().
  11. 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.
  12. ShellExecute('ms-photos:viewer?fileName={Your image path here}') or if your default app for certain file extension is already MS Photos you can simply use ShellExecute('{Your image path here}') PS: brackets above mark a placeholder, you don't need them
  13. _FileListToArrayRec() search recursively for files in subdirectories and _FileListToArray() does not.
  14. Same script works on different machines and you still think it's still something wrong with AutoIt but not with a specific machine or the network or a firewall or anything else, right? Also why don't you use ObjEvent() so you have at least an error code or a message as a starting point to identify the issue?
  15. Just use ControlFocus() and focus another control or if you want to prevent dotted focus lines then check out this thread. #include <WinAPISysWin.au3> $hGUI = GUICreate('Test') $cButton = GUICtrlCreateButton('Click Me', 100, 100, 100, 30) $hButton = GUICtrlGetHandle($cButton) $cDummy = GUICtrlCreateLabel('', 0, 0, 0, 0) GUISetState(@SW_SHOW, $hGUI) While True Switch GUIGetMsg() Case -3 ; GUI_EVENT_CLOSE Exit Case $cButton MsgBox(0, '', 'You clicked the button') EndSwitch If _WinAPI_GetFocus() = $hButton Then ControlFocus($hGUI, '', $cDummy) WEnd
×
×
  • Create New...