My program has to first search for names in Column D that do not match up with column C. I got that search to work using arrays. It was slow and I could not figure out how to delete them so I just manually put coded the names that do not belong. I found their cell location but I do not know how to store that location and delete it.
This is what I have so far.
Local $NameToDelete1 = _Excel_RangeFind($OpenWorkbook, "Smith, Bill") _ArrayDisplay($NameToDelete1, "Excel UDF: _Excel_RangeFind Example 1", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") _Excel_RangeDelete($OpenWorkbook.ActiveSheet, $NameToDelete1, $xlShiftUp)
Please help, I wanted to have this program done yesterday but I did not see this problem until yesterday.
I'm trying to implement a Ctl-F popup box that looks something like the one that Notepad uses, but I'm not havine much luck. I intend to get it working, then beef up the popup's contents to add several checkboxes, buttons and radio boxes.
What my example code does is to use InputBox(), but that's not what I want.
Here is my test code:
#include <Array.au3> #include <GUIConstantsEx.au3> #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 Opt("GUICloseOnESC", 1) Opt("GUIOnEventMode", 1) Opt('MustDeclareVars', 1) OnAutoItExitRegister("ExitStageLeft") Opt("WinTitleMatchMode", -2) Global $hGUI _Main() Func _Main() $hGUI = GUICreate("Test ^F", 300, 200) setupSpecialKeysHandlers() GUISetOnEvent($GUI_EVENT_CLOSE, "Event_GUIClose") GUISetState() While (1) Sleep(157) WEnd EndFunc ;==>_Main Func handle_CTRL_F_key() Local $str $str = InputBox("Search", "Enter the string to search for:") ConsoleWrite("+++: $str ==>" & $str & "<==" & @CRLF) EndFunc ;==>handle_CTRL_F_key Func ExitStageLeft() Exit (99) EndFunc ;==>ExitStageLeft Func Event_GUIClose() Exit (1) EndFunc ;==>Event_GUIClose Func setupSpecialKeysHandlers() Local $ar, $parts, $key, $handler, $id Local $aAccelKeys ; Create a table of Special keys and their handlers $ar = StringSplit("", "") _ArrayAdd($ar, "^f - handle_CTRL_F_key ") ReDim $aAccelKeys[UBound($ar) - 1] ; Now, create $aAccelKeys array with the table data. ; For each entry, create a Dummy GUI and associate its ; ID with the special key. For $ndx = 1 To UBound($ar) - 1 $parts = StringSplit($ar[$ndx], "-", 2) $key = StringStripWS($parts, 8) $handler = StringStripWS($parts, 8) $id = GUICtrlCreateDummy() $aAccelKeys[$ndx - 1] = $key $aAccelKeys[$ndx - 1] = $id GUICtrlSetOnEvent($id, $handler) Next GUISetAccelerators($aAccelKeys) ; Setup the Special keys hooks EndFunc ;==>setupSpecialKeysHandlers
Howdy, I've gone through a lot of au3 forums, and I once had a working Imagesearch script that I got from here. However, and i'm just totally not sure how but my imagesearch scripts aren't working anymore.
I'm not new to au3 but i'm not the most experienced with it's syntax/commands.
Anyways, I've looked over the big threads involving imagesearch.
Does anyone have a working Imagesearch x64 for win10 that is currently working as of the date with the post.
Dll's and what not is fine, just when I tell the script to run, I want to be able to find the image on the screen!
Can't find a working copy so if anyone has one please send it my way lol.
I've taken all the imagesearch downloads and what not and have played with them but I can't get any of them working on my end, despite others saying they're working.
I'm a work on a background see and click bot project
I can complete it if your help me
(using imagesearch , gdi+ and fastfind)
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:
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 & @CRLF) ConsoleWrite("expires_in: " & $aRet & @CRLF) ConsoleWrite("refresh_token: " & $aRet & @CRLF) ConsoleWrite("token_type: " & $aRet & @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 & @CRLF) ConsoleWrite("expires_in: " & $aRet & @CRLF) ConsoleWrite("token_type: " & $aRet & @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!