Sign in to follow this  
Followers 0
AITNewbie

Problem with ControlSend

6 posts in this topic

Hi,

I'm writing a script to install Firefox and then to install the R-Kiosk Addon. So far, it's all good up through the install. I get to the end of the install and the application launches. I then try and open the XPI file for R-Kiosk. I'm trying to use ControlSend but all it does is open the File Open dialogue and sits there with the cursor blinking in the File Name field that I'm trying to pass the file name into.

Here's my script thus far:

Run ("E:\firefox Setup 3.5.8 /s")

WinWaitActive ("Mozilla Firefox Setup")

Send ("!n")

WinWaitActive ("Mozilla Firefox Setup")

Send ("!u")

Send ("!n")

WinWaitActive ("Mozilla Firefox Setup")

Send ("!i")

WinWaitActive("Mozilla Firefox Setup", "Completing the Mozilla")

Send ("!f")

WinWaitActive("Mozilla Firefox Start Page - Mozilla Firefox")

Send ("!fo")

WinActivate("Open File")

ControlSend("Open File", "File Name", "Edit1", "r-kiosk-0.7.2-fx.xpi")

Thoughts? Suggestions?

Share this post


Link to post
Share on other sites



Try ControlSend("Open File", "", "Edit1", "r-kiosk-0.7.2-fx.xpi") instead of ControlSend("Open File", "File Name", "Edit1", "r-kiosk-0.7.2-fx.xpi")


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Thanks for the suggestion Bruce but I had already tried that. I did try it again just to confirm that I hadn't missed something but still get no text to appear in that field. The cursor is flashing in that field but no text.

Share this post


Link to post
Share on other sites

Use Autoit's window identifier app and place the target cross over the textbox and use the ControlID it gives you in your controlsend statement.

Share this post


Link to post
Share on other sites

After sending ^o or !fo (getting the 'open file' dialog), the cursor is in that field already, so just try it with Send. Of course, this can't be done in the background as with ControlSend..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


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
Sign in to follow this  
Followers 0