
andynewbie
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by andynewbie
-
Yes, I have seen the explanations of the @error code, which differ depending on the function call. I was hoping the error description was stored in a known location, like another @macro that always holds the meaning of the @error code.
-
Thanks for the info. Good stuff to have in my bag of tricks ! What I'm looking for is a way to clear the Temporary Internet files under Tools->Internet Options>Delete All Offline Content-> check the Offline files box, then click OK.
-
How can I get the meaning of the number in @error ? I want to include the error's description in my error log file. Is an @error <> 0 the same thing as a COM error ? andynewbie
-
Just the cache for the current user. Andy
-
How can I get AutoIT to clear the cached(temporary) files Internet Explorer uses ? Andy
-
1) My script is only clicking through existing web pages and popups, entering text, etc. It does NOT create a web page, it only references them. The script times response time, bcse. mgmt wants some hard numbers to tell people that complain about the new "slow" system. 2) No, my 2nd send _IEAttach is not finding the 2nd web page. Very puzzling. It returns a 7, meaning 'no match'. I've tried changing the text to something else that is on the existing page, but that didn't work either. 3) The FormGetCollection is there because the AutoIT utility doesn't list a form name. It also returns a 7. I tried to put it into an array of objects, like Help says to do, but I kept getting syntax errors. The algorithm is like this: Start the app Confirm the first page is what displays first, clicking through any unexpected popups first, then click Start on the first page. Wait until the next page displays, clicking through any popups, then enter data into the next page. Continue until we get to the page we can to run Timer to put stats into the log file. ---------------------------------------------- #include <IE.au3> ;AutoItSetOption ("WinTitleMatchMode", 4) dim $oIE dim $s_mode dim $returnstatus = 0 dim $oIE dim $s_string dim $oForm dim $i_number_of_comparisons dim $omyform dim $oURL dim $founderrors = 0 dim $logfilenametoday dim $timestamp dim $logfile ;-------------------------------------------------------- $logfilenametoday = @YEAR & "_" & @MON & "_" & @MDAY & ".log" $timestamp = @YEAR & "/" & @MON & "/" & @MDAY & "_" & @HOUR & ":" & @min & ":" & @SEC ;----------------------------- ; open log FileChangeDir ;----------------------------- $logfile = FileOpen("C:\Documents and Settings\baperfuser\My Documents\andysfiles\timeroutput\BA_PERF_DATA_" & $logfilenametoday, 1) FileWriteLine($logfile, "timestamp:" & $timestamp & ". Start this AutoIT script at $logfilenametoday)") FileWriteLine($logfile, "timestamp:" & $timestamp & ". Start time: " & $timestamp) ;--------------------------------------------------------------- $oURL = "http://miserdev/transactor" $oIE = _IECreate($oURL) ;if $founderrors = 1 Then ;EndIf ;_IENavigate($oIE, $oURL) ;run('"C:\Program Files\Internet Explorer\iexplore.exe" http://miserdev/transactor') ;sleep(5000) $s_mode="Text" $oIE = _IEAttach ("Welcome to MISER",$s_mode) ;MsgBox(0,"","status after attach:" & @error & " currwin=" & $oIE,5) $returnstatus = @error ;--- run code in While loop as long as ;the current window is not the one we want while $returnstatus <> 0 ;msgbox(0,""," got wrong window",5) if $returnstatus = 7 then MsgBox(0,"","start page not found",5) SEND("{ENTER}") SLEEp (5000) $oIE = _IEAttach ("Welcome to MISER",$s_mode) EndIf $returnstatus = @error Wend ;------------------------ ; now we have the desired window active ; press ENTER to click the Start button ;------------------------ ; JUMP TO THE 2ND SCREEN ;------------------------- Send("{ENTER}") ;msgbox(0,"","extended="& @extended,5) $oForm = _IEFormGetObjByName ($oIE, "Internet Explorer_Server1") ;$oForm = _IEFormGetCollection ($oIE,-1) MsgBox(0,"","erro after getcollection=" & @error,5) ;msgbox(0,"","form 2:" & $oForm[2],5) ;msgbox(0,"","form 3:" & $oForm[3],5) ;----------- go to Login screen ------------------- ;sleep(5000) _IELoadWait ($oIE) if @error <> 0 Then msgbox(0,"","error in loadwait",5) Else msgbox(0,""," login is loaded",5) EndIf ;$oForm = _IEFormGetCollection ($oIE, 0) ;$omyform = $oForm[0] ;msgbox(0,"","oform : " & $oForm[0],5) $s_mode="text" $s_string = "Sign On" ; $oForm = _IEFormGetCollection ($oIE, 0) $oIE = _IEAttach ($s_string,$s_mode) MsgBox(0,"","status after login attach:" & @error,5) $returnstatus = @error ;--- run code in While loop as long as ;the current window is not the one we want $i_number_of_comparisons = 0 ;msgbox(0,""," match string=" & $s_string & " mode=" & $s_mode,3) while $returnstatus <> 0 and $i_number_of_comparisons <= 5 if $returnstatus = 7 then $i_number_of_comparisons = $i_number_of_comparisons + 1 $oIE = _IEAttach ($s_string,$s_mode) elseif $returnstatus = 5 Then msgbox(0,""," invalid value. bail out !",5) $founderrors = 1 EndIf $returnstatus = @error Wend if $i_number_of_comparisons > 5 Then msgbox (0,"","could not match to Login screen. Exiting application.",5) $founderrors = 1 EndIf ------------------------------------------ THE END----------------
-
-
Correct. That web page is on our Intranet, so you won't be able to browse to it. I am using AutoIT 3.2.2.0 and the latest beta to use the _IE commands.
-
How can I search these forums for messages with all my keywords ? I tried "keyword1+keyword2+keyword3" and "keyword1 keyword2 keyword3" , to no avail.
-
I am getting "REMOTE SCRIPTING ERROR: Page invoked does not support remote scripting". This sounds like the vendor made this app's web page so it cannot be automated. Does this mean I can't use AutoIT 3.0 for my project ? Andy #include <IE.au3> dim $oIE dim $s_mode dim $returnstatus = 0 dim $oIE dim $s_string dim $oForm[10] dim $i_number_of_comparisons dim $omyform ;-------------------------------------------------------- $oIE = _IECreate() _IENavigate($oIE, "http://miserdev/transactor") ;run('"C:\Program Files\Internet Explorer\iexplore.exe" http://miserdev/transactor') ;sleep(5000) $s_mode="Text" $oIE = _IEAttach ("Welcome to RMISER",$s_mode) ;MsgBox(0,"","status after attach:" & @error & " currwin=" & $oIE,5) $returnstatus = @error ;--- run code in While loop as long as ;the current window is not the one we want while $returnstatus <> 0 ;msgbox(0,""," got wrong window",5) if $returnstatus = 7 then $oIE = _IEAttach ("Welcome to MISER",$s_mode) EndIf $returnstatus = @error Wend ;------------------------ ; now we have the desired window active ; press ENTER to click the Start button ;------------------------ Send("{ENTER}") ;----------- go to Login screen ------------------- _IELoadWait ($oIE) if @error <> 0 Then msgbox(0,"","error in loadwait",5) Else msgbox(0,""," login is loaded",5) EndIf ;$oForm = _IEFormGetCollection ($oIE, 0) $s_mode="Text" $s_string = "PIN" $oIE = _IEAttach ($s_string,$s_mode) $returnstatus = @error ;--- run code in While loop as long as ;the current window is not the one we want $i_number_of_comparisons = 0 msgbox(0,""," match string=" & $s_string & " mode=" & $s_mode,3) while $returnstatus <> 0 and $i_number_of_comparisons <= 5 if $returnstatus = 7 then $i_number_of_comparisons = $i_number_of_comparisons + 1 $oIE = _IEAttach ($s_string,$s_mode) EndIf $returnstatus = @error Wend if $i_number_of_comparisons > 5 Then msgbox (0,"","could not match to Login screen",5) EndIf
-
Oh, is .rar a compressed file like zip files ? It looked all garbled when I opened it in Notepad. How do I extract it to a script file ? Andy
-
How is IE_Builder.rar installed and used, after downloading it ? Does it build web pages or does it produce AutoIT code when a person clicks through web pages, kind of like a macro builder ? Newbie
-
How is IE_Builder.rar installed and used, after downloading it ? I am using autoit to time the number of seconds it takes an ASP web page to return data to the screen. Will IE_Builder help with that ? vacunewbie
-
Does anyone know how to run a web page in "slow motion" ? I'm trying to find out the sequence of when parts of the screen are painted, but the screen paints itself too fast. I know about Ctrl-S in Windows, but that doesn't exactly slow it down.
-
I'm using AutoIT to generate systems performance (timers) data to a file. I need to stop the timer when the cursor stops in a specific text box. You see, after loading all the data onto the ASP form, the cursor is left at the menu's text box for the user to enter his next command. I want to use this "focus" step in the application to tell me how long it took to load data on the screen.
-
returning data from a function
andynewbie replied to andynewbie's topic in AutoIt General Help and Support
I'll take a look at AdlibEnable. I'm still interested in knowing how to trap the error code from any function call, while getting the returned value/data from the function. Any ideas ? -
This code looks for a popup window that may or may not display, for valid reasons. It clicks thru the window if it does come up, or keeps going down the code, if it does not display. How can I trap for an unexpected error as well as the value returned by the function ? The "signonwrong" is a test because if the window displays, it should NOT find the "SignOn" button that is in fact there, and should NOT send an ENTER. $error = WinwaitActive("Display Form","SignOnwrong",5) If $error = 0 Then Send("{ENTER}") Else ContinueCase EndIf
-
Newbie here, What are good ways to determine the ControlId of a button ? Does anyone know the Windows API call to grab the Windows-assigned control id ?