Jump to content

Mouse Click and Oracle


mrrlg
 Share

Recommended Posts

I am attempting to automate a patch application using Oracle's Universial Installer. When I use the Active Window info to "spy" on the test installation I was able to successfully install the patch on my test machine using the x and y coordinates for the Mouse Position. However, when I attempt to run the script on another machne that has a different screen resolution, the script dies. The pixel color under the mouse is the same for every active button. No information is returned for Last Control Under Mouse, Staus Bar Text, Visable Window Text or Hidden Window Text. Is there any way short of constructing a script for each screen resolution to tell the mouse where to go?

Link to comment
Share on other sites

You probably are using Absolute coordinates. This kind of problems should be avoided with coodinates relative to the window. So where ever the window is (so what ever resolution) until the window don't change size you'll click your button.

Check Opt() for:

MouseCoordMode

PixelCoordMode

If the window also change size you should also check

WinMove()

to resize it to a know size.

Edited by ezzetabi
Link to comment
Share on other sites

add a calculation for screen higth and width. Also, is the installer running full screen? if not, make sure Opt("MouseCoordMode", 0) ;1=absolute, 0=relative.

As far as colors, gamma adjustments are not all the same on different computers/video cards.

Just a little info to help.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

I added the opt("MouseCoordMode",0) to my script, that did not seem to help. When I changed the resolution of the Active desktop to 1024x768, then the first mouse command worked. Is there a way to script a screen resolution change?

Link to comment
Share on other sites

since you wrote the script in absolute mode, you will have to adjust every movement, or adjust the window.

If you can find the size and location of the window on your original machine, you can set that in the script.

WinMove ( "title", "text", 100, 200 ,640 ,480)

WinMove ( "title", "text", x, y [, width [, height]] )

set this and then you can use your mouse in any resolution as long as the full window fits in it. It will be closer to upper left on higher resolution machines.

basically your absolute should match since we are moving the window to match where it was on the first machine. Also you should use the same Opt("MouseCoordMode", 1) ;1=absolute(default), 0=relative.

#note to remember, try to use relative x,y coords when doing installs.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Not quite sure I did this right. I got the windows coordinates from the original machine and added this portion to my script. The mouse still skitters off to one side and the script stops after the first window opens.

AutoitSetOption("WinTitleMatchMode",4)

Run("\\aoofs\oracle\2376472\Disk1\setup.exe")

WinMove("Oracle Universal Installer", 192, 144, 646, 512)

WinWaitActive("Oracle Universal Installer")

MouseClick ("Left", 752,627)

WinMove("Oracle Universal Installer", 192, 144, 646, 512)

WinWaitActive("Oracle Universal Installer")

MouseClick ("Left", 752,627)

WinMove("Oracle Universal Installer", 192, 144, 646, 512)

WinWaitActive("Oracle Universal Installer")

MouseClick ("Left", 752,627)

WinMove("Oracle Universal Installer", 192, 144, 646, 512)

WinWaitActive("Oracle Universal Installer")

MouseClick ("Left", 77,483)

WinMove("Exit", 385, 258, 260, 168)

WinWaitActive("Exit")

MouseClick ("Left", 170,144)

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...