Jump to content

Newbie defeated by Combobox


DJM
 Share

Recommended Posts

Completely new to scripting. Am trying to write a script to transfer multiple fields from a browser(IE) based database, to a different database GUI. I can do most of it with multiple tabs, ^c, and ^v. There is this one field that has me stumped. It's a dropdown box (combobox, I have learned), that already has an item selected. I want to lift that value, and paste it into a corresponding field in the other database. Copy and paste with either keyboard or mouse fails. I wrote the following using Notepad to test the output.

CODE
WinWait("Detailed Internal Referral - Microsoft Internet Explorer","")

If Not WinActive("Detailed Internal Referral - Microsoft Internet Explorer","") Then WinActivate("Detailed Internal Referral - Microsoft Internet Explorer","")

WinWaitActive("Detailed Internal Referral - Microsoft Internet Explorer","")

$gen = ControlCommand("Detailed Internal Referral - Microsoft Internet Explorer", "", "Internet Explorer_TridentCmboBx13", "GetCurrentSelection", "")

ClipPut($gen)

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("^v")

This fails, pasting "0" into Notepad. I tried ControlGetText, and it also failed. I used ClassnameNN, because the control ID of the box changes when opening new referrals on the browser.

Any help is greatly appreciated.

DJM

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