5 posts in this topic
Not the most eloquent nor efficient, to be sure, but with the following functionality:
MULTI_BAR Features: ----------------------------------------------------------------
* Floating MULTIBAR Toolbar with four(4) Docking Positions
* Drag MULTI bar to Dock at any Edge position
* Drag Edge bar to screen center to Float as a MULTI bar
* FADING EDGE BARS for LEFT, TOP-LEFT, TOP-RIGHT, RIGHT Sides
* All 4 EDGE BARS and MULTI BAR can exist and execute at one time
* All Toolbars use common INI file format
* Any Toolbar can be displayed by any positional Service EXE
* All ToolBars have common Controls
Return to calling BAR [ORIGIN}
Manual Edit the INI file [INIEDIT]
Create and place a NEW Toolbar on a button [NEWBAR]
Search Icon Initiator - search for a Toolbar or a Button Function
Set AUTO mode for EDGE bar show/fade on cursor or click, [AUTOSW]
Set AUTO mode for FLOAT bar to close or stay open on button click [AUTOSW]
Rotate thru 3 button sizes, small, medium and large w/label [B-SIZE]
EXIT this bar [EXIT]
* User specifies Number of BUTTONS and Number of ROWS
* Change Dynamically Number of BUTTONS or ROWS
via NEWBAR Function Specifying SAME BARNAME with Changed BUTTONS & ROWS
* Three(3) Button sizes - User can change on demand
* Shrink to Fit - Will Auto reduce Button size on DOCKING if Bar too long
* Buttons can be any File OPEN function, web link, or Open another TOOLBAR_BAR
* ToolBars can be cascaded down(DRILL DOWN - Button points to another ToolBar) to additional Toolbars
with Return to previous Toolbar via Origin Function
* 2 BAR TYPES:
ACTION(Buttons do TOOLBAR, FILE or URL OPENS)
User drops a Link on Button
DROP(Buttons are Folder Targets)dropped files are sorted to destination
MOVE or COPY: FILE, FILE(s) or FOLDERS(DIRs) to Button target
Recycle Bin(a Shortcut) is supported as a DROP target for FILE, FILE(s) or FOLDERs
* Button Context functions
DELETE the current function - empty the button
EDIT the TOOLTIP for this Button
EDIT the LABEL displayed on Large Button
PLUCK this Button for move to new location on this bar -or-
ANY other Bar (in this TOOLBOX)
PLACE any PLUCKED Button, or PLACE any NEW TOOL_BAR
OPEN file location of Button file
UNZIP the attached to a folder which will be the folder for all toolbar definitions
and executables. THIS FOLDER IS YOUR TOOLBOX.
TOOLBOX\MULTIBAR\]README.doc or ]README.pdf provides detail on functions and implementing.
Appreciate all the SILENT help from the AUTOIT community for this and my many projects. Thanks to all menbers who have provided the best self help book on applied AutoIt.
Please advise on errors or suggestions. MULTIBAR was developed on Windows 10. Other targets or themes may present errors.For your personal use. Accept no responsibility for its functionality. Enjoy, olbitpicker
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!
It seems AutoIt for Chrome is no longer working. It's not in Google Store so not able to enable. I can download the crx and drag to chrome but I can't figure out any way to enable the extension.
I am trying to identify the window based on the window title and text.
The title will be the "erwin DM - filename"
It is working till date, but some operating systems our application is displaying window as "erwin DM - [filename]"
I tried "erwin DM - *filename*" But this regular expression is not working.
$sModelFile = "C:\Users\Administrator\Documents\My Models\eMovies.erwin" $wdModel = _WinWaitActivate1("erwin DM - "&FileNameOnly($sModelFile),"") Func _WinWaitActivate1($title,$text,$timeout=0);Will Return the window Handler Logging("Waiting for "&$title&":"&$text) $dHandle = WinWait($title,$text,$timeout) if not ($dHandle = 0) then If Not WinActive($title,$text) Then WinActivate($title,$text) return WinWaitActive($title,$text,$timeout) Else Logging("Timeout occured while waiting for the window...") Exit EndIf EndFunc Func FileNameOnly($sFilePath) Local $sDrive = "", $sDir = "", $sFileName = "", $sExtension = "" Local $aPathSplit = _PathSplit($sFilePath, $sDrive, $sDir, $sFileName, $sExtension) ;_ArrayDisplay($aPathSplit, "_PathSplit of " & @ScriptFullPath) return $sFileName EndFunc
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!