myspacee Posted June 3, 2009 Share Posted June 3, 2009 (edited) hello to all,need some info about HMTL frame and GUI.Know is possible to build script to 'navigate'.Try to understand how put google streeview iframe into a GUI to allow user choose location in easy way.Find some nice examples here http://books.google.com/help/maps/streetview/. Click on destination bring you directly streewview mode.Any idea to implement this feature in a GUI ?Thank you for any info,m. Edited July 14, 2009 by myspacee Link to comment Share on other sites More sharing options...
myspacee Posted June 3, 2009 Author Share Posted June 3, 2009 Find nice start here : http://www.autoitscript.com/forum/index.ph...roswer&st=0but on compile return an error:Script.au3 (14) : ==> Variable used without being declared.: $Gui = GUICreate("Alek's Web Browser",800,600,-1,-1,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Gui = GUICreate("Alek's Web Browser",800,600,-1,-1,BitOR(^ ERRORany other (simple) web broswer around ?m. Link to comment Share on other sites More sharing options...
oMBRa Posted June 3, 2009 Share Posted June 3, 2009 Maybe you have to include WindowsConstants?, put this at the top of your script: #include <WindowsConstants.au3> Link to comment Share on other sites More sharing options...
myspacee Posted June 3, 2009 Author Share Posted June 3, 2009 thank you for reply! Find another simple web broswer example and add google streetview link. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Example() ; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI ; ; See also: http://msdn.microsoft.com/workshop/browser...netexplorer.asp Func Example() Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward Local $GUI_Button_Home, $GUI_Button_Stop, $msg $oIE = ObjCreate("Shell.Explorer.2") ; Create a simple GUI for our output GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360) $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30) GUISetState() ;Show GUI $oIE.navigate("http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=monumental,+barcelona&sll=40.396764,-3.713379&sspn=14.981433,26.806641&ie=UTF8&z=17&layer=c&cbll=41.399132,2.181214&panoid=uYyB2cKbf4DEdnYgWwcflw&cbp=12,59.59078357976048,,0,6.475409836065572") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=monumental,+barcelona&sll=40.396764,-3.713379&sspn=14.981433,26.806641&ie=UTF8&z=17&layer=c&cbll=41.399132,2.181214&panoid=uYyB2cKbf4DEdnYgWwcflw&cbp=12,59.59078357976048,,0,6.475409836065572") Case $msg = $GUI_Button_Back $oIE.GoBack Case $msg = $GUI_Button_Forward $oIE.GoForward Case $msg = $GUI_Button_Stop $oIE.Stop EndSelect WEnd GUIDelete() EndFunc ;==>Example effect is nice. There is any way to click google 'fullscreen' button (top-right) ? m. Link to comment Share on other sites More sharing options...
oMBRa Posted June 3, 2009 Share Posted June 3, 2009 you could use _IEGetObjByName then _IEAction ($ButtonObject, 'click') Link to comment Share on other sites More sharing options...
myspacee Posted June 3, 2009 Author Share Posted June 3, 2009 (edited) Playing now and it's very funny. Find also the way to insert start point i want. In same time i'm building from USB keyboard a simple 'interface' for my friend cyclette. (he has some problem to walk but can do cyclette) This to map needed keyboard buttons and let him to cycle around cities in the world.... Now i'm trying to hide left google panel (info), and click to 'fullscreen' button. what you think, is funny, isn't it ? m. Edited June 3, 2009 by myspacee Link to comment Share on other sites More sharing options...
ReFran Posted June 3, 2009 Share Posted June 3, 2009 You may have a look on this:http://code.google.com/intl/de/apis/maps/d...emogallery.htmlbest regards, Reinhard Link to comment Share on other sites More sharing options...
myspacee Posted June 3, 2009 Author Share Posted June 3, 2009 ok add some modifications, but think i must switch to IE.au3 ff.au3 and add more controls (wait until load, press buttons, etc) Anyone want to modify post script ? : [wait until google cache] expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) global $click_X = 0, $click_Y = 0, $click_wait = 1000 Example() ; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI ; See also: http://msdn.microsoft.com/workshop/browser...netexplorer.asp Func Example() Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward Local $GUI_Button_Home, $GUI_Button_Stop, $msg $oIE = ObjCreate("Shell.Explorer.2") ; Create a simple GUI for our output GUICreate("Embedded Google StreetView", 640, 580, 0, 0, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $GUIActiveX = GUICtrlCreateObj ($oIE, 2, 2, 640, 500) $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 550, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 550, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 550, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Fullscreen", 330, 550, 100, 30) GUISetState() ;Show GUI $oIE.navigate("http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=duomo&sll=45.464134,9.189656&sspn=0.005042,0.009613&ie=UTF8&radius=0.23&rq=1&ll=45.463938,9.188583&spn=0,359.990387&z=17&layer=c&cbll=45.463767,9.188341&panoid=kSIfc4TPePi04oiU_jS6sg&cbp=12,67.43,,0,4.6") ToolTip("Please wait....",0,0) _click_here(380, 135, 6000) ToolTip("",0,0) ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=duomo&sll=45.464134,9.189656&sspn=0.005042,0.009613&ie=UTF8&radius=0.23&rq=1&ll=45.463938,9.188583&spn=0,359.990387&z=17&layer=c&cbll=45.463767,9.188341&panoid=kSIfc4TPePi04oiU_jS6sg&cbp=12,67.43,,0,4.6") Case $msg = $GUI_Button_Back $oIE.GoBack Case $msg = $GUI_Button_Forward $oIE.GoForward Case $msg = $GUI_Button_Stop ;~ $oIE.Stop _click_here(612, 158, 6000) EndSelect WEnd GUIDelete() EndFunc ;==>Example FUNC _click_here($click_X, $click_Y, $click_wait) MouseMove(0,0,0) MouseMove($click_X,$click_Y,$click_wait) sleep(6000) MouseClick("left") MouseMove(0,0,0) $click_X = 0 $click_Y = 0 $click_wait = 1000 EndFunc thank you, m. Link to comment Share on other sites More sharing options...
myspacee Posted July 14, 2009 Author Share Posted July 14, 2009 (edited) hello again,made some modifies to my script and do all solder job to an USB keyboard.Obtain a small box that i mount to my cyclette. Nothing to say, is fun!3x3 grid shows 9 locations, first 8 are user defined, last is randomized from given .iniUse arrows to make selection, and enter as OK.Post here last source and resource that need some improvments, but idea is all here Italy streetview show 'best' five location for my coutry, can you post here best location for yours country ?thank you for testing,m Edited July 14, 2009 by myspacee 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