Jump to content

llssff

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

llssff's Achievements

  1. Oh cool, I didn't know the PID was different from the handle. Gonna go try this. ty
  2. Thank you for the reply. @Subz Is it possible for me to grab the handle from the result of Run? I am wondering because I might have multiple of the same class.
  3. My current script: ``` $notepadWindow = RunWait('notepad.exe') ControlSend($notepadWindow, "Edit1", "", "abcde") WinSetState($notepadWindow, "", @SW_MINIMIZE) ``` I can't seem to get these three lines to work. Its supposed to run a notepad window, then enter "abcde", followed by minimizing it. Currently it just opens and nothing happens. What am I doing wrong here?
  4. @Luke94 Thanks for the help. I figured it out after some poking around. The issue turned out to be: Adding msgbox to debug was causing windows to go out of focus. Seems obvious now, but was why I couldn't get your code to work immediately. Handles behaving weird for rdp window when using [button, instance] combo. Turns out ID is the best way to locate a button according to the doc. Turns out, Send( ) does wonders. Here is the snip of the final working code. Thanks again, hopefully we both learned something today.
  5. I've tried the changes, but the window is still hovering with no changes. Are you getting two warning windows on your end? The workflow I'm trying to automate is: rdp shortcut -> remote desktop connection(above) -> windows security -> vm open I have the windows security part done, this window for some reason just doesn't seem to work.
  6. Wow, that was super quick. Thanks. @Luke94 I did some testing with msgboxes. I looks like it indeed was not in focus. It came into focus after the second if, but the buttons still are not being clicked. The weird thing is, even sending manual commands via ```Send()``` does not seem to work. I tried using tab, space, enter to check the box, then connect., but none of it affected the rdp window. Wondering what you think of this.
  7. @Luke94 For some reason the script stopped working for the rdp window. Using your code above, I managed to find the windows handle. However, for some reason the buttons are not being pressed despite the instance numbers being correct(1 for checkbox, 11 for connect). Do you have any ideas on why it may be bugging out?
  8. I am trying to run an executable on a file that is given as a parameter of the AutoIt script. "auto3.exe myScript.au3 someFilePath" The issue is the quotes need to be there since Run takes one parameter, but with them there autoIt recognizes the parameter var as a String. Anyone have tips on how to make this work? or a better way to pass the parameter in?
  9. Thank you for the code snippet. It worked like a charm!
  10. Having some issues figuring out automation for RDP on win10. Would appreciate any tips you guys got. What I am trying to accomplish: Use an autoIt script to: open a remote desktop connection Check 'Don't ask me again for connections to this computer', click connect Allow for remote desktop to load Disconnect Attempted to run the remote desktop connection with mstsc.exe, but got the error The shortcut name is The properties My code so far Anyone know why I am getting this error? Or of a better way to perform this task?
×
×
  • Create New...