Jump to content

Copy contents of window to array


Recommended Posts

Hey All,

I am interacting with a company system programmed in COBOL. There is a screen I can go to that has pieces and dimensions. I was trying to pull each class control to get the information but it seems the whole screen is one control..

I noticed that on this screen I can actually use my mouse and select the whole screen and it will paste onto a document. It got me thinking. Is there a way to take what's in my current window and copy it to array somehow. I was thinking of trying to find a way to copy to clipboard or something similar and then write to an array. All the dims are at the bottom of the screen luckily so I could build some logic to pull the rows backwards.

Anyone ever attempted something like this or maybe know a workaround. I'm still a bit new to scripting. I'm guessing there might be another way.  I took the source code of my screen as an example.  I'm guessing XML but not sure.

Thanks!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>EXPORT dfw.dfw.ei name.SYSTEM (DIMSAL) #S18431 - Desktop Version: 1.16.3.1.0</title>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="eibrowser" content="legacywrapper">
<META name="shutdown" content="false">
<META name="launchhash" content="_desktop_internal_604934e0bce411df9c65fb2154d5dfc2=Export">
<META name="scriptlog" content="true">
<META name="scriptlogevents" content="false">
<META name="limitscriptsize" content="-1">
<META name="eiperformance" content="ID 0 OS 210 OH 205 " >
<META name="host-info" content="dfw.dfw.ei danielro.export ||">
</head>
<body>
[XML Desktop Form]
<div id="DESKTOPFORM">
<!--<?xml version="1.0" ?>
<screendef formname="DIMSAL">
<style_area id="css/legwrap_BlueOnBlue_11_19.css" name="css/legwrap_BlueOnBlue_11_19.css" >
</style_area>
<form_area id="form_area">
<hidden id="TaskCoordinator" value="17269300" />
<hidden id="EISESSIONID" value="HxGJEw0oCyR30hmi9dXkgly1@http://10.23.1.2:8121/session/services/EIServiceProvider" />
<hidden id="pressed" value="" />
<hidden id="cursorfieldname" value="UOM_DIM" />
<hidden id="formname" value="DIMSAL" />
<panel id="DIMSAL" top="0" left="0" height="42" width="82" fit="1" z_order="0" >
<edit id="COMMAND" top="0" left="0" height="1" width="26" value="                          " vfdStyle="HI" upshift="true" />
<label id="T0_26" top="0" left="26" height="1" width="12" value="    Number  "  />
<edit id="REFERENCE_NUM" top="0" left="38" height="1" width="10" value="DFWT114651" vfdStyle="HI" upshift="true" />
<label id="AS_SHIPPED_LABEL" top="0" left="49" height="1" width="13" value="             " vfdStyle=""  />
<label id="T0_62" top="0" left="62" height="1" width="18" value=" Dimensions (DIMS)"  />
<label id="SHIPMENT_INFO" top="1" left="0" height="1" width="80" value="EHT MULTI ICT DFWT114651 AWB FWDN-43734743                                      " vfdStyle=""  />
<label id="SHIPMENT_INFO_2" top="2" left="0" height="1" width="81" value="                                                                                 " vfdStyle=""  />
<label id="SHIPMENT_INFO_3" top="3" left="0" height="1" width="80" value="                                                                                " vfdStyle=""  />
<label id="SHIPMENT_INFO_4" top="4" left="0" height="1" width="80" value="                                                                                " vfdStyle=""  />
<label id="T6_0" top="6" left="0" height="1" width="14" value="Units:   Dims "  />
<edit id="UOM_DIM" top="6" left="14" height="1" width="2" value="IN" vfdStyle="HI" upshift="true" />
<label id="T6_16" top="6" left="16" height="1" width="5" value=" Wgt "  />
<edit id="UOM_WGT" top="6" left="21" height="1" width="1" value="L" vfdStyle="HI" upshift="true" />
<label id="T6_22" top="6" left="22" height="1" width="5" value=" Vol "  />
<edit id="UOM_VOL" top="6" left="27" height="1" width="2" value="CF" vfdStyle="HI" upshift="true" />
<label id="T6_29" top="6" left="29" height="1" width="13" value=" Volume Rule "  />
<edit id="VOL_RULE" top="6" left="42" height="1" width="5" value="194  " vfdStyle="HI" upshift="true" />
<label id="DATE_FRGHT_RCVD" top="7" left="9" height="1" width="8" value="        " vfdStyle=""  />
<label id="FRGHT_RCVD_BY" top="7" left="33" height="1" width="8" value="        " vfdStyle=""  />
<label id="OSD_FLAG" top="7" left="47" height="1" width="1" value=" " vfdStyle=""  />
<label id="WAREHOUSE_LOC" top="8" left="9" height="1" width="4" value="    " vfdStyle=""  />
<label id="DOCS_WITH_FRGHT" top="8" left="40" height="1" width="1" value=" " vfdStyle=""  />
<label id="PRINT_DOC_RECEIPT" top="8" left="47" height="1" width="1" value=" " vfdStyle=""  />
<label id="CARRIER_FRGHT" top="9" left="9" height="1" width="18" value="                  " vfdStyle=""  />
<label id="PRO_NUM_FRGHT" top="9" left="36" height="1" width="12" value="            " vfdStyle=""  />
<label id="ONHAND_REF_XFR" top="9" left="63" height="1" width="10" value="          " vfdStyle=""  />
<label id="REMARKS_RECEIPT" top="10" left="9" height="1" width="20" value="                    " vfdStyle=""  />
<label id="ONHAND_VAL" top="10" left="36" height="1" width="12" value="            " vfdStyle=""  />
<label id="T11_1" top="11" left="1" height="1" width="81" value="@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" graphic="true" />
<label id="T12_0" top="12" left="0" height="1" width="35" value="  Totals                   Customs "  />
<label id="ALLOC_VOL" top="12" left="35" height="1" width="7" value="       " vfdStyle=""  />
<label id="ALLOC_WGT" top="12" left="42" height="1" width="7" value="       " vfdStyle=""  />
<label id="T13_0" top="13" left="0" height="1" width="51" value="  Pcs Pckg                 Pcs   Pckg    Wgt    Vol"  />
<label id="T14_1" top="14" left="1" height="1" width="81" value="@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" graphic="true" />
<label id="PCS" top="15" left="1" height="1" width="5" value="   75" vfdStyle="HI"  />
<label id="PCKG" top="15" left="6" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="PCS_HAZRD" top="15" left="10" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="T15_15" top="15" left="15" height="1" width="11" value=" Totals    "  />
<label id="PCS_PACK" top="15" left="26" height="1" width="7" value="     75" vfdStyle="HI"  />
<label id="PCKG_PACK" top="15" left="33" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="WGT" top="15" left="37" height="1" width="7" value="   1850" vfdStyle="HI"  />
<label id="VOL" top="15" left="44" height="1" width="7" value="   2.00" vfdStyle="I"  />
<label id="WGT_DECL" top="15" left="52" height="1" width="7" value="       " vfdStyle=""  />
<label id="T15_59" top="15" left="59" height="1" width="15" value="    Volume Wgt "  />
<label id="WGT_CHG" top="15" left="74" height="1" width="7" value="     21" vfdStyle=""  />
<label id="PCS_BK" top="16" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKG_BK" top="16" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="PCS_HAZRD_BK" top="16" left="10" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="T16_15" top="16" left="15" height="1" width="11" value=" Booked    "  />
<label id="PCS_PACK_BK" top="16" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACK_BK" top="16" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGT_BK" top="16" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOL_BK" top="16" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="WGT_DECL_BK" top="16" left="52" height="1" width="7" value="       " vfdStyle=""  />
<label id="WGT_CHG_BK" top="16" left="74" height="1" width="7" value="       " vfdStyle=""  />
<label id="PCS_ACT" top="17" left="1" height="1" width="5" value="   75" vfdStyle="HI"  />
<label id="PCKG_ACT" top="17" left="6" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="PCS_HAZRD_ACT" top="17" left="10" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="T17_15" top="17" left="15" height="1" width="11" value=" Received  "  />
<label id="PCS_PACK_ACT" top="17" left="26" height="1" width="7" value="     75" vfdStyle="HI"  />
<label id="PCKG_PACK_ACT" top="17" left="33" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="WGT_ACT" top="17" left="37" height="1" width="7" value="   1850" vfdStyle="HI"  />
<label id="VOL_ACT" top="17" left="44" height="1" width="7" value="   2.00" vfdStyle="I"  />
<label id="T17_51" top="17" left="51" height="1" width="14" value=" Declared Wgt "  />
<label id="WGT_DECL_ACT" top="17" left="65" height="1" width="7" value="   1850" vfdStyle=""  />
<label id="WGT_CHG_ACT" top="17" left="74" height="1" width="7" value="     21" vfdStyle=""  />
<label id="T18_1" top="18" left="1" height="1" width="10" value="@@@@@@@@@B" graphic="true" />
<label id="T18_11" top="18" left="11" height="1" width="10" value="Hazardous?"  />
<label id="T18_21" top="18" left="21" height="1" width="61" value="@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" graphic="true" />
<label id="ALLOC_HAZRD_SW" top="19" left="10" height="1" width="1" value=" " vfdStyle=""  />
<label id="T19_11" top="19" left="11" height="1" width="41" value=" Len  Wth  Hgt                           "  />
<label id="POITEM_LABEL" top="19" left="52" height="1" width="16" value="Remarks         " vfdStyle=""  />
<label id="PCSv001" top="20" left="1" height="1" width="5" value="   25" vfdStyle="HI"  />
<label id="PCKGv001" top="20" left="6" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="HAZRD_SWv001" top="20" left="10" height="1" width="1" value="N" vfdStyle="HI"  />
<label id="LENGTHv001" top="20" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv001" top="20" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv001" top="20" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv001" top="20" left="26" height="1" width="7" value="     25" vfdStyle="HI"  />
<label id="PCKG_PACKv001" top="20" left="33" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="WGTv001" top="20" left="37" height="1" width="7" value="    700" vfdStyle="HI"  />
<label id="VOLv001" top="20" left="44" height="1" width="7" value="   1.00" vfdStyle="I"  />
<label id="REMARKS_ONHANDv001" top="20" left="51" height="1" width="30" value="OH#F230919176  SH#H230127592  " vfdStyle="HI"  />
<label id="DEST_XFRv001" top="20" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv002" top="21" left="1" height="1" width="5" value="   50" vfdStyle="HI"  />
<label id="PCKGv002" top="21" left="6" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="HAZRD_SWv002" top="21" left="10" height="1" width="1" value="N" vfdStyle="HI"  />
<label id="LENGTHv002" top="21" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv002" top="21" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv002" top="21" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv002" top="21" left="26" height="1" width="7" value="     50" vfdStyle="HI"  />
<label id="PCKG_PACKv002" top="21" left="33" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="WGTv002" top="21" left="37" height="1" width="7" value="   1150" vfdStyle="HI"  />
<label id="VOLv002" top="21" left="44" height="1" width="7" value="   1.00" vfdStyle="I"  />
<label id="REMARKS_ONHANDv002" top="21" left="51" height="1" width="30" value="OH#F230923038  SH#H230128291  " vfdStyle="HI"  />
<label id="DEST_XFRv002" top="21" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv003" top="22" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv003" top="22" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv003" top="22" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv003" top="22" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv003" top="22" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv003" top="22" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv003" top="22" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv003" top="22" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv003" top="22" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv003" top="22" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv003" top="22" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv003" top="22" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv004" top="23" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv004" top="23" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv004" top="23" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv004" top="23" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv004" top="23" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv004" top="23" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv004" top="23" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv004" top="23" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv004" top="23" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv004" top="23" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv004" top="23" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv004" top="23" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv005" top="24" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv005" top="24" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv005" top="24" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv005" top="24" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv005" top="24" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv005" top="24" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv005" top="24" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv005" top="24" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv005" top="24" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv005" top="24" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv005" top="24" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv005" top="24" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv006" top="25" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv006" top="25" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv006" top="25" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv006" top="25" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv006" top="25" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv006" top="25" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv006" top="25" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv006" top="25" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv006" top="25" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv006" top="25" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv006" top="25" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv006" top="25" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv007" top="26" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv007" top="26" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv007" top="26" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv007" top="26" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv007" top="26" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv007" top="26" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv007" top="26" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv007" top="26" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv007" top="26" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv007" top="26" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv007" top="26" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv007" top="26" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv008" top="27" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv008" top="27" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv008" top="27" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv008" top="27" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv008" top="27" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv008" top="27" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv008" top="27" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv008" top="27" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv008" top="27" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv008" top="27" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv008" top="27" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv008" top="27" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv009" top="28" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv009" top="28" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv009" top="28" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv009" top="28" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv009" top="28" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv009" top="28" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv009" top="28" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv009" top="28" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv009" top="28" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv009" top="28" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv009" top="28" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv009" top="28" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv010" top="29" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv010" top="29" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv010" top="29" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv010" top="29" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv010" top="29" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv010" top="29" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv010" top="29" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv010" top="29" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv010" top="29" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv010" top="29" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv010" top="29" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv010" top="29" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv011" top="30" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv011" top="30" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv011" top="30" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv011" top="30" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv011" top="30" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv011" top="30" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv011" top="30" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv011" top="30" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv011" top="30" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv011" top="30" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv011" top="30" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv011" top="30" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv012" top="31" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv012" top="31" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv012" top="31" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv012" top="31" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv012" top="31" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv012" top="31" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv012" top="31" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv012" top="31" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv012" top="31" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv012" top="31" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv012" top="31" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv012" top="31" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv013" top="32" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv013" top="32" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv013" top="32" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv013" top="32" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv013" top="32" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv013" top="32" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv013" top="32" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv013" top="32" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv013" top="32" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv013" top="32" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv013" top="32" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv013" top="32" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv014" top="33" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv014" top="33" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv014" top="33" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv014" top="33" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv014" top="33" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv014" top="33" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv014" top="33" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv014" top="33" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv014" top="33" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv014" top="33" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv014" top="33" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv014" top="33" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv015" top="34" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv015" top="34" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv015" top="34" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv015" top="34" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv015" top="34" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv015" top="34" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv015" top="34" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv015" top="34" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv015" top="34" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv015" top="34" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv015" top="34" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv015" top="34" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv016" top="35" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv016" top="35" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv016" top="35" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv016" top="35" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv016" top="35" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv016" top="35" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv016" top="35" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv016" top="35" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv016" top="35" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv016" top="35" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv016" top="35" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv016" top="35" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv017" top="36" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv017" top="36" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv017" top="36" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv017" top="36" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv017" top="36" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv017" top="36" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv017" top="36" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv017" top="36" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv017" top="36" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv017" top="36" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv017" top="36" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv017" top="36" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv018" top="37" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv018" top="37" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv018" top="37" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv018" top="37" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv018" top="37" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv018" top="37" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv018" top="37" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv018" top="37" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv018" top="37" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv018" top="37" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv018" top="37" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv018" top="37" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv019" top="38" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv019" top="38" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv019" top="38" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv019" top="38" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv019" top="38" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv019" top="38" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv019" top="38" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv019" top="38" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv019" top="38" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv019" top="38" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv019" top="38" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv019" top="38" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv020" top="39" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv020" top="39" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv020" top="39" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv020" top="39" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv020" top="39" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv020" top="39" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv020" top="39" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv020" top="39" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv020" top="39" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv020" top="39" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv020" top="39" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv020" top="39" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv021" top="40" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv021" top="40" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv021" top="40" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv021" top="40" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv021" top="40" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv021" top="40" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv021" top="40" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv021" top="40" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv021" top="40" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv021" top="40" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv021" top="40" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv021" top="40" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv022" top="41" left="1" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="PCKGv022" top="41" left="6" height="1" width="4" value="    " vfdStyle="I"  />
<label id="HAZRD_SWv022" top="41" left="10" height="1" width="1" value=" " vfdStyle="HI"  />
<label id="LENGTHv022" top="41" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv022" top="41" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv022" top="41" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv022" top="41" left="26" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="PCKG_PACKv022" top="41" left="33" height="1" width="4" value="    " vfdStyle="I"  />
<label id="WGTv022" top="41" left="37" height="1" width="7" value="       " vfdStyle="HI"  />
<label id="VOLv022" top="41" left="44" height="1" width="7" value="       " vfdStyle="I"  />
<label id="REMARKS_ONHANDv022" top="41" left="51" height="1" width="30" value="                              " vfdStyle="HI"  />
<label id="DEST_XFRv022" top="41" left="81" height="1" width="1" value=" " vfdStyle="I"  />
</panel>
</form_area>
<status_area >
<message id="m0" value="922: 2 entries qualified.  Viewing page 1 of 1." />
</status_area>
<button_area >
<button id="PF1" value="ADD /|MODIFY" action="PF1" active="TRUE" />
<button id="PF2" value="FIND|RELATED" action="PF2" active="TRUE" />
<button id="PF3" value="PREVIOUS|PAGE" action="PF3" active="TRUE" />
<button id="PF4" value="NEXT|PAGE" action="PF4" active="TRUE" />
<button id="PF5" value="NEXT|SCREEN" action="PF5" active="TRUE" />
<button id="PF6" value="HELP|(SMART)" action="PF6" active="TRUE" />
<button id="PF7" value="NEXT|KEYS" action="PF7" active="TRUE" />
<button id="PF8" value="GOTO|" action="PF8" active="TRUE" />
</button_area>
</screendef>
-->
</div>
</body>
</html>
Link to comment
Share on other sites

  • Moderators

