scatterp Posted September 9, 2007 Share Posted September 9, 2007 Hi How can i press return here ? (not littoraly with the keyboard ;~ $keywords = $keywords & $line & 'chr$(34) ' #include <GuiConstants.au3> #include <IE.au3> #include <String.au3> #include <array.au3> #include <File.au3> $keywords="" $file = FileOpen("1.txt", 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ;~ While 1 ;~ $line = FileReadLine($file) ;~ If @error = -1 Then ExitLoop ;~ $keywords = $keywords & $line & 'chr$(34) ' ;~ Wend $keywords = "football" FileClose($file) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GUICreate;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; GuiCreate("Traffic Estimator", 300, 100,(@DesktopWidth-191)/2, (@DesktopHeight-157)/2) $Input_1 = GUICtrlCreateInput ("", 90, 20, 200, 20) $Label_1 = GuiCtrlCreateLabel("File Name:", 10, 23, 100, 20, 0x0B) $button1 = GuiCtrlCreateButton("Run", 90, 60, 130, 20) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button1 $oIE = _IECreate ("https://adwords.google.com/select/TrafficEstimatorSandbox", 0, 1, 0) _IELoadWait ($oIE) $oForm = _IEFormGetObjByName ($oIE, "TESandbox") $GridBodyHtml = _IEFormElementGetObjByName($oForm,"keywords") _IEFormElementSetValue ($GridBodyHtml, $keywords) $oSelect= _IEGetObjByName($oForm, "countryList") _IEFormElementOptionselect ($oSelect, "All Countries and Territories", 1, "byText") $oQuery = _IEFormElementGetObjByName ($oForm, "add") $oQuery.Click $oQuery = _IEFormElementGetObjByName ($oForm, "continue") $oQuery.Click _IELoadWait ($oIE) _IELinkClickByText ($oIE, "Download as .csv") Sleep(10) WinWaitActive("File") ControlFocus("File","","32770") Sleep(500) ControlClick("File", "" ,"[CLASS:Button;TEXT:&Save;INSTANCE:2]") WinWaitActive("Save As") Send("Estimated.csv") ControlClick("Save As", "","[CLASS:Button;TEXT:&Save;INSTANCE:2]") WinWaitActive("Download") ControlClick("Download", "","[CLASS:Button;TEXT:&Open;INSTANCE:2]") EndSelect WEnd Link to comment Share on other sites More sharing options...
Xand3r Posted September 9, 2007 Share Posted September 9, 2007 Hi How can i press return here ? (not littoraly with the keyboard ;~ $keywords = $keywords & $line & 'chr$(34) ' did u try Send("{ENTER}") ?? Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro 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