Sign in to follow this  
Followers 0
pif99

Open DB2 Client and generate a connection

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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)

 

Share this post


Link to post
Share on other sites

For example how is the correct command for a ControlClick on the Toolbar32? The coordinates are 35 and 12

 

 

ControlClick.PNG

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