Jump to content
seangriffin

Chrome UDF

Recommended Posts

joboy2k

You don't need to change the file extension to zip. Download WinRAR and open the crx straight with that. i did this today so it definitely works. Then once it has been extracted follow the previous post from number 4.

Share this post


Link to post
Share on other sites
Chamlien

It's nice, help me a lot! This chrome udf can be used to write HTML as well as you can.  I recommend the author to post the  Chrome.crx  to Google App Store, cause the Google Browser will disable the crx for non-official.

Share this post


Link to post
Share on other sites
Schlauewurst

So i just want to open "https://www.youtube.com/my_live_events" and create a new event.
my code so far..

It didnt click on the Button "new Lifestream".

Any Solutions?

Quote

#Include <Array.au3>
#Include <Chrome.au3>


_ChromeStartup("https://www.youtube.com/my_live_events")

_ChromeDocWaitForReadyStateCompleted(5)
_ChromeInputClickByName("new-events-btn")

 

Share this post


Link to post
Share on other sites
water

I haven't worked with the Chrome UDF myself but I see that your code doesn't have any error checking.
Make sure, that none of the _Chrome* functions returns an error before calling the next one.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
boy233

Is there no Chrome UDF in the same pattern as Internet Explore?
Could not use the existing, I managed to only function to open the Browser! :(

Share this post


Link to post
Share on other sites
water

Why do you think the Chrome UDF should work the same way as the IE UDF does?
This are two different programs coded by different companies.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
boy233

I'm trying to say that UDF Chrome does not work 100%!
Is there any similar I can use?

Share this post


Link to post
Share on other sites
Jos
4 minutes ago, boy233 said:

I'm trying to say that UDF Chrome does not work 100%!

That must be because your line 15 is the wrong syntax! ;)

Seriously: Not sure what kind of answer you did expect but what about explaining what you are trying to do, show your code and tell us what isn't working?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
boy233
24 minutes ago, Jos said:

That must be because your line 15 is the wrong syntax! ;)

Seriously: Not sure what kind of answer you did expect but what about explaining what you are trying to do, show your code and tell us what isn't working?

Jos

That's not the problem!

_ChromeShutdown()
_ChromeStartup("http://www.google.com")
_ChromeDocWaitForExistenceByTitle("Google", 10)
_ChromeObjSetValueByName("f", "Auto IT")


Does not display error and does not work!

Share this post


Link to post
Share on other sites
Jos

So have you followed the whole process described in the initial post?
If so, post a simple test script that you test with and isn't working.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
boy233
1 hour ago, Jos said:

So have you followed the whole process described in the initial post?
If so, post a simple test script that you test with and isn't working.

Jos

 Follow....

#include <Chrome.au3>

;~ _ChromeShutdown()
_ChromeStartup("http://www.google.com")
_ChromeDocWaitForExistenceByTitle("Google", 10)
_ChromeObjSetValueByName("f", "Auto IT")

Does not work! What am I doing wrong?

Share this post


Link to post
Share on other sites
n3wbie
On 7/4/2017 at 8:24 PM, boy233 said:

I'm trying to say that UDF Chrome does not work 100%!
Is there any similar I can use?

I Was working on chromedriver.exe made a new udf 

you can try and let me know errors will try to solve it

link to udf goes here

 

Share this post


Link to post
Share on other sites
DeltaRocked

Greetings Sean !!!

1: Great UDF :) ( Chrome Version 49.0.2623.112 m, OS: W2k3 ) Beyond this version Chrome wouldn't be updated due to W2k3.

Now for the Core Issue:
 

_ChromeEval("document.getElementsByClassName('input-search')")
Output : {"text":"object"}

It seems the extension will have to be modified. Any other ideas ?

Regards

DR

Share this post


Link to post
Share on other sites
Bhooshan

Hello there, 

I have installed everything correctly while installing I faced a problem that Chrome use to disable the plugin automatically because it was not downloaded from chrome store. I solved that issue. Now, whatever script I write or the above examples "Chrome_example.au3" are not working. It just opens the chrome window and reaches to the URL. No other actions are performed. Can anyone tell me why is this so...? 

Share this post


Link to post
Share on other sites
BigKev

How do I get the AutoIt Chrome Extension to enable itself?  By default, Chrome disables anything not downloaded from the Store.  As soon as I click on the "Allow access to file URL's" checkbox it disables itself and says it's not from the Chrome Web Store.

Edited by BigKev

Share this post


Link to post
Share on other sites
dman1234
On 8/1/2017 at 2:01 AM, DeltaRocked said:

Greetings Sean !!!

1: Great UDF :) ( Chrome Version 49.0.2623.112 m, OS: W2k3 ) Beyond this version Chrome wouldn't be updated due to W2k3.

Now for the Core Issue:
 

_ChromeEval("document.getElementsByClassName('input-search')")
Output : {"text":"object"}

It seems the extension will have to be modified. Any other ideas ?

Regards

DR

Not sure what you are trying to actually do, but it is returning what I would expect as this is what javascript would give you in this instance.

Share this post


Link to post
Share on other sites
dman1234
On 12/8/2017 at 5:40 AM, billyzhao said:

How can i get page source of a url ?

You basically need to learn javascript, but something like this I think is what you need  

$returnval = _ChromeEval("document.documentElement.innerHTML", 5)

 

Share this post


