Jump to content

Open DB2 Client and generate a connection


pif99
 Share

Recommended Posts

Hi all,

Is there a script to open the DB2 client (IBM Data Studio) and create a DB2 connection to a database?

Thanks in advance to all

I0've done this and it's working

 

Example()

Func Example()
    Run('"C:\Program Files\IBM\DS4.1.1\eclipse.exe" -product com.ibm.datastudio.consolidated.product.ide')
    $hWnd = WinWaitActive("Administer Databases", "",10)
    WinSetState($hWnd, "", @SW_MAXIMIZE)


    Opt("MouseCoordMode", 1)
    sleep(300)
    ControlClick("Administer Databases", "", 1)
    
  
    MouseClick("left", 156, 120, 1)
    MouseClick("left", 230, 288, 1)
    sleep(10)
    WinWait("New Connection")
    ControlSetText("New Connection","","Edit7","dbtarget")
    ControlSetText("New Connection","","Edit8","1.1.1.1")
    ControlSetText("New Connection","","Edit9","50000")
    ControlSetText("New Connection","","Edit10","admin")
    ControlSetText("New Connection","","Edit11","admin")
    MouseClick("left", 848, 493, 1)
 

EndFunc

I prefer to use controlclick but I cannot see the buttonID where I want to click on.

Using this command, is not working

ControlClick("Administer Databases", "", 1)

 

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