JAFN Posted March 20, 2011 Share Posted March 20, 2011 Hello yet again, I have finished my initial script as I can think of nothing useful to add to it. So I'm on to my next learning experience. And I don't know where to begin researching it. What I want to do is create a simple two button window that swaps the two edit fields in Google translate running in chrome. I want to figure most of this out on my own but need a starting point. How do I get the ctrlID for one of the edit boxes of Google Translate? Thanks [size="2"]The second mouse gets the cheese[/size] Link to comment Share on other sites More sharing options...
JohnOne Posted March 20, 2011 Share Posted March 20, 2011 I fear they are not usable controls for autoit. What you see on a webpage is all one control to autoit.There are no UDFs for chrome as far as I know.OptionsUse IESee if the test in the feilds are in the page sourceAutomate mouse to click fields, select and copy data AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JAFN Posted March 20, 2011 Author Share Posted March 20, 2011 wow, I forgot how incredibly slow IE is. When I revisited Firefox I thought it was slow, but IE is glacial. Not really seeing anything I understand. I haven't done anything in site manipulation so I guess I will try that route. Don't even know the questions to ask on that one. So off to research. Thanks. [size="2"]The second mouse gets the cheese[/size] Link to comment Share on other sites More sharing options...
BitByteBit Posted March 21, 2011 Share Posted March 21, 2011 (edited) Mildly related. $Chrome = @UserProfileDir & '\AppData\Local\Google\Chrome\Application\Chrome.exe ' Func Translate($sString = '') If $sString = '' then ;$sString = ClipGet() Send('^c') $sString = StringReplace($sString, Chr(0x0D), ' ') EndIf Run($Chrome & '"http://translate.google.com/#auto|en|' & $sString & '"') EndFunc ;==>Translate Edited March 21, 2011 by BitByteBit Link to comment Share on other sites More sharing options...
alun009 Posted July 16, 2011 Share Posted July 16, 2011 Mildly related. $Chrome = @UserProfileDir & '\AppData\Local\Google\Chrome\Application\Chrome.exe ' Func Translate($sString = '') If $sString = '' then ;$sString = ClipGet() Send('^c') $sString = StringReplace($sString, Chr(0x0D), ' ') EndIf Run($Chrome & '"http://translate.google.com/#auto|en|' & $sString & '"') EndFunc ;==>Translate I am trying to do something similar to this, except I would like to invoke the "Listen" facility on Google Translate and (this is important) I would like to hear the source text. That is, I want to click the Listen button below the input box not the one below the translated text. Now, because the input text can vary in length the location of the button can move. I have no knowledge of html or java to speak of, so can you tell me what I would need to send to Chrome to click that button programmatically? I can't help but think this should be easy to do, but I'm stuck! Oh and tabbing down to it doesn't work, because you are sometimes offered a "Did you mean...?" option which interferes with the number of tabs that need to be sent :S Link to comment Share on other sites More sharing options...
Werty Posted July 17, 2011 Share Posted July 17, 2011 I am trying to do something similar to this, except I would like to invoke the "Listen" facility on Google Translate and (this is important) I would like to hear the source text. That is, I want to click the Listen button below the input box not the one below the translated text. Now, because the input text can vary in length the location of the button can move. I have no knowledge of html or java to speak of, so can you tell me what I would need to send to Chrome to click that button programmatically? I can't help but think this should be easy to do, but I'm stuck! Oh and tabbing down to it doesn't work, because you are sometimes offered a "Did you mean...?" option which interferes with the number of tabs that need to be sent :S You can do it this way... $gspeech = "Hello, time is now, " & @HOUR & ". " & @MIN & ", goodbye" speech() Func speech() Local $temp, $File $temp = StringReplace($gspeech, " ", "+") $File = StringRegExpReplace($gspeech, "([ .!])", "") If Not FileExists(@TempDir & "\" & $file & ".mp3") Then _ InetGet("http://translate.google.com/translate_tts?q=" & $temp, _ @TempDir & "\" & $file & ".mp3") SoundPlay(@TempDir & "\" & $file & ".mp3", 1) Return EndFunc Some guy's script + some other guy's script = my script! 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