Link to post
Share on other sites
dman1234

Hi all, I am not sure of something and I am a little new to AutoIT3 so I don't know if this is an AutoIT thing or something changed with Chrome.

All of the samples will run code similar to  
 

_ChromeDocWaitForExistenceByTitle("Google", 10)

When running and coding things I noticed the code was all taking 10 second every time, so after playing around I realized that I need to code it like this for it to work properly

_ChromeDocWaitForExistenceByTitle("{""text"":""Google""}", 10)

This is due to how the data is returned.  So is this a bug or a feature?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • kcvinu
      By kcvinu
      Hi all,
      I am playing with _GUICtrlButton_Create function. How can i change this button's (or the entire form's) font ?. The in-built GUICtrlSetFont function is not working even when i convert the control handle to control ID with _WinAPI_GetDlgCtrlID ( ) function.  Do i need to use CreateFont api finction and send WM_SETFONT message ? Or is there any other easy and safe ways to do this ?. Thanks in advance.
      Note : This window is created by CreateWindowEx function, not by GUICreate function. 
    • rudi
      By rudi
      Hello,
      usually I do Win automations, so I have no skills at all to handle HTML forms :-/
      The script to catch and syntax check  the required information from Excel is done.
      Now I'd like to automate the upload using this form, too:
       
      http://flashcardsdeluxe.com/flashcards/Upload.aspx
      What browser is easiest to do so? (IE, Chrome, FF) The Values $DeckCode, $DeckName, $DeckDefinition shall go to their HTML form fields finally "click" the button "upload flashcards" <table width="70%" class="cssCenter" border="0"> <tr> <td style="width: 1%">Deck&nbsp;Code</td> <td style="width: 100%"><input name="ctlDeckCode" type="text" id="ctlDeckCode" style="width:50%;" /> (no spaces allowed)</td> <td></td> </tr> <tr> <td style="width: 1%">Deck&nbsp;Name</td> <td style="width: 100%"><input name="ctlDeckName" type="text" id="ctlDeckName" style="width:50%;" /> (optional)</td> <td style="width: 1%" align="right"><input type="submit" name="ctlUpload" value="Upload Flashcards" id="ctlUpload" /></td> </tr> <tr> <td valign="top" style="padding-top: 5px" >Flashcard&nbsp;Text</td> <td colspan="2"><textarea name="ctlFlashcardText" rows="2" cols="20" id="ctlFlashcardText" style="height:280px;width:100%;"></textarea></td> </tr> </table> If someone kindly could jump in showing how to address just one of the input fields and how to "click" the "upload flashcards" button, I should be able to do the rest myself.
      TIA, Rudi.

    • TheWizEd
      By TheWizEd
      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.
    • zxc3
      By zxc3
      Are there any examples of a script for Сhrome that allows you to check whether the information in the browser window has changed with a certain periodicity and signal this for 32-bit Windows.
    • okolaris
      By okolaris
      Hey everyone,
      I thought I might share my little Language UDF plus the more powerful SciTE Tool to ship Strings from SciTE into the xml file. While I haven't had the time to fully adapt the small UDF to one of the big XML-UDFs the so called "Language Transmitter" that basically writes the XML file for you runs mostly on "XML DOM wrapper (COM)" by eltorro. The Transmitter should work with other XML-Language-UDFs depending on their encoding.
       
      First let's start with the UDF, there are two functions of interest: _LangInit($sFilePath) and s($sString) As you will have guessed, _LangInit($sFilePath) is called once to initialize the UDF and s($sString) is used to receive the string to your key. Plain and simple.
      Now to the actual "new" part, the Language Transmitter. It basically allows you to transfer a selected String from SciTE into a xml file. While doing so it will scan for AutoIt variables, macros etc. and parse the string to fit StringFormat(). It then saves the formatted string in the xml file and returns the formatted call into SciTE. If the selected string is already defined it will directly parse the key into SciTE. To change the default output file, you can either edit the ini-file in the @ScriptDir of the LanguageTransmitter.exe or press Alt+A on empty space again and keep clicking cancel/no until the Transmitter let's you select the current output file. Standard output is strings.xml in the current opened AutoIt Script.
      Example:
      ; given the line: MsgBox(16, 'Error', 'Error message') ; select 'Error' run the Transmitter follow the instructions, repeat with 'Error message'. Outcome (e.g.): MsgBox(16, s('Error'), s('Error_msg')) ; Variables and Macro example: $sString = "Value: " & $iValue & @CRLF & 'Another value: '& $iValue2 ; Select the full string including all AutoIt variables and macros etc. in SciTE and press Alt+A (default) to run the LanguageTransmitter ; follow the instructions and it will then paste a formatted string like that into SciTE: $sVar = StringFormat(s('Key'), $iValue, $iValue2) ; the correlating xml entry should look like that: ; <string name="Key">Value: %s\r\nAnother value: %s</string> ; as you can see @CRLF has been replaced with \r\n as well. If you are working on a project and want to directly add a string to the xml file just start the Language Transmitter without selecting any text, enter your string and a key.
      SetUp/Installation
      Examples
      Since xml files are required all examples can be found in the zip file. There are two examples, one includes a language selection interface.
      Language File Checker
      I added a script to check whether the xml file contains all required strings or even unnecessary strings.
       
      Hope you like my little helper!
       
      UDF - LanguageSupport.zip
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.