Dubz Posted March 10, 2006 Share Posted March 10, 2006 Hey, thanks in advance for any help you can provide. This is what I want to end up with:The script will be run as a scheduled task at 3am. It will open a shortcut to a website, login with my username/pass, browse several sections, copy a portion of text and export it to Excel, save, then close the browser and excel.Now my problem:I can't figure out to have it read the contents of the browser. For example; when I go to the site http://www.autoitscript.com, how would I make the script see the following: Welcome to the AutoIt Script home pageOnce it sees the right page, how would I get the script to copy only that portion of text? Link to comment Share on other sites More sharing options...
cppman Posted March 10, 2006 Share Posted March 10, 2006 check out this ie UDF library....http://www.autoitscript.com/forum/index.php?showtopic=13398 Miva OS Project Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 (edited) Hey, thanks in advance for any help you can provide. This is what I want to end up with:The script will be run as a scheduled task at 3am. It will open a shortcut to a website, login with my username/pass, browse several sections, copy a portion of text and export it to Excel, save, then close the browser and excel.Now my problem:I can't figure out to have it read the contents of the browser. For example; when I go to the site http://www.autoitscript.com, how would I make the script see the following: Once it sees the right page, how would I get the script to copy only that portion of text?Welcome to the forumsthere is a great Tutor program that has demonstrations... including IE.au3 uses for the internethttp://www.autoitscript.com/forum/index.php?showtopic=21048#8) Edited March 10, 2006 by Valuater Link to comment Share on other sites More sharing options...
Dubz Posted March 10, 2006 Author Share Posted March 10, 2006 (edited) That's a great link Thank you. I'm stuck on how to use this function now:ConsoleWrite()I've searched google and read and tested this several times. It seems to do nothing. I'd like to see the information it is writing, but don't know how.*Just saw the 2nd reply. I'm checking that out right now Thank you again. Edited March 10, 2006 by Dubz Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 That's a great link Thank you. I'm stuck on how to use this function now:ConsoleWrite()I've searched google and read and tested this several times. It seems to do nothing. I'd like to see the information it is writing, but don't know how.are you using SciTe editor??8) Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 #include <GUIConstants.au3> GUICreate("My GUI color text"); will create a dialog box that when displayed is centered $Button_1 = GUICtrlCreateButton("Button1", 130, 150, 170, 40, $BS_BOTTOM + $BS_CENTER) $Label_1 = GUICtrlCreateLabel("Label1", 180, 100, 40, 170, $SS_SUNKEN + $SS_CENTER ) GUISetState() _MouseOver($Button_1) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $Button_1 ConsoleWrite("Selected Button 1" & @LF) Case $msg = $Label_1 ConsoleWrite("Selected Label 1" & @LF) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func _MouseOver($h_controlID) Dim $opt = Opt("MouseCoordMode",2) Dim $pos = ControlGetPos ( "My GUI color text", "", $h_controlID ) MouseMove($pos[0] + 5, $pos[1] + 5,0) Opt("MouseCoordMode",$opt) EndFunc example 8) Link to comment Share on other sites More sharing options...
Dubz Posted April 6, 2006 Author Share Posted April 6, 2006 are you using SciTe editor??8)I'm using SciTe now, still it shows nothing when I write to console. I've run your example code aswell. It displays a GUI with a label and a button. I don't understand the relevance. Link to comment Share on other sites More sharing options...
exodius Posted April 6, 2006 Share Posted April 6, 2006 (edited) I'm using SciTe now, still it shows nothing when I write to console. I've run your example code aswell. It displays a GUI with a label and a button. I don't understand the relevance. Whenever I want to read webpages.. this is what i usually do: #include <File.au3> $Download = InetGet ( "http://www.webpage.com", "destinationpage.html" ) If $Download = 0 Then Exit Dim $Lines _FileReadToArray("destinationpage.html", $Lines) For $x = 1 To $Lines[0] ToolTip("Reading #" & $x & " out of " & $Lines[0] & " lines", 0, 0) $read = StringAddCR($Lines[$x]) If StringInStr ( $read, "WhatYouWantToFind") Then $read = StringStripWS( $read, 3 ); Munge the string around till you get what you need using stringsplit, etc. FileWriteLine ( "OldPdfs.txt", $read & "," & $read2 ) EndIf Next Edited April 6, 2006 by exodius Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2006 Share Posted April 6, 2006 I'm using SciTe now, still it shows nothing when I write to console. I've run your example code aswell. It displays a GUI with a label and a button. I don't understand the relevance.just click the label or the button ... and presto... it writes to the console ( just like you asked about)8) Link to comment Share on other sites More sharing options...
Dubz Posted April 16, 2006 Author Share Posted April 16, 2006 (edited) See that's the thing, it writes to the console, but then how do I see what is written, or call info from the console to have it written somewhere else? This is what I'm trying to use right now: #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http://www.inselkampf.co.uk") $oDoc = _IEDocumentGetObj($oIE) $forms = _IEFormGetCollection($oDoc) For $form in $forms ConsoleWrite("Form name: " & $form.name & @CR) $fes = _IEFormElementGetCollection($form) For $fe in $fes ConsoleWrite(@Tab & $fe.name & @TAB & "Type: " & $fe.type & @CR) Next Next Edited April 16, 2006 by Dubz Link to comment Share on other sites More sharing options...
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