Jump to content

Search the Community

Showing results for tags 'google'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 25 results

  1. 1. Description. oAuth 2.0 is security system implemented by Google a few years ago. You are able to connect into your Google accounts and manage documents. In this UDF i show you how to pass first authorization process., this allow you to automate most of functions using API interface. 2. Requirements. Google account. oAuth.au3 Download 3. Possibilities ;============================================================================================================ ; Date: 2018-02-10, 14:21 ; ; Description: UDF for authorize your app with oAuth 2.0 Google. ; ; Function(s): ; oAuth2GetAuthorizationCode() -> Get Code for "grant". ; oAuth2GetAccessToken() -> Get "access_token" and "refresh_token" first time. ; oAuth2RefreshAccessToken() -> Get current "access_token" using "refresh_token". ; ; Author(s): Ascer ;============================================================================================================ 4. Enable your Google API. 4.1. Video Tutorial not mine! YouTube 4.2 Screenshots from authorization process (Polish language) Go to https://console.developers.google.com/apis/dashboard and accept current rules. Next create an new project Enter name of you new project and click Create Google will working now, please wait until finish. Next go to enable your API interface, we make if for Google Take "Gmail" in search input and after click in found result. Click Enable interface, Google will working now. Create your login credentials Select Windows Interface (combobox), User credentials (radio) and click button what is need bla bla Type name of a new client id for oAuth 2.0 and click Create a new Client ID. Next configure screen aplication, type some name and click Next. Google will working now. Last step on this website is download source with your credentials in *Json format. Now you received a file named client_id.json, it's how it look in Sublime Text: 5. Coding. Now we need to call a some function to get access code. #include <oAuth.au3> Local $sClientId = "167204758184-vpeues0uk6b0g4jrnv0ipq5fapoig2v8.apps.googleusercontent.com" Local $sRedirectUri = "http://localhost" oAuth2GetAuthorizationCode($sClientId, $sRedirectUri) Function will execute default browser for ask you to permission. Next Google ask you to permission for access to your personal details by application Autoit Now you can thing is something wrong but all is ok, you need to copy all after code= . It your access code. Let's now ask Google about our Access Token and Refresh Token #include <oAuth.au3> Local $sClientId = "167204758184-vpeues0uk6b0g4jrnv0ipq5fapoig2v8.apps.googleusercontent.com" Local $sClientSecret = "cWalvFr3WxiE6cjUkdmKEPo8" Local $sAuthorizationCode = "4/AAAPXJOZ-Tz0s6mrx7JbV6nthXSfcxaszFh_aH0azVqHkSHkfiwE8uamcabn4eMbEWg1eAuUw7AU0PQ0XeWUFRo#" Local $sRedirectUri = "http://localhost" Local $aRet = oAuth2GetAccessToken($sClientId, $sClientSecret, $sAuthorizationCode, $sRedirectUri) If Ubound($aRet) <> 4 then ConsoleWrite("+++ Something wrong with reading ResponseText." & @CRLF) Exit EndIf ConsoleWrite("Successfully received data from Google." & @CRLF) ConsoleWrite("access_token: " & $aRet[0] & @CRLF) ConsoleWrite("expires_in: " & $aRet[1] & @CRLF) ConsoleWrite("refresh_token: " & $aRet[2] & @CRLF) ConsoleWrite("token_type: " & $aRet[3] & @CRLF) Important! When you received error 400 and output says: Invalid grant it means that your previous generated access_code lost validity and you need to generate new calling previus code. When everything is fine you should received a 4 informations about your: access_token, expires_in, refresh_token and token_type. Access_Token time is a little short so you need to know fuction possible to refresh it (tell Google that he should generate a new Token for you) #include <oAuth.au3> Local $sRefreshToken = "1/ba8JpW7TjQH3-UI1BvPaXhSf-oTQ4BmZAbBfhcKgKfY" Local $sClientId = "167204758184-vpeues0uk6b0g4jrnv0ipq5fapoig2v8.apps.googleusercontent.com" Local $sClientSecret = "cWalvFr3WxiE6cjUkdmKEPo8" Local $sRedirectUri = "http://localhost" Local $aRet = oAuth2RefreshAccessToken($sRefreshToken, $sClientId, $sClientSecret) If Ubound($aRet) <> 3 then ConsoleWrite("+++ Something wrong with reading ResponseText." & @CRLF) Exit EndIf ConsoleWrite("Successfully received data from Google." & @CRLF) ConsoleWrite("access_token: " & $aRet[0] & @CRLF) ConsoleWrite("expires_in: " & $aRet[1] & @CRLF) ConsoleWrite("token_type: " & $aRet[2] & @CRLF) 6. Finish words If you followed all this above steps im sure that you received all informations required for coding your Google API (Gmail, Dropbox, YouTube, Calender etc. See next thread: [UDF] Gmail API - Email automation with AutoIt!
  2. I got some code from internet and i wanted to open a incongito browser and search my website but i cant seem to open google chrome in the incongito mode. whenever i click to run my code it opens a tab in normal google chrome. heres my code now: ShellExecute("chrome.exe", "http://www.erikzandstra.nl", "--incongito")
  3. Hi All, While creating a few excel spreadsheets using AutoIt, I came across something which to my limiting time to research the forums I don't anyone has mentioned. The color pallettes are reversed. Huge shock to me. I wanted to produce a red row but kept on getting blue. Seems like 0xFF0000 was red on the charts but when running the script, I got blue. I then played around with the colors, and after a few tries, I finally got Red. Reversed the FF0000 and the result is 0000FF. So for Excel compared to Html 0000FF (Red) - Excel 0000FF (Blue) - Html FFFF00 (Cyan) - Excel FFFF00(Yellow) - Html
  4. I am taking some idea from here: '?do=embed' frameborder='0' data-embedContent>> But what I am looking to accomplish is simple, I want to have an input box with a hidden input box below it. I will also have a defined list of items. When the text box has any value in it that does not directly equal an item in the pre defined list, the edit box should show. and populate suggested items based on whats being typed which I will do that part later, should be easy. I am stuck on a simple portion which should be easy and i'm not sure why I am having trouble with it. The way thr code below should work is, as long as there is a value in the Input box, the edit box will appear, if there is no value in the input box, the edit box should be hidden. here is what I have so far: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 615, 438, 192, 124) $Input1 = GUICtrlCreateInput("", 64, 72, 313, 21) $Edit1 = GUICtrlCreateEdit("", 64, 96, 313, 177) GUISetState(@SW_SHOW) GUICtrlSetState($Edit1, $GUI_HIDE) While 1 $words = GUICtrlRead($Input1) If $words NOT = "" then GUICtrlSetState($Edit1, $GUI_SHOW) else GUICtrlSetState($Edit1, $GUI_HIDE) endif $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func flopdrop() If BitAnd($Edit1,2) AND $words = "" Then GUICtrlSetState($Edit1, $GUI_HIDE) Else GUICtrlSetState($Edit1, $GUI_SHOW) EndIf endfunc the problem with this is a nasty flicker when you move the mouse or do anything else. I will get rid of the scroll bars too, but thats once I solve this flicker issue. I know its happening because I have the check being performed within the While statement, but I can't think of any other way to do it.. I even tried using a timer to only check once every few seconds, but that didn't seem to work either: If $words NOT = "" AND (@SEC = 00 OR 10 OR 20 OR 30 OR 40 OR 50) AND (@MSEC < 20)) Then ; Blah blah blah endIf Does anyone have any thoughts or has anyone been able to do this? Thanks in advance!!
  5. Perform a simple google search! The script below works fine until fill the google form! What I can't find is how to submit the form, tried a couple of ways and none of them worked. #include <IE.au3> $oIE = _IECreate ("www.google.com") $o_form = _IEFormGetObjByName ($oIE, "f") $o_login = _IEFormElementGetObjByName ($o_form, "q") $username = "80251369" _IEFormElementSetValue ($o_login, $username) $o_numer = _IEGetObjByName($o_form, "btnK") _IEAction ($o_numer, "click") The code runs without any problem. I don't know how to proceed! Thanks in advance!
  6. Hey I searched code on autoit forum and modify it according to my needs and try to translate text from Russian to English in return I'm getting error such as "Error 411 (Length Required)!!1" Both my autoit codes and error I got are given below, please help me to solve this issue, Thanks Autoit codes to translate text form Russian to English; #include <urlencode.au3> $File1 = @ScriptDir & "\russian_text.txt" $txt = FileRead($File1) ; Try to convert line breaks with .....so final URL looks simpler $txt = StringReplace($txt, @CRLF, '...........') $txt = StringReplace($txt, @LF, '.............') $txt = StringReplace($txt, @CR, '.............') FileWrite (@scriptdir & '\russian_text2.txt', $txt) $openfile = @ScriptDir & "\russian_text2.txt" $mytext = FileRead ($openfile) $encoding = urlencode ($mytext) FileWrite (@scriptdir & '\enooding.txt', $encoding) $from = "ru" $to = "en" $url = "https://translate.googleapis.com/translate_a/single?client=gtx" $url &= "&sl=" & $from & "&tl=" & $to & "&dt=t&q=" & $encoding $oHTTP = ObjCreate("Microsoft.XMLHTTP") $oHTTP.Open("POST", $url, False) $oHTTP.Send() $sData = $oHTTP.ResponseText $sData = StringRegExpReplace($sData, '.*?\["(.*?)(?<!\\)"[^\[]*', "$1" & @crlf) FileWrite (@scriptdir & '\errorcode.txt', $sData) Msgbox(0,"", $sData) In response of above codes, I'm getting below error; <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> <title>Error 411 (Length Required)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style> <a href=//www.google.com/><span id=logo aria-label=Google></span></a> <p><b>411.</b> <ins>That’s an error.</ins> <p>POST requests require a <code>Content-length</code> header. <ins>That’s all we know.</ins>
  7. Dear master, hello, I got the speech API from Google. But I could not find how to use. Could you help me with a simple example? "https://speech.googleapis.com/v1/speech:recognize?key=MyKey"
  8. Good morning, I am struggling to find a way to force a ControlClick on a particular hidden element within a Google Slides window. Using Au3Info doesn't work as the hidden text won't appear when attempting to gather the data. Using inspect element will show the class/title of the button, but using the class in the ControlClick function doesn't seem to do anything. Since this script is going to be running on multiple machines with different resolutions, MouseClick isn't a good option either. Can someone help me figure out how to click this full screen button? One more note - It says "Ctrl + Shift + F" for full screen, however sending that combo doesn't work - nor does actually using those keys on the keyboard. Possible conflict with AutoIT hotkeys? Here's some sample code / screenshots to help: ControlClick($Title, "", "[CLASS:punch-viewer-icon punch-viewer-full-screen goog-inline-block]")
  9. Hello, I'm trying to translate with google translator but not able to translate my text file from Russian to English and my output saved in text file is 0 instead of any translated text. I'm using a text file which contains 5 lines of Russian language and I want to translate it into English language and want to save it in other text file translated.txt but I'm not able to let it happen. Please help me how can I make this possible same code was working several months ago but not now especially don't know what's going wrong with my code of google translator. Here are my codes #RequireAdmin #include <IE.au3> #include <String.au3> #include <Array.au3> ProcessClose ( 'iexplore.exe') $File1 = @ScriptDir & "\kat01.txt" $txt = FileRead($File1) ;-------------------------------Translation Started------------------------- Local $tag="* # * # *" Local $oIE=_IECreate("https://translate.google.com/#ru/en", 1, 1) Local $oForm=_IEFormGetCollection($oIE,0) Local $oQuery=_IEGetObjByName($oForm,"text") _IEFormElementSetValue($oQuery, $tag & @CR & $txt & @CR & $tag) _IEFormSubmit($oForm) _IELoadWait($oIE) Local $oText=_IEGetObjById($oIE,"gt-res-data") $lines=StringSplit(_IEPropertyGet($oText,"innerText"),@CRLF,1) ;_IEQuit($oIE) _ArrayDelete($lines,_ArraySearch($lines,$tag,1,0,0,1,0) & "-" & $lines[0]) _ArrayDelete($lines,"1-" & _ArraySearch($lines,$tag,1,0,0,1,1)) $lines[0]=UBound($lines)-1 _ArrayDisplay($lines) Local $sFilePath = @ScriptDir & "\Translated.txt" _FileWriteFromArray($sFilePath, $lines, 1)
  10. Hey guys, I'm looking to implement an accurate voice recognition method in my program. I tried to understand the Microsoft SAPI API, read their online documentation and found it very confusing and unclear. (Like seriously, it's so bad and vague, but that's just my opinion). I have also tried using UTTER UDF, but could not get a grasp either, because you know, that's an extension UDF to Microsoft SAPI. Let's face it, the Google Speech Recognition is much more accurate than Microsoft SAPI (by far). Right now, I am determined to just use the Google Speech API. I have dug deep in regards to implementing the Google Speech API in AutoIT and I haven't found even one post about it. I suppose it's because the Google Speech API was only recently made available to the public. In case you don't know what I'm talking about, here's the link to google api. On that page, notice that there is language support for various languages such as Java, C#, and PHP. However, there's no support for AutoIT. So my question is; how can I go about implementing the Google Speech API into my AutoIT program? Is it even possible? Cheers guys!
  11. Hello, I've thousands of URLs to check them these are safe, malware infected or any other type of error, that's why I searched and found Google Safe browsing API with this we can send HTTP GET request so different code will return to make us clear is it our sent URL is safe or not. Please guide me how can i make this possible I know basics of Auotit but don't know how to use this API to fulfill above mentioned purpose. Your help will be much appreciated. Thanks Here is API URL; https://developers.google.com/safe-browsing/v3/lookup-guide
  12. Hello I'm trying to translate few text using below code, I found it working previously couple of months ago but Now these days it's not working at all and I'm getting below errors when I run the script and Array display at the end of text also not able to show any translated text instead of value 0 & 1; --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (gt-res-data) --> IE.au3 T3.0-2 Error from function _IEPropertyGet, $_IESTATUS_InvalidDataType Here is code, #include <IE.au3> #include <Array.au3> Local $tag="* # * # *" Local $oIE=_IECreate("https://translate.google.com/#auto/es") Local $oForm=_IEFormGetCollection($oIE,0) Local $oQuery=_IEGetObjByName($oForm,"text") _IEFormElementSetValue($oQuery, $tag & @CR & "Hello World" & @CR & "This is a test" & @CR & $tag) _IEFormSubmit($oForm) _IELoadWait($oIE) Local $oText=_IEGetObjById($oIE,"gt-res-data") $lines=StringSplit(_IEPropertyGet($oText,"innerText"),@CRLF,1) _IEQuit($oIE) _ArrayDelete($lines,_ArraySearch($lines,$tag,1,0,0,1,0) & "-" & $lines[0]) _ArrayDelete($lines,"1-" & _ArraySearch($lines,$tag,1,0,0,1,1)) $lines[0]=UBound($lines)-1 _ArrayDisplay($lines)
  13. I would like to download the first 5 images in a folder. THX. #include <INet.au3> #include <String.au3> #include <Array.au3> Global $sSource, $aImgURL, $sKeyWord $sKeyWord = "pug" $sSource = _INetGetSource("http://www.google.com/search?q=" & $sKeyWord & "&tbm=isch") $aImgURL = _StringBetween($sSource, 'src="', '"') For $x = 1 to UBound($aImgURL)-1 ConsoleWrite($aImgURL[$x]&@CRLF) Next
  14. Greetings! Func caretPlay () activateWindow () WinActivate ($workSpace) Local $myCaret = WinGetCaretPos () _ArrayDisplay ($myCaret) EndFunc Func activateWindow () $workSpace = WinGetHandle ("Login - Google Chrome") WinActivate ($workSpace) $dimensions = WinGetClientSize ($workSpace) $midPoint = $dimensions[1]/2 EndFunc Those are two little functions in a larger app I am building. When I run the "caretPlay" function it returns the same values of 0,0 regardless of where I position the caret. I did read on the function reference page for WinGetCaretPos that applications with Multiple Document Interfaces (MDIs) may not return accurate values. I tried all three options for the CaretCoordMode option with no change in results. Either I am doing something wrong or Google Chrome isn't meant to work with this function. Any advice as to which it is? Thanks!
  15. hello everyOne how can i get Google search suggestions while typing text and save it to txt file
  16. Hey, So I'm trying to create a translation script to translate text from english to spanish. It seems my program crashes if i have more than 1 child in the html.(i will highlight it via comment) I am also occasionally crashing after my 5 second, while busy, loop. Any help or insight would be greatly appreciated. $langFrom = "en" $langTo = "es" While 1 Sleep(250) Translate() Wend Func Translate() $ie = ObjCreate("InternetExplorer.Application") $ie.visible = True $toTrans = InputBox("Translate", "Enter text to translate [" & $langTo & "]") $ie.Navigate("https://translate.google.ca/?ie=UTF-8&hl=" & $langFrom & "&client=tw-ob#auto/" & $langTo & "/" & $toTrans) $result = "" While($ie.busy) Sleep(5000) WEnd ;occasionally crashing here (unsure cause) While($result = "") $result = $ie.document.getElementById("result_box").innerHTML sleep(250) WEnd $children = $ie.document.getElementById("result_box").childNodes ;suspect i did something wrong here $result = "" for $child in $children $result = $result & $child.innerHTML & " " ;crashing here Next ;cleanup $result = StringReplace($result," "," ") $result = StringReplace($result," ."," ") $ie.quit() MsgBox(0,"Translated", $result) EndFunc
  17. Hey, Im trying to fake google's mousedown event to get link but I dont have luck Here is my code #include <IE.au3> #include <MsgBoxConstants.au3> local $s_q = "autoit" local $i_resultnum = 100 local $lng = "tr" local $url = 'http://www.google.com/search?hl='&$lng&'&q=' & StringReplace(StringReplace($s_q, "+", "%2B"), " ", "+") & '&num=' & $i_resultnum ; $s_Source = _INetGetSource('http://www.google.com/search?hl='&$lng&'&q=' & StringReplace(StringReplace($s_q, "+", "%2B"), " ", "+") & '&num=' & $i_resultnum) $oIE = _IECreate($url, 0, 1) Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended Local $sTxt = $iNumLinks & " links found" & @CRLF & @CRLF For $oLink In $oLinks if $oLink.href == "http://www.autoitscript.com/" Then MsgBox(0, default, "sadga") _IEAction($oLink, "focus") _IEAction($oLink, "blur") _IEAction($oLink, "click") EndIf Next
  18. Hi Mates. Recently I was needing to download some images from google images. but I got tired,frustrated when I had to click in the imagen then click again to be able to download the image with its real size. so For That I write this small code. For downloading just simple go over the image in google image page., then press CTRL+MOUSE(just a little move is enowgh) that make a drag&drop so in that moment the code show a little window(5*5 LOL + transparency) so when realease the mouse (mouse up event) the code start new process(itself) to download the image. For well in Google Chrome Broswer. For Firefox almost always fails. Feactures. Allow choose a folder for download save.Allow Open the downloadfolder. #NoTrayIcon #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <TrayConstants.au3> #include <File.au3> #include <InetConstants.au3> Opt("GUIOnEventMode", 1) Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 3) Local $AppExist = 0 If $CmdLine[0] = 0 Then If _Singleton('Danyfirex', 1) = 0 Then MsgBox(64, "", "Aplication is Already Running") Exit EndIf EndIf If $CmdLine[0] = 2 Then ;Downloader to Folder Local $sSaveFolder = $CmdLine[2] ;URL Local $sURL = $CmdLine[1] ;Folder Download($sURL, $sSaveFolder) Exit EndIf If Not @Compiled Then MsgBox(64, "", "Must be Compile For Download") EndIf HotKeySet("{ESC}", "Terminate") Global $sFolderPath = @UserProfileDir & "\Pictures\" Local $hDLL = DllOpen("user32.dll") Local $hGUI, $hRichEdit = 0 $hGUI = GUICreate("Google Image Save", 5, 5, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) $hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 0, 0, 5, 5, -1) TrayCreateItem("Set Folder to Save") TrayItemSetOnEvent(-1, "SetFolder") TrayCreateItem("") TrayCreateItem("Open Folder") TrayItemSetOnEvent(-1, "OpenFolder") TrayCreateItem("") TrayCreateItem("About...") TrayItemSetOnEvent(-1, "About") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "Terminate") TraySetState($TRAY_ICONSTATE_SHOW) WinSetTrans($hGUI, '', 1) GUISetState(@SW_HIDE) Local $aMouse = 0 Local $bCheck = False Local $sDecode = "" Local $i = 0 While True If _IsPressed("11", $hDLL) And _IsPressed("01", $hDLL) Then GUISetState(@SW_SHOW) $aMouse = MouseGetPos() WinMove($hGUI, '', $aMouse[0] - 2, $aMouse[1] - 2) $bCheck = True EndIf If _GUICtrlRichEdit_GetText($hRichEdit) <> '' And $bCheck Then $sDecode = GetURL(_GUICtrlRichEdit_GetText($hRichEdit)) If $sDecode = "" Then $i += 1 TrayTip($i & " Oops :(", 'Not Valid URL', 5) Else $i += 1 TrayTip("[" & $i & "] Downloading :)", $sDecode, 5) If Not @Compiled Then MsgBox(64, "", "Must be Compile For Download") Else ShellExecute("GoogleImageSave.exe", $sDecode & " " & $sFolderPath) EndIf EndIf ConsoleWrite($sDecode & @CRLF) _GUICtrlRichEdit_SetText($hRichEdit, '') GUISetState(@SW_HIDE) $bCheck = False; EndIf Sleep(100) WEnd Func GetURL($BADURL) Local $GoodURL = StringRegExp($BADURL, 'imgurl=(.*)\.(jpg|png|gif|bmp)', 3) If @error Then Return '' Return $GoodURL[0] & '.' & $GoodURL[1] EndFunc ;==>GetURL Func Terminate() If MsgBox($MB_YESNO, "Exit", "¿Do You Want to Exit") = 6 Then Exit EndFunc ;==>Terminate Func SetFolder() $sFolderPath = FileSelectFolder('Select a Folder', "") If $sFolderPath <> "" Then $sFolderPath &= '\' If $sFolderPath = "" Then $sFolderPath = @UserProfileDir & "\Pictures\" EndFunc ;==>SetFolder Func OpenFolder() ShellExecute($sFolderPath) EndFunc ;==>OpenFolder Func About() MsgBox(0, "Autoit Forum :)", "Written by Danyfirex") EndFunc ;==>About Func _GetName($psFilename) Local $szDrive, $szDir, $szFName, $szExt _PathSplit($psFilename, $szDrive, $szDir, $szFName, $szExt) Return $szFName & $szExt EndFunc ;==>_GetName Func Download($Url, $sSaveFolder) Local $sImageName = _GetName($Url) InetGet($Url, $sSaveFolder & $sImageName, $INET_FORCERELOAD) TraySetState($TRAY_ICONSTATE_SHOW) TrayTip("Downloaded :)", "", 0) TrayTip("Downloaded :)", $Url, 5) Sleep(5000) EndFunc ;==>Download Saludos
  19. I am trying to write a macro to auto-tag images in my library. I am looking for a way to search google images, but NOT trying to get images - I instead want to search an image and get possible words for it. Things I've tried: I've searched the forums, but almost every hit was searching a phrase to get images - I want to do the opposite. I found two threads on it, One had no answer, and the other used the winhttp udf - which I can never get to work properly :/ I could try using IE functions, but it's messy and there's no way to do it completely in the background, which is much preferred :/ Does anyone have any suggestions? Or should I suck it up and use IE?
  20. Hello. I am working in an chatbot script, which has a GUI and can interact by words. I need to know how can I make the bot extract answers from Google or Wikipedia (if possible) and output them into an edit box. For example: When I type "what is Autoit" the bot should return: "AutoIt /ɔːtoʊ ɪt/ is a freeware automation language for Microsoft Windows." Any ideas? Thanks in advance.
  21. Hi Forum, I am just a beginner in AUTOIT, Just wanted to know, Is it possible to download a folder from my Google Drive automatically using AUTOIT, I googled to see some logic or guide to complete my task, but haven't succeded, Please guide me Thanks in Advance Sathish V.
  22. I can open an Internet Explorer Window without a toolbar with this: #include <IE.au3> $ie = _IECreate('www.example.com', 0, 0, 0) _IEPropertySet($ie, "toolbar", False) $IE.Visible = 1 I can open a Google Chrome Window with a toolbar with this: ShellExecute("chrome.exe", "www.example.com","","") The question is, how can I create a Google Chrome Window without a toolbar?
  23. I created this little script: HotKeySet("!g", "searchgoogle") While 1 Sleep(10000) WEnd Func searchgoogle() Sleep(500) Send( "^c" ) Sleep(500) $ClipB2 = ClipGet() $url = "http://www.google.com/search?q=" & $ClipB2 Sleep(300) MsgBox(0,"",$url) EndFunc I just select a word and invoke the hotkey. More than an hour I try to change the Sleep values but something still does not work: When I invoke the 1st time the hotkey, almost always it returns the correct url, but when I reuse the hotkey a few times it doesn't copy any more and the url is constructed with previous clipboard value. Does anyone know what is wrong in my script?
  24. If you can tell I have been trying to interact with some google divs that have roles like buttons but so far my trys have yeilded no results. Here is what I have done... $create = _IEGetObjByClass($googledoc, "goog-inline-block jfk-button jfk-button-primary goog-toolbar-item-new") _IEAction($create, "focus") $create.fireEvent("onmousedown") Sleep(500) $create.fireEvent("onmouseup") _IEAction($create, "click") IS there something I am missing? Please any comments are welcome.
  25. Hellow, Ok, I am trying to hide google chrome or chromium window, but i cant do it ...... the code above is what I did help to correct those codes to hide the chrome gui ;created by gian while 1 WinSetState("[CLASS:Chrome]", "", @SW_HIDE) WinSetState("[CLASS:Chromium]", "", @SW_HIDE) sleep(900) ShellExecute("C:\Program Files\chrome-win32\chrome.exe " , " http://...", "", "", @SW_HIDE) ShellExecute("C:\Program Files\chrome-win32\chrome.exe " , " http:/...", "", "", @SW_HIDE) ShellExecute("C:\Program Files\chrome-win32\chrome.exe " , " http://...", "", "", @SW_HIDE) ShellExecute("C:\Program Files\chrome-win32\chrome.exe " , " http://...", "", "", @SW_HIDE) ShellExecute("C:\Program Files\chrome-win32\chrome.exe " , " http://...", "", "", @SW_HIDE) ShellExecute("C:\Program Files\chrome-win32\chrome.exe " , " http://...", "", "", @SW_HIDE) WinSetState("[CLASS:Chrome]", "", @SW_HIDE) WinSetState("[CLASS:Chromium]", "", @SW_HIDE) sleep(10000) ProcessClose("chrome.exe") wend
×
×
  • Create New...