Mercury049 Posted September 4, 2008 Posted September 4, 2008 (edited) I have looked at it in the help file as much as I can. But I'm still not getting it to work, I must be doing something wrong somehow, because when I output the data returned from it, I'm getting a blank. What I'm trying to do is basically, pull the source in from a page, read through the source for certain key elements, once they're found, load them up into a variable to be used later. Please help if you can. I know it's grabbing the data successfully because I do a ClipPut and then send that data to a notepad or whatever and I see that the source is indeed there. So I know it has data to read from when searching for the string. Thanks! #include<IE.au3> #include<String.au3> #include<Clipboard.au3> func getDataProcess() $isActive = WinWaitActive("Manual Queue Detail - Microsoft Internet Explorer","",3) If $isActive = "1" Then $winTitle = "Manual Queue Detail - Microsoft Internet Explorer" $hWin = WinGetHandle($winTitle) ;connect to window and read source $openedIEWindow = _IEAttach($hWin,"HWnd") $sourceText = _IEDocReadHtml($openedIEWindow) ClipPut($sourceText) $nameWeNeed = _StringBetween($sourceText,"<SPAN id=lblFirstName>","</SPAN>") MsgBox(1,"first name",$nameWeNeed,5) Else MsgBox(1,"Status","nope",3) EndIf EndFunc getDataProcess() Edited September 4, 2008 by Mercury049
Mercury049 Posted September 4, 2008 Author Posted September 4, 2008 I have looked at it in the help file as much as I can. But I'm still not getting it to work, I must be doing something wrong somehow, because when I output the data returned from it, I'm getting a blank. What I'm trying to do is basically, pull the source in from a page, read through the source for certain key elements, once they're found, load them up into a variable to be used later. Please help if you can. I know it's grabbing the data successfully because I do a ClipPut and then send that data to a notepad or whatever and I see that the source is indeed there. So I know it has data to read from when searching for the string. Thanks! #include<IE.au3> #include<String.au3> #include<Clipboard.au3> func getDataProcess() $isActive = WinWaitActive("Manual Queue Detail - Microsoft Internet Explorer","",3) If $isActive = "1" Then $winTitle = "Manual Queue Detail - Microsoft Internet Explorer" $hWin = WinGetHandle($winTitle) ;connect to window and read source $openedIEWindow = _IEAttach($hWin,"HWnd") $sourceText = _IEDocReadHtml($openedIEWindow) ClipPut($sourceText) $nameWeNeed = _StringBetween($sourceText,"<SPAN id=lblFirstName>","</SPAN>") MsgBox(1,"first name",$nameWeNeed,5) Else MsgBox(1,"Status","nope",3) EndIf EndFunc getDataProcess() SORRY! NVM I found that I needed to convert the ARRAY that was being passed back to test. Thanks Anyways!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now