
zasxes
Active Members-
Posts
51 -
Joined
-
Last visited
Everything posted by zasxes
-
How do I get the while look to continue to loop and not wait for the Test func to complete. Can the Test() func be called while it is already running? $Test = 0 While 1 $Test = $Test+1 Sleep (3000) Test($Test) WEnd Exit Func Test($1) IniWrite("C:\Temp\mytest.ini", "section2", @HOUR & ":" & @MIN & ":" & @SEC, "Event Start = " & $1) Sleep (5000) IniWrite("C:\Temp\mytest.ini", "section2", @HOUR & ":" & @MIN & ":" & @SEC, "Event End = " & $1) EndFunc
-
Thanks for the quick replies. I will let you know how well this works. One quick question. I am a bit new to Reg Expressions. If this correct: "(?s)(?i)Save|Submit|\_SibB|_SIG,AddLine" The above basicly means "(?s=Find any match)(?i=Not Case Sensituive)Save |=Or Submit Or (\=Special Char) _SibB Or _SIG (What does the comma do?) Addline" I guess the onlything I am unsure of is the comma before Addline
-
This function basically waits until the FooterPage loads on a website then checks if certain objects exist. If they do it then disables them one way or another. The reason I do not simply have the .id spelled out is because in some cases it is dynamicly generated. The problem with the function is that it can be slow at times and you can beat it to the objects and use them before I disable them. If possible I would like to speed this process up or find a way to ensure the objects cannot be used until after this function sets them to "SafeMode = 1". Anyt thoughts would be helpful. Func IEEvent_FrameNavigateComplete($1) If StringInStr($1, "FooterPage") then ToolTip("In Frame", 0, 0) With $B_oIE5 $elems = .document.frames.main.document.getElementsByTagName("*") $Max = $elems.length $count = 0 For $elem in $elems $count = $count + 1 if isobj($elem) then if $elem.SafeMode.value <> 1 then $elem.setAttribute("SafeMode",1) if StringRight($elem.id, 3) = "_SB" then $elem.disabled="True" ; Submit Button (Subjects) if StringRight($elem.id, 6) = "log_IB" then $elem.disabled="True" ;Inactivate Log Line button if StringInStr($elem.id, "Save") then $elem.disabled="True" ; Submit Button if StringInStr($elem.id, "SubmitBut") then $elem.disabled="True" ; Submit Button if StringInStr($elem.id, "AddLine") then $elem.disabled="True" ; Add log line if StringInStr($elem.id, "AddLine") then $elem.href=$1 ; Add log line if StringInStr($elem.id, "_SibB") then $elem.disabled="True" ; Sign Box if StringInStr($elem.id, "_SIG") then $elem.disabled="True" ; Sign Button Endif EndIf Next ;WEnd EndWith EndIf EndFunc
-
I am trying to read the IE Dom and put the string 333369NPP2001 (UAT) from the HTML below into a variable. I thought I could use .target but that just shows main. how do I access that data? <A id=ListDisplayNavigation_dgObjects__ctl3_hpObject href="HomePage.aspx?LD_StudyID=263&mdsc=6%3a467331" target=main>333369NPP2001 (UAT)</A>
-
I use IE Web Developer to easily see the path for elements in web pages. For example i can click a login button in Auto it by using document.forms.LoginForm.UserPasswordBox.click instead of the IE UDF in some cases this is easier. Are there any other tools that provide the path to objects like this? The reason I ask is it seems there various ways to get to an object.
-
I am creating a embedded IE window that people will use as a safe portal into a web application and the applet will also track what is being done. The tracking works fine and that is the main part of the script. I am trying to use AdlibEnable to check if the buttons exist and if they do to disable them. I kepp getting the error Object referenced outside a "With" statement.: The latest way I tried this looks like the following: I have tried placing the AdlibEnable line at various places in the script but it never seems to work regardless. Func GreySubmit() If $oIE then $oIEE = _IEAttach ("Safe Portal", "embedded") $Sub = $oIEE.document.getElementById("FramePage").contentwindow.document.forms.Form1.R_footer_SB.disabled If $Sub = 0 then $oIEE.document.getElementByI("FramePage").contentwindow.document.forms.Form1.R_footer_SB.disabled="True" Endif EndFunc
-
perfect thanks!!!
-
I am trying to loop through all teh objects on a webpage and read in three properties. Based on the values of the properties I then do something. My problem is that the script ends in error if it hits an object that does not have one of the properties i am calling. Here is a snip of the code. for $Obj In $Objs with $Obj $1 = .id $2 = .maxLength EndWith Do stuff with the variables How do I check if an object has given properties?
-
Help finding a form on a complicated website
zasxes replied to JeffJones's topic in AutoIt General Help and Support
This may not be the best way but it worked for me #include <IE.au3> Global $oIE Global $AFrames Global $CountFrames Global $AFrame Global $BFrames Global $BFrame $oIE = _IECreate("https://www.putnam.com/individual/") $AFrames = _IEFrameGetCollection ($oIE) $CountFrames = @extended MsgBox(0, "FramesA " & $CountFrames, "see above") For $i = 0 to ($CountFrames - 1) $AFrame = _IEFrameGetCollection ($oIE, $i) MsgBox(0, "Frame Info for Frame " & $i, _IEPropertyGet ( $AFrame, "locationurl")) Next $BFrames = _IEFrameGetCollection ($AFrame) $CountFrames = @extended MsgBox(0, "FramesB " & $CountFrames, "see above") For $i = 0 to ($CountFrames - 1) $BFrame = _IEFrameGetCollection ($AFrame, $i) MsgBox(0, "Frame Info for Frame " & $i, _IEPropertyGet ( $BFrame, "locationurl")) Next ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $MainFrame = _IEFrameGetCollection ($oIE, 0) $UpperFrame = _IEFrameGetCollection ($AFrame, 0) $LowerFrame = _IEFrameGetCollection ($AFrame, 1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $oTable = _IETableGetCollection ($LowerFrame) $iNumTables = @extended MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page") $oForm = _IEFormGetObjByName ($LowerFrame, "login") $Uid = "111111" $oQuery = _IEFormElementGetObjByName ($oForm, "logon") _IEFormElementSetValue ($oQuery, $Uid) -
Accessing IE Objects in Tables in Framesets
zasxes replied to zasxes's topic in AutoIt General Help and Support
I will provide anyone who is willing to help with a test account to log into the website to see the setup first hand. Just email me at zasxes@excite.com -
Accessing IE Objects in Tables in Framesets
zasxes replied to zasxes's topic in AutoIt General Help and Support
Nope that is what I have tried and this is teh error I get >Running:(3.2.2.0):\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Rachel\Desktop\New Folder\22.au3" --> IE.au3 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch --> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType +>16:03:10 AutoIT3.exe ended.rc:0 +>16:03:11 AutoIt3Wrapper Finished -
Accessing IE Objects in Tables in Framesets
zasxes posted a topic in AutoIt General Help and Support
I am trying to simply fill in a password box, its name is (EnterPasswordBox). I have tried various ways of getting to it but I cannot seem to find the correct sytax. Below is the IE Dev tool bar outline of the object and the source is below. Can someone help me out with this? +<HEAD> | - <FRAMESET> | +<FRAME ID=FrameHeader> | -<FRAME ID=FramePager> | -#document | #comment -<HTML> +<HEAD> | -<BODY id=Body1> -<FORM id=Form1> | <INPUT> | #text -<TABLE id=Table1> -<TBODY> +<TR> +<TR> -<TR> +<TD class=subtitle> -<TD> |<INPUT id=EnterPasswordBox> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Transitional//EN"><META http-equiv="Content-Type" content="text/html; charset=utf-8"> <HTML><HEAD><STYLE> /* No matching styles were found. */ </STYLE></HEAD><BODY id="Body1" bottomMargin="10" topMargin="10" MS_POSITIONING="FlowLayout" NAME="Body1" MARGINHEIGHT="10" MARGINWIDTH="10"><FORM id="Form1" name="Form1" onsubmit="return(SubmitCheck());" action="Timeout.aspx?mdsc=0%3a6740&NB=Y" method="post"><TABLE id="Table1" cellSpacing="0" cellPadding="3" align="center" border="0"><TBODY><TR><TD vAlign="middle" align="left"> <INPUT id="EnterPasswordBox" style="WIDTH: 118px" type="password" name="EnterPasswordBox" value="" /> </TD></TR></TBODY></TABLE></FORM></BODY></HTML> -
The full url without the HTTP is //222.222.222.22/nX/docViewFrame.asp?ID=1234&RepoType=corporate&DocName=client0003_Randomization_p&DocType=rep&aBob=client3&aCyp=5B1234567890')
-
I am trying to open the following URL: Run('explorer Http://222.222.222.22/nX/docViewFrame.asp?...234567890') Instead of the page opening I get a windows error msg that says: The path '5B1234567890' does not exist or is not a directory. Any Ideas??
-
Is there a way to evaluate the string below and see if it have the word HomePage as part of it? All data before /HomePage is variable. http://ServerName/COMPANYSOFTWARE_Loadtest...)/HomePage.aspx?
-
Ok I am having a problem with the function below. I need to check that a link exists on a web page and that it is the first link in the frame. Here is an example of what the link might look like: "http://serv/Validation/Meed/(pmb5eg45qkquutv3xzd)/Modules/EAH/PrimaryRecordPage.aspx?ID=0&S=110&msxc=21:6790]http://serv/Validation/Meed/(pmb5eg45qkquu...10&msxc=21:6790" Since the security code always changed I cannot just match it. So I need to cut it up in an array but if the link does not exists it errors out saying that the array is out of range. Any ideas Func RECORDPAGE() Dim $ADD_SUB[10] Dim $ADD[2] $j=0 While $j < 5 MOVETO($MAIN);A function that activates a frame and does some other stuff Send ("{TAB 3}");this tabs top the first link in the frame $ADD_LINK = StatusbarGetText($TITLE) $ADD_SUB = StringSplit($ADD_LINK, "/") $ADD = StringSplit($ADD_SUB[9], ".") If $ADD[1] = "PrimaryRecordPage" Then Exitloop $j=$j+1 Wend If $ADD[1] <> "PrimaryRecordPage" Then MsgBox(262144, "Error", "Error, you must be on the " & $ADD[1]) Exit Endif EndFunc;=>RECORDPAGE()
-
Can it be done or do I have to use a mouse movement
-
I have a web page that I want to open, I also want to time it and check for errors. The main problem I am having is how to determine it is finished loading. I cannot check the mouse cursor since it changes back and forth while opening adobe. I cannot rely on Status Bar Text since it Done shows up 3 times. All I can see that shows that it is finished is Last Control Under Mouse or Window Text. How do I work with these? Press CTRL-ALT-F to pause the display. >>>>>>>>>>>> Window Title <<<<<<<<<<<<< Document Results ( classname=IEFrame ) >>>>>>>>>>> Window Dimensions <<<<<<<<<<< left: -4 top: -4 width: 1032 height: 748 >>>>>>>>>>> Mouse Position <<<<<<<<<<< On Desktop: x: 524 y: 356 In Window: x: 528 y: 360 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB Mode - Hex: 0xD4D0C8 Dec: 13947080 BGR Mode - Hex: 0xC8D0D4 Dec: 13160660 >>>>>>>>>>> Last Control Under Mouse <<<<<<<<<<< Class: AVL_AVView4 Text: AVPageView >>>>>>>>>>> Status Bar Text <<<<<<<<<<< (1): Done (2): (3): (4): (5): (6): Internet >>>>>>>>>>> Visible Window Text <<<<<<<<<<< http://12X.XX.XXX.6/nr/docViewFrameTop.asp?ID=1801&RepoType=corporate&DocName=Patient_Summary_Management_MonitorISR&DocType=rep&aBob=isrv1&aCyp=53swsd4585F http://1xx.xx.xxx.x/nr/docViewFrameTop.asp?ID=1801&RepoType=corporate&DocName=Patient_Summary_Management_MonitorISR&DocType=rep&aBob=isrv1&aCyp=534356xxxxx45xxF Done http://1xx.xx.xxx.x/nr/xxxxxxx.asp?entry=xxxx&Report=%2FDocument%2Fpatient%5Fsummary%5Fmanagement%xxx&path=a.pdf AVDocToolView AVSplitterView AVScrollView AVPageView AVButton 112% AVButton AVButton AVButton AVEditView 1 of 25 AVButton AVButton AVButton AVEditView 11 x 8.5 in AVButton AVButton AVButton AVButton AVButton AVOverView AVTabView AVBookmarkView AVScrollView AVTreeView AVToolBarEasel AVToolBarView AVToolBarView AVToolBarView AVToolBarView AVZoomView AVEditView 112% AVButton AVToolBarView AVToolBarView AVToolBarView AVToolBarView >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< AVEditView AVButton AVButton AVProgressView AVButton AVToolBarEasel AVToolBarEasel AVToolBarEasel
-
You are missing my point. Ok the continuous loop is easy with a while 1 Wend The hard part is to only average the last 100 loads. This would most likely need to be done in an array or a file. For instance if I set your script to load a site $Times = 100000000000000000, then the averages would not be realistic to how the site is working today after only a few days. If the average could keep readjusting itself every load by dropping the oldest value out of 100 for each new load time then the numbers would be much more realistic.