Jump to content

Garcia

Members
  • Posts

    3
  • Joined

  • Last visited

Garcia's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello everyone, my problem is that when I try to run my already compiled program as administrator I get this error, but when I run the script it works correctly. this is my code #include <MsgBoxConstants.au3> #include <Excel.au3> ;I use this code to not open a new excel file Global $sWorkbook = @ScriptDir & "\facturacion.xlsx" Global $oWorkbook = _Excel_BookAttach($sWorkbook) ;this line of code is the problem $num = $oWorkBook.ActiveSheet.Range("C2").value MsgBox(0,0, $num) ;this line of code is the problem $num = $oWorkBook.ActiveSheet.Range("C2").value Is there another way to obtain the data from a cell in an Excel file? Thanks for your time 😊
  2. it doesn't work 😭, but if i do it in an excel sheet or in a notepad it does work.
  3. Hello everyone, I need your help because my program does not work in a program called "facturacion", only WinActivate works. I try to use "send()", "Controlsend()" or send text with an "array[ ]" but nothing works. This is my code: #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Excel.au3> #include <Array.au3> #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]) ;;; EndSelect Wend Exit I think it's something from the program "Facturacion" because if I want to use "send()", "Controlsend()" or send text with an "array[ ]" in another program it works correct. sorry for my english, google helped me pruebas.au3
×
×
  • Create New...