dar100111,

What you want to do looks eminently possible. Can you set out clearly what you want as the required array - headers and the first few rows - so that we know what information should go where? Then we can look to see how to extract the data from that mass of text. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hey M23,

Thanks for the reply. So I was thinking I could set up a loop basically and start pulling the row below which would be row 1 of the info I want to pull as long as the value of the below label id "PCSv001" doesn't equal "       ".  Basically seven blank spaces.

<label id="PCSv001" top="20" left="1" height="1" width="5" value="   25" vfdStyle="HI"  />

Here's my autoit script in getting to the screen.  This brings me to the screen in my system that I need to pull the data.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=FWDN Bulk Booking andTracking Tool.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;this script writes excel files to an array


#include <IE.au3>
#include <Excel.au3>
#include <Array.au3>
#include <Clipboard.au3>

$row = 3
$value = InputBox("Forward Air Bulk Book Script", " ENTER ACTION TO PERFORM"&@lf&@LF&"1.  Get System Information"&@lf&"2.  Book Shipments on Forward Air"&@lf&"3.  Assign Pro to Consol (not finished)"&@lf&"4.  Track Shipments on FWDN site"&@lf&" ", "*", " M1")
If @error = 1 Then Exit ; Cancel button pressed

If $value = 1 Then;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GET SYSTEM INFORMATION;;;;;;;;;;;;;;;;;;;;;;;;1
$oExcel = _ExcelBookOpen("F:\EI\DFW\NAT\Oracle NMC\NMC Development\Network Analyst\Reports\autoit\bulkbook.xlsx")
$aArray = _ExcelReadSheetToArray($oExcel)
$counter = $aArray[0][0]
$currentbranch = $aArray[2][17]
$gci = "GCI"
Do
$eiref = $aArray[$row][1]
IF WinExists("EXPORT " & StringLower($currentbranch)) Then
    WinActivate("EXPORT " & StringLower($currentbranch))
    ControlSetText("EXPORT " & StringLower($currentbranch),"", "[CLASS:TEIEdit; INSTANCE:77]", "LOG " & $eiref)
    sleep(1000)
    ControlSend("EXPORT " & StringLower($currentbranch),"","TScrollBox1","{F8}")
