Jump to content

send command


 Share

Recommended Posts

What are different ways to send a command to the screen? I have a box or a page that the button has no text and no classID from the autoit window info. How do I get it push or choose the next button? I am using send but it is not working.

Plus you have to wait for 2 seconds before the button become active. How do I make it stop? I have used the sleep and it did not work.

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

What are different ways to send a command to the screen? I have a box or a page that the button has no text and no classID from the autoit window info. How do I get it push or choose the next button? I am using send but it is not working.

Plus you have to wait for 2 seconds before the button become active. How do I make it stop? I have used the sleep and it did not work.

code, code, we need code to see what's wrong! And, what kind of application are you trying to automate?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

What are different ways to send a command to the screen? I have a box or a page that the button has no text and no classID from the autoit window info. How do I get it push or choose the next button? I am using send but it is not working.

Look up:

ControlClick()

Plus you have to wait for 2 seconds before the button become active. How do I make it stop? I have used the sleep and it did not work.

Opt("WinTitleMatchMode",4)
Dim $ctrlClassName = "Something", $window = "Window Name", $text = "Optional", $check
Do
    $check = ControlCommand($window,$text,$ctrlClassName,"IsEnabled","")
        if @error Then
            MsgBox(0,"Error","Window Not Found")
            Exit
        EndIf
Until $check = 1

Edit: You want to check if it's enabled, not if it exists...my bad...

Edit #2: Disregard all that, I didn't read your entire post. Are you automating an MSIE session?

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Sorry for the long wait but I don't always have time to get on the net and search and answer questions. I have to say that I have not programed in a long time, somewhere like 10years, so this program is very simple and basic. I am trying to automate the install for spyware blaster. I get tired of doing the same thing over and over again. I found AutoIt on the net just 2weeks ago and it is very different than the way I started programming. All of this visual stuff is plain new.

What I am trying to figure out is five windows in it has a check mark for adding a icon on the desktop. I want it to uncheck it and then go on to the next window. I can't get it to uncheck the check mark.

If someone has this already done I would love to see what you did.

Code:

winwaitactive ("Setup - SpywareBlaster", "additional tasks")

ControlCommand ( "Setup - SpywareBlaster", "C:\Program Files\SpywareBlaster" ,"524734","UnCheck","")

send ("!N")

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

in case that the programm is gonna be for u only and u always use a certain screen resolution, then why not just let the mouse jump to a pixel (checkbox to uncheck for example) and click it? in fact u could ask for resolution first and then decide where to go with the mouse.

understand what i am saying?

just look at:

mousemove()

mouseclick()

Link to comment
Share on other sites

Code:

winwaitactive ("Setup - SpywareBlaster", "additional tasks")

ControlCommand ( "Setup - SpywareBlaster", "C:\Program Files\SpywareBlaster" ,"524734","UnCheck","")

send ("!N")

What is 524734 in the ControlCommand and where did get that number from?

Based on your first post, I would use Send("{TAB}") several times until the "next" button is selected and then Send("{ENTER}") to "push" it. Should works with most windows applications ...

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Based on your first post, I would use Send("{TAB}") several times until the "next" button is selected and then Send("{ENTER}") to "push" it. Should works with most windows applications ...

Cheers

Kurt

The number is the ControlID from or for that check mark box. I think that it is wrong and I will try something different.

Yeah, it does but I have figured out how to use the "!N" to use the "next" button. Thanks.

Edited by roofninja

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

in case that the programm is gonna be for u only and u always use a certain screen resolution, then why not just let the mouse jump to a pixel (checkbox to uncheck for example) and click it? in fact u could ask for resolution first and then decide where to go with the mouse.

understand what i am saying?

just look at:

mousemove()

mouseclick()

It is going to be for my use, but the PCs have a different resolutions. I like your idea but I am going to hold off on using mouse movements for now.

I did find out that if I hit the spacebar it will check or uncheck the box. Is there a way to send a spacebar to the screen?

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...