Jump to content

Help translating something writen in CS to autoit


Recommended Posts

Hey I am writing an app and need help with this section.

Please help if you can.

CODE

;find the offer table and fill the list view with all instruments.

mOffers = (TableAut)mDesk.FindMainTable("offers");

for (uint i = 1; i <= mOffers.RowCount; i++)

string s = mOffers.CellValue(i, "Instrument").ToString();

ListViewItem lvi = listViewInstruments.Items.Add(s);

mItems = lvi;

lvi.SubItems.Add(mOffers.CellValue(i, "Bid").ToString());

lvi.SubItems.Add(mOffers.CellValue(i, "Ask").ToString());

Edited by Hatcheda
Link to comment
Share on other sites

Hey I am writing an app and need help with this section.

Please help if you can.

;find the offer table and fill the list view with all instruments.
            mOffers = (FXCore.TableAut)mDesk.FindMainTable("offers");
            for (uint i = 1; i <= mOffers.RowCount; i++)

                string s = mOffers.CellValue(i, "Instrument").ToString();
                ListViewItem lvi = listViewInstruments.Items.Add(s);
                mItems[s] = lvi;
                lvi.SubItems.Add(mOffers.CellValue(i, "Bid").ToString());
                lvi.SubItems.Add(mOffers.CellValue(i, "Ask").ToString());

What I have so far: - not much but gets feeds array info once array created.

;find the offer table and fill the list view with all instruments.
$Offers = $tdesk.FindMainTable("offers");
Maybe something like this:
Global $tdesk = ???
Global $hLV = _GUICtrlListView_Create(...)

;find the offer table and fill the list view with all instruments.
$mOffers = $tdesk.FindMainTable("offers")

For $i = 1 To $mOffers.RowCount
    $sString = $mOffers.CellValue($i, "Instrument").ToString()
    $iLVItem = _GUICtrlListView_AddItem($hLV, $sString)
    _GUICtrlListView_AddSubItem($hLV, $iLVItem, $mOffers.CellValue($i, "Bid").ToString(), 1)
    _GUICtrlListView_AddSubItem($hLV, $iLVItem, $mOffers.CellValue($i, "Ask").ToString(), 2)
Next

A lot of guessing here. You must have already created the $tdesk object and the ListView control whose handle is in $hLV.

:P

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...