Link to comment
Share on other sites

  • Moderators

dar100111,

All very interesting, but what I want is an example of how the final array should look. Otherwise I have no idea what you need to extract from the text you posted and how to put it into an array. I am not very keen to waste my time producing something which does not meet your requirements, so please give me a clue as to what you are looking for - a sample of the text and how it should look when placed in the array will do. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hey M23,

So the code that pulls the below in the source code I posted is

<label id="PCSv001" top="20" left="1" height="1" width="5" value="   25" vfdStyle="HI"  />
<label id="PCKGv001" top="20" left="6" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="HAZRD_SWv001" top="20" left="10" height="1" width="1" value="N" vfdStyle="HI"  />
<label id="LENGTHv001" top="20" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv001" top="20" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv001" top="20" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv001" top="20" left="26" height="1" width="7" value="     25" vfdStyle="HI"  />
<label id="PCKG_PACKv001" top="20" left="33" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="WGTv001" top="20" left="37" height="1" width="7" value="    700" vfdStyle="HI"  />
<label id="VOLv001" top="20" left="44" height="1" width="7" value="   1.00" vfdStyle="I"  />
<label id="REMARKS_ONHANDv001" top="20" left="51" height="1" width="30" value="OH#F230919176  SH#H230127592  " vfdStyle="HI"  />
<label id="DEST_XFRv001" top="20" left="81" height="1" width="1" value=" " vfdStyle="I"  />
<label id="PCSv002" top="21" left="1" height="1" width="5" value="   50" vfdStyle="HI"  />
<label id="PCKGv002" top="21" left="6" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="HAZRD_SWv002" top="21" left="10" height="1" width="1" value="N" vfdStyle="HI"  />
<label id="LENGTHv002" top="21" left="11" height="1" width="5" value="     " vfdStyle="I"  />
<label id="WIDTHv002" top="21" left="16" height="1" width="5" value="     " vfdStyle="HI"  />
<label id="HEIGHTv002" top="21" left="21" height="1" width="5" value="     " vfdStyle="I"  />
<label id="PCS_PACKv002" top="21" left="26" height="1" width="7" value="     50" vfdStyle="HI"  />
<label id="PCKG_PACKv002" top="21" left="33" height="1" width="4" value="PCS " vfdStyle="I"  />
<label id="WGTv002" top="21" left="37" height="1" width="7" value="   1150" vfdStyle="HI"  />
<label id="VOLv002" top="21" left="44" height="1" width="7" value="   1.00" vfdStyle="I"  />
<label id="REMARKS_ONHANDv002" top="21" left="51" height="1" width="30" value="OH#F230923038  SH#H230128291  " vfdStyle="HI"  />
<label id="DEST_XFRv002" top="21" left="81" height="1" width="1" value=" " vfdStyle="I"  />

