Jump to content

oulaya

Active Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by oulaya

  1. script that plant i have a loop in my program autoit the probleme after 10 element script that plant i don't knew why
  2. hi friends i have a script with autoit and a file excel with 50 elements i hane no error but yhe probleme my script work good for just 10 element and block and i should excute another time helpp please
  3. i do the same for another data 1.1.1.1 For $i = 19 To 26 ;Loop $test = $oExcel.Activesheet.Cells($i,6).value sleep(1000) local $f=StringSplit($test, ".") Local $pa = _IEGetObjByName($oIE,"containerAdresseIP:adresseIpPart1") _IEFormElementSetValue ($pa,$f[1]) Local $pa = _IEGetObjByName($oIE,"containerAdresseIP:adresseIpPart2") _IEFormElementSetValue ($pa,$f[2]) Local $pa = _IEGetObjByName($oIE,"containerAdresseIP:adresseIpPart3") _IEFormElementSetValue ($pa,$f[3]) Local $pa = _IEGetObjByName($oIE,"containerAdresseIP:adresseIpPart4") _IEFormElementSetValue ($pa,$f[4]) Next and i have same problem any help
  4. i didn't now how to add erroe cheking in my script
  5. Thanks but i still have this problem ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: _IEFormElementSetValue($oIEObject, $aCellValues[2]) _IEFormElementSetValue($oIEObject, ^ ERROR and it put the value in right place
  6. i have data like oulaya1 oulaya2/oulaya3 i want take data oulaya1 oulaya2 oulaya3 and put in my textline
  7. i want to take value1 in case 1 and value 2 in case 2 and value 3 in case 3 ???
  8. i try it but i have this problem now _IEFormElementSetValue ($pa,$a[2]) _IEFormElementSetValue ($pa,^ ERROR
  9. help For $i = 19 To 26 ;Loop $test = $oExcel.Activesheet.Cells($i,12).value local $f=StringSplit($test," ") Local $pa = _IEGetObjByName($oIE,"containerNoeud:agglo") _IEFormElementSetValue ($pa,$f[1]) sleep(1000) local $b=_ArraytoString($f[2]) local $a=StringSplit($b,'/') Local $pa = _IEGetObjByName($oIE,"containerNoeud:site") _IEFormElementSetValue ($pa,$a[1]) Local $pa = _IEGetObjByName($oIE,"containerNoeud:point") _IEFormElementSetValue ($pa,$a[2]) ;MsgBox($f[2], "","ll") Next sleep(2000) (81) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: local $b=_ArraytoString($f[2]) local $b=_ArraytoString(^ ERROR
  10. yes the login work thedelete work but the problem how can i take the velue from excel and put it in my link (url) ??
  11. hi thank you for you i still have probleme this is my script #include <Excel.au3> #include <IE.au3> ; TO ADD PREFFERED HOTELS FOR A CORPORATE ACCT, JUST CHANGE THE FOLLOWING TWO LINES ; THE URL AND CELL RANGE ARE ALL YOU NEED TO CHANGE AND BE SURE TO ; PUT YOUR EXCEL FILE IN YOUR SCRIPT DIRECTORY AND NAME IT HOTEL_LIST.XLS ; $corporate_URL = "http://dvedvr44.rouen.francetelecom.fr:9013/ner-training/app/homepage" $cell_range = "A1:A560" $FilePath=@ScriptDir & "\1.xlsx" $hotel_array =_Excel_RangeRead($FilePath,1,$cell_range) ; 1 means sheet 1 $nbr_hotels = UBound($hotel_array)-1 ; stores # of hotels $oIE = _IEAttach ("eAdvantage help desk", "text") _IENavigate ($oIE, $corporate_URL) _IELoadWait ($oIE) ; wait til page loads completely Func _Main() Global $oIE = _IECreate("www.vvv.com", 1) _IELoadWait($oIE) if WinActive('Log On - Microsoft Internet Explorer - company') = True Then MsgBox($MB_SYSTEMMODAL, "", "Exists", 1) ConsoleWrite("Exists" & @CRLF) WinActivate('Log On - Microsoft Internet Explorer - company') Signin($oIE) Else ;MsgBox($MB_SYSTEMMODAL, "", "Do not exists", 1) Global $oIE = _IECreate("http://dvedvr44.rouen.francetelecom.fr:9013/ner-training/app/homepage", 1) ConsoleWrite("Do not exists" & @CRLF) _IELoadWait($oIE) WinActivate('Log On - Microsoft Internet Explorer - company') Signin($oIE) EndIf EndFunc Func Signin(ByRef $oIE) Local $user_name = _IEGetObjById($oIE, "nom") _IEFormElementSetValue($user_name, "adm", 0) Local $password = _IEGetObjById($oIE, "password") _IEFormElementSetValue($password, "adm", 0) $oTDs = _IETagnameGetCollection($oIE, "TD") $oButtons = _IETagNameGetCollection ($oIE, "INPUT") For $oButton In $oButtons If $oButton.type = "submit" Then _IEAction ($oButton, "click") ExitLoop EndIf Next Local $pa = _IEGetObjById($oIE, "id2") _IEFormElementSetValue($pa, "yee", 0) $bouton = _IEGetObjById ($oIE, "id12") _IEAction ($bouton, "click") sleep(2000) EndFunc
  12. i want to delete same value for my application iwrite the code for delete its ok but i should put the variable with my hand and a have 50 variable in excel i wwant take those variable ant put it my application and delete them
  13. web application i want take the value from my excel and put it in textbox the application
  14. yes now i can open excel but i dont know how can i take value and put in my application ???? help
  15. i tried also this include <Array.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> ; Create application object and open an example workbook Local $oExcel = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "Z:\Stage2016\1.xlsx") If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error opening workbook '" & @ScriptDir & "Z:\Stage2016\1.xlsx'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oExcel) Exit EndIf ; ***************************************************************************** ; Read data from a single cell on the active sheet of the specified workbook ; ***************************************************************************** Local $sResult = _Excel_RangeRead($oWorkbook, Default, "A1") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 1", "Error reading from workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended) MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 1", "Data successfully read." & @CRLF & "Value of cell A1: " & $sResult)
  16. i tried this $q_dsl=""; $var = "C:\Users\ZJMD2860\Desktop 1.xlsx" Func Check_Fichier() $f_vp = FileOpen($var, 0) If $f_vp = -1 Then MsgBox(0, "Erreur", "Impossible d'ouvrir le fichier : " & $f_vp ) Return 0 Exit EndIf ;~ $q_dsl = StringUpper(InputBox("Reprise ?", "Saisir un DSLAM de reprise si besoin." & @CRLF & @CRLF & "Sinon cliquez CANCEL OU ESC pour TOUT traiter.", "", " M8")) ;~ $q_pop = StringUpper(InputBox("PoP ?", "Saisir le nom du POP pour le suivi : .", "", " M3")) ;~ $q_dsl = "" ;~ $q_pop = 'BOR' ; Comptage nombre de lignes Global $ligne = 0 ; n° ligne active Global $nbr_ligne = 0 ; Nbr de ligne à traiter While 1 $l_vp = FileReadLine($f_vp) If @error = -1 Then ExitLoop $ls_vp = StringSplit($l_vp, ";") If StringLeft($ls_vp[1],2) = "NM" Then Global $q_pop = StringMid($ls_vp[1],3,3) ;Saute la 1ère ligne des champs If StringLeft($ls_vp[1],2) = "DS" Then $nbr_ligne = $nbr_ligne + 1 ;Saute la 1ère ligne des champs If StringInStr(StringUpper($l_vp),StringUpper($q_dsl)) Then Global $q_dsl_ok = 1 ;Saute la 1ère ligne des champs If StringInStr(StringUpper($l_vp),StringUpper($q_dsl)) Then Global $ligne = $nbr_ligne ;Saute la 1ère ligne des champs Wend FileClose($f_vp ) Return 1 EndFunc but didn't open anything
×
×
  • Create New...