#include #include #include #include #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Ventana", 200, 250, 300, 50) GUICtrlCreateLabel("Orden de Compra",20,10) Global $compra = GUICtrlCreateInput("123456",20,30,90,20) GUICtrlCreateLabel("No. de casillas",20,60) Global $casillas = GUICtrlCreateInput("1",20,80,90,20) $boton = GUICtrlCreateButton("boton",40,150,100,50) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $boton Local $sWorkbook = @ScriptDir & "\facturacion.xlsx" $oWorkbook = _Excel_BookAttach($sWorkbook) Global $array[0] Local $num = "2" For $i = 1 To GuiCtrlRead($casillas) $c = $oWorkBook.ActiveSheet.Range("C" & $num).value $b = $oWorkBook.ActiveSheet.Range("B" & $num).value $a = $oWorkBook.ActiveSheet.Range("A" & $num).value _ArrayAdd($array, $c) _ArrayAdd($array, $b) _ArrayAdd($array, $a) $num = $num + 1 Next WinActivate("Complemento Carta Porte - MercancĂ­as","") ;;; this does not work Send("alex") ControlSend("Complemento Carta Porte - MercancĂ­as","","TMCCEditMascara11","hola") Send($array[1]) ;;; Send("alex") EndSelect Wend Exit