Here's an example of what the array would look like and hope this makes sense.  Thanks for the help

Edited by dar100111
Link to comment
Share on other sites

  • Moderators

dar100111,

Placing that slab of text into a file allows me to get this:

#include <Constants.au3>
#include <Array.au3>
#include <File.au3>

Global $aArray[3][12] = [["PCS", "PKG", "HAZRD_SW", "LENGTH", "WIDTH", "HEIGHT", "PCS_PACK", "PCKG_PACK", "WGT", "VOL", "REMARKS_ONHAND", "DEST_XFR"]]

; Read the file into an array
Global $aLines
_FileReadToArray("HTML.txt", $aLines)

For $i = 1 To 2
    ; Format with leading zeroes
    $iValue = StringFormat("%03i", $i)
    ; Go though the array looking for each section
    $k = 0
    For $j = 1 To $aLines[0]
        $sLine = $aLines[$j]
        If StringRegExp($sLine, 'v' & $iValue & '"') Then
            ; Extract the value and place it in the array
            $aArray[$i][$k] = StringStripWS(StringRegExpReplace($sLine, "(?i)(?U)^.*value=\x22(.*)\x22\svfdStyle.*$", "$1"), $STR_STRIPLEADING)
            $k += 1
        EndIf
    Next

Next

; Display the result
_ArrayDisplay($aArray)
Which looks quite close to what you want. :)

