Jump to content

Recommended Posts

Hey everyone

I want to be able to press a button within a application however so far what I have tried does not seem to be working. I have successfully made the application (window) active, but when I try:

    WinActivate("- AdwCleaner - v4.109")
    WinWaitActive("- AdwCleaner - v4.109")
    send("{Tab}{Space}") ; even ("{TAB}{SPACE}")

 

    WinActivate("- AdwCleaner - v4.109")
    WinWaitActive("- AdwCleaner - v4.109")
    ControlSend("- AdwCleaner - v4.109", "", "[CLASSNN:Button3]", "{SPACE}")

 

    WinActivate("- AdwCleaner - v4.109")
    WinWaitActive("- AdwCleaner - v4.109")
    ControlClick("- AdwCleaner - v4.109", "Scan", "[CLASS:Button;INSTANCE:3]")

 

I have tried using the finder utility and that is how I got the Class and instance number but nothing is working. Could someone help?

Thanks

Grimm

post-76479-0-21762500-1422986938_thumb.p

Thanks

Grimm

Link to post
Share on other sites

this worked find for me:

Local $hndle = WinActivate("- AdwCleaner -")

WinWaitActive($hndle)

Send("{Tab}")
Send("{Space}")

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to post
Share on other sites

Hm, give this one a try:

Run("AdwCleaner.exe")

WinWaitActive("- AdwCleaner -")

Send("{Tab}")
Send("{Space}")
Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to post
Share on other sites

A shot in the dark, but put #RequireAdmin at the top of your script and try it again.

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Iraj
      Greetings!
      I am trying to pass parameters using Send () function as below
      $sFilePath = @ScriptDir & "\config.ini" Local $hFileOpen = FileOpen($sFilePath, $FO_READ) Local $sURLUsername = FileReadLine($hFileOpen, 1) Local $sURLPassword = FileReadLine($hFileOpen, 2) Local $sAutomation = FileReadLine($hFileOpen, 3) Run("chrome facebook.com") Sleep(5000) Send($sAutomation) FileClose($hFileOpen) The config.ini file contains below lines
      abcd wxyz $sURLUsername{TAB}$sURLPassword{ENTER} While running,  I am getting $sURLUsername & $sURLPassword in the username & password field instead of abcd & wxyz as provided.
      Refer image below:

       
      Where am I going wrong? Any suggestions or assistance will be grateful. 
    • By StMaSi
      I have a script I'm working on and I just about have it complete...save one piece of functionality. The script proceeds through 3 or 4 different screens (depending on the series of button clicks), but one of the automated ControlClick() commands works (welcome screen), but the same automated ControlClick() commands fails (defer screen). Can anyone provide some insight as to why the aforementioned ControlClick() isn't working, but the first one does? I've attached a basic flowchart of how the code is supposed to work as well as the code. Thanx in advance.

      code.txt
    • By cruisepandey
      Hi There ! 
      I have a script here : 
       
      ;Launch CMD
      Run("C:\Windows\System32\cmd.exe")
      sleep(2000)
      $cmdHandle = WinActivate("C:\Windows\System32\cmd.exe")
      Sleep(2000)
      ;Sending document
      ControlSend($cmdHandle, "", "", "ftp" & @CRLF)
      ControlSend($cmdHandle, "", "", "open" & @CRLF)
      Sleep(2000)
      ControlSend($cmdHandle, "", "", "first command" & @CRLF)
      Sleep(2000)
      ControlSend($cmdHandle, "", "", "second-coomand" & @CRLF)
       
      first-command and second-command I can't provide cause it's internal. I have complied this .au3 file into an exe and it does the work. But I need to invoke this with Java. Java code I have tried is : 
       
          ProcessBuilder pb = new ProcessBuilder("C:\\Users\\username\\eclipse-workspace\\Examples\\src\\com\\own\\examples\\etc.exe");
          pb.start();
          Thread.sleep(5000);
       
      Through java it just launches the cmd and nothing happens after that. Please help !!
    • By TrippingSync
      Hello guys, I'm trieng to get my script to send arrow left 134 times rapidly to set the type position to a set point, I can't get this to work as {25 134} will send 25 134 times, instead of arrow left.
      here is a snippet of my code:
      Send("[url=https://google.com][color=lime][b][/b][/color][/url][right][acronym='TrippingSync is awesome!'][color=grey][sup]Hover over me[/sup][/color][/acronym][/right]") Send(25, 134)I tried several methods, but none seem to work :S
       
      Thanks in advance,
       
       
      TrippingSync
    • By bootybay
      So I basically just want to automate a quick website login.
      I know I can use Send() and it works fine but I want to be able to use ControlSend() for this.
      There is one specific special character that is giving me trouble. The good old @.
      I just can't controlsend this. It doesnt matter if I use the raw(1) or default(0) flag.
       
      For special characters like "!" I can just workaround and use "+1"  = (Shift +1) instead.
      But for "@" I can't use "^!q" = (CTRL+ALT+q). (I got a german keyboard, the english "+2" = (Shift  +2) is not working)
      Examples:
      ControlSend($hwnd, "", "", "mail@box.com", 0) -> "mailqbox.com" ControlSend($hwnd, "", "", "mail@box.com", 1) -> "mailqbox.com" ControlSend($hwnd, "", "", "mail^!qbox.com", 0) -> "mailqbox.com" ControlSend($hwnd, "", "", "mail^!qbox.com", 1) -> "mail^!qbox.com" I hope someone can help me out. This is driving me insane.
×
×
  • Create New...