Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Pressing a button not working...


  • Please log in to reply
5 replies to this topic

#1 Chimaera

Chimaera

    Sorry .. Where am i again?

  • Active Members
  • PipPipPipPipPipPip
  • 1,985 posts

Posted 28 November 2012 - 02:54 PM

Ive been trying to make autoit press a button when a particular box apperas from a program

$path_mal = @ProgramFilesDir & "Malwarebytes' Anti-Malwarembam.exe" SplashTextOn("Checking ...", "Malwarebytes Updating", 200, 50, -1, -1, 18) ShellExecuteWait( $path_mal, " /update") ; updates ;~ WinClose("[CLASS: #32770]", "") ;~ If WinExists("[CLASS:Button]") Then ;~ Send("{ENTER}") ;~ EndIf ;~ If WinExists("Malwarebytes Anti-Malware") Then ;~ Send("{ENTER}") ;~ EndIf ;~ WinWaitActive("[CLASS:Button; ID:2]","OK") ;~ Sleep(2000) ;~ Send("{ENTER}") SplashOff()


Ive left some of my tries so you can see what ive been doing, but this particular button resist what im doing.
It is active and the button is highlighted pressing enter on the keyboard works, just not thru the autoit

Suggestions?

Edited by Chimaera, 28 November 2012 - 02:55 PM.

If Ive just helped you ... miracles do happen. Chimaera 

 

CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()








#2 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,351 posts

Posted 28 November 2012 - 04:24 PM

Doesn't ShellExecuteWait() make your script wait till the program is finished?

Edited by Jos, 28 November 2012 - 04:27 PM.
typo

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#3 kylomas

kylomas

    FUBAR

  • MVPs
  • 3,071 posts

Posted 28 November 2012 - 04:25 PM

Chimaera,

This may help.

kylomas

"Really?, How Do you know the're not random numbers?"

 

Forum Rules         Procedure for posting code

 

"A child educated only at school is an uneducated child."

    - George Santayana

 

"Never miss a good chance to shut up."

    - Will Rogers
 


#4 Chimaera

Chimaera

    Sorry .. Where am i again?

  • Active Members
  • PipPipPipPipPipPip
  • 1,985 posts

Posted 28 November 2012 - 08:36 PM

Doesn't ShellExecuteWait() make your script wait till the program is finished?

yes it does what an idiot :)

Thx

@kylomas
this is the one i use looks a bit more recent
http://forums.malwarebytes.org/index.php?showtopic=10138&view=findpost&p=162095

Edited by Chimaera, 28 November 2012 - 08:38 PM.

If Ive just helped you ... miracles do happen. Chimaera 

 

CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()


#5 kylomas

kylomas

    FUBAR

  • MVPs
  • 3,071 posts

Posted 28 November 2012 - 09:23 PM

Chimaera,

Yes, your link is better. Did you try the switch "/update -silent" ?

kylomas

Edited by kylomas, 28 November 2012 - 09:23 PM.

"Really?, How Do you know the're not random numbers?"

 

Forum Rules         Procedure for posting code

 

"A child educated only at school is an uneducated child."

    - George Santayana

 

"Never miss a good chance to shut up."

    - Will Rogers
 


#6 Chimaera

Chimaera

    Sorry .. Where am i again?

  • Active Members
  • PipPipPipPipPipPip
  • 1,985 posts

Posted 29 November 2012 - 08:18 AM

They don't all work because some of them are for the paid version.

We generally encounter home users so only certain switches will do the job that we need

and -silent is a paid one :(

If Ive just helped you ... miracles do happen. Chimaera 

 

CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users