Good enough? :huh:

 

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Wow M23,

I hope I'll be able to understand that some day, there are pieces I understand.  So my first question is how do I insert this at the end of my autoit script above.  I'm getting I have to get the source from the program window somehow. And the amount of rows can vary depending on piece counts.

So the program gets to the screen below I need to figure out how to run the above above you've shown at the very end.

6SmLkKO.jpg

Edited by dar100111
Link to comment
Share on other sites

  • Moderators

dar100111,

I understand that the script you posted above gets you to that page - so how are you getting the text at present? Can you use Ctrl-A to select it all? Have you tried WinGetText? How did you get the source code you posted initially? :huh:

Once you have the text then you need to get it into an array with one line per element. Assuming you get all the text into a single variable, then StringSplit should do the trick - but we are getting ahead of ourselves, we need the text first! :)

M23

P.S. Fuller explanation of the code:

#include <Constants.au3>
#include <Array.au3>
#include <File.au3>

; Create an array large enough to hold the data - at the moment we limit it to 2 rows, but it is easy to make it infiitely expandable
Global $aArray[3][12] = [["PCS", "PKG", "HAZRD_SW", "LENGTH", "WIDTH", "HEIGHT", "PCS_PACK", "PCKG_PACK", "WGT", "VOL", "REMARKS_ONHAND", "DEST_XFR"]]

; Read the file containing the text into an array - each element contains one line
Global $aLines
_FileReadToArray("HTML.txt", $aLines)

; Now we look for each packing element in turn - the trick is to look for the "v00#" which distinguishes each separate line of the final array
For $i = 1 To 2
    ; Format the index with leading zeroes to make the 3-digit pattern
    $iValue = StringFormat("%03i", $i)
    $k = 0 ; This is a count to show which column we are currently filling in the row
    ; Go though the text looking for each section
    For $j = 1 To $aLines[0]
        ; Get the line into a variable
        $sLine = $aLines[$j]
        ; See if the "v00#" text is present in this line
        If StringRegExp($sLine, 'v' & $iValue & '"') Then
            ; if it is then extract the "Value" from the line
            ; The SRE looks for what is between value=" and the next " - and then strips the spaces from the beginning
            $aArray[$i][$k] = StringStripWS(StringRegExpReplace($sLine, "(?i)(?U)^.*value=\x22(.*)\x22\svfdStyle.*$", "$1"), $STR_STRIPLEADING)
            ; Move to the next column
            $k += 1
        EndIf
        ; Move to the next line of the text
    Next
    ; Now increase the value of the v00# variable and look for the next line of the array
Next

; Display the result
_ArrayDisplay($aArray)
Depending on how we get the page content, we mat have to play with the SREs to match the content - and we can certainly speed up the process by making a few refinements. But we need the text! :D

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thanks for the response M23.  I was able to right click with my mouse on the screen to get the source after highlighting my selection and then there is an option to "get source" and it opens up a notepad that had all the above text that I posted.  Ctrl A, wouldn't actually select all the elements and It seems Wingettext isn't giving me what I need either.

I'll keep trying to find some ways to get all the selection and let you know if I can find anything.

Link to comment
Share on other sites

Hey M23,

So since there are 22 possibilities here, I will have 22 rows pull evertime and I will just cap at that.  I think I might be able to save the source to a file every time or possibly to my clipboard? 

What do you think of that idea?  Not even sure if that would work.

Thanks for the help I at least have a method to go forward with.  I was just wondering if there might be a function that pulls source code from my window, or a function to activate something in my right click menu on my mouse, without simulating mouseclicks.  I realize the menu is different depending on what application I have open and am right clicking on. 

Thanks for the script!

Link to comment
Share on other sites

It looks like an IE control of some sort, the source certainly seems to be a html doc with embedded xml.

What I'd try is to attach to it with IE udf. Read the remarks regarding attaching embedded IE under _IEAttach in help file.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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