Jump to content
seangriffin

Chrome UDF

Recommended Posts

JohnOne

Something is not right here.
Since I re-installed, device manager network tab says I'm uploading at my full capacity.
I don't know what I'm uploading or what is uploading it, I have nothing running which should do that.

EDIT:

For the record.

This issue was with my AV not recognizing new files and uploading them for inspection.

Nothing to do with this UDF or its components.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
lbordier

Hi Folks, 

I have kind of an issue here:

I've strictly followed the instruction for the installation. But I face kind of a weird situation when I run the script #1.

OS: W7 64-bit.

AutoIt: V3.3.8.1

When I launch the script ( chrome_example.au3 ) ==> Nothing happens or appears...

But When I use the AutoIt debugger tool, it works like a charm. 

Any thought would tremendously appreciated. 

Cheer

L

Share this post


Link to post
Share on other sites
seangriffin

Something is not right here.

Since I re-installed, device manager network tab says I'm uploading at my full capacity.

I don't know what I'm uploading or what is uploading it, I have nothing running which should do that.

 

Hmmm, odd that something is uploading.  There certainly isn't anything in this solution that uploads or downloads.

Here's a description of exactly what the 3 components to the UDF do (in case anyone was wondering):

  1. The Chrome UDF - is an AutoIT UDF that sends requests to the Native Messaging Host (below), via a text file, and waits for a response from the Native Messaging Host (below), via a text file.
  2. The Native Messaging Host - is a Python application that listens for requests from the AutoIT UDF (above), via a text file, and forwards those requests onto the Chrome Extension (below).  It also listens for output from the Chrome Extension (below) and forwards that back to the AutoIT UDF (above), via a text file.
  3. The Chrome Extension - is a collection of Javascript files that wait for a request from the Native Message Host (above), and then injects that request (Javascript) into the page within Chrome to interact with the elements in that page.  The response from this request is then sent back to the Native Message Host (above).

All these components communicate to each other through a combination of text files and stdio.  There are no HTTP requests involved, and as such I wouldn't expect any uploads or downloads to occur through the UDF.

Try Example #2 because it works "offline".  It should work without an internet connection, and that will eliminate any uploading or downloading going on.

Edited by seangriffin

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia

Share this post


Link to post
Share on other sites
JohnOne

I noticed now that native messaging host is no longer starting with chrome when the example is started.

I've tried a number of things, with chrome already running and without.

If I manually start messaging host, it ends when example is ran.

Is the value in registry supposed to be an escaped path...

"C:UsersJOHNAppDataRoamingAutoIt3Chrome Native Messaging Hostmanifest.json"?

I don't see any other paths in registry where the backslashes are escaped.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
seangriffin

I noticed now that native messaging host is no longer starting with chrome when the example is started.

I've tried a number of things, with chrome already running and without.

If I manually start messaging host, it ends when example is ran.

Is the value in registry supposed to be an escaped path...

"C:UsersJOHNAppDataRoamingAutoIt3Chrome Native Messaging Hostmanifest.json"?

I don't see any other paths in registry where the backslashes are escaped.

 

Yes, it might seem odd that the registry value is escaped, though it must be this way or the native messaging host won't start.  That's my experience.

Here's more information to help in troubleshooting.  Thanks for spending the time on this.  Might help others too.

To confirm the native messaging host is starting with Chrome as expected, I would first try starting Chrome on it's own, without loading any pages or using the UDF.  Then go to Windows Task Manager and you should see the a process named autoit-chrome-native-messaging-host.exe.   This will confirm that the registry value above is set correctly, as this points Chrome to the location of the Native Messaging Host such that it can start it when Chrome starts..  

If autoit-chrome-native-messaging-host.exe isn't running when you start Chrome then get the value of the registry key above, and in Windows Explorer go to this location (i.e. C:UsersJOHNAppDataRoamingAutoIt3Chrome Native Messaging Host).  Check the file  autoit-chrome-native-messaging-host.exe and manifest.json exist.  Open manifest.json in Notepad.  Make sure "path" is set to the full path of autoit-chrome-native-messaging-host.exe, and the path includes double-backslashes.  Also make sure the value for "allowed_origins"opmlbgppkkdeleedejakphgmgiigjjga/) matches the value in the ID field of the Chrome Extension.  Check this by opening Chrome and go to the Tools -> Extensions menu item.  In the Extensions page make sure Developer mode is ticked, and then locate the ID field for the AutoIT for Chrome extension.  This value should match the value for "allowed_origins" in the manifest.json file.

If the settings above are correct, then every time you start Chrome, irrespective of whether you are using AutoIT or not, you should also have the autoit-chrome-native-messaging-host.exe process running.

The next step is to confirm if the AutoIT UDF is talking properly to the Native Messaging Host (autoit-chrome-native-messaging-host.exe).  Run an AutoIT script that uses the UDF (Chrome.au3), like one of the Examples from the top post.  When a function in the UDF is called, it should create a file named input.txt in the same location as autoit-chrome-native-messaging-host.exe (i.e. C:UsersJOHNAppDataRoamingAutoIt3Chrome Native Messaging Hostinput.txt).  This file should contain some Javascript relating to the UDF function called (i.e. document.getElementsByName('ExampleForm')[0].method;).  If Chrome and the Native Messaging Host (autoit-chrome-native-messaging-host.exe) are running, then the Native Messaging Host should immediately detect this file (i.e. C:UsersJOHNAppDataRoamingAutoIt3Chrome Native Messaging Hostinput.txt) whenever it's created, read it's contents and remove the file.  The Native Messaging Host is so fast at doing this that you may not even see the existence of input.txt.  Try running a UDF function without Chrome running and make sure input.txt is created. 

If input.txt is successfully created, then autoit-chrome-native-messaging-host.exe should automatically consume it (as described above), pass the Javascript onto the Chrome Extension, which uses it in Chrome and sends a response back to autoit-chrome-native-messaging-host.exe which should in turn create an output.txt file in the same location as input.txt.  The Chrome UDF then detects this file, reads in the response, and the UDF function completes.


Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia

Share this post


Link to post
Share on other sites
lbordier

Hi Folks, 

I have kind of an issue here:

I've strictly followed the instruction for the installation. But I face kind of a weird situation when I run the script #1.

OS: W7 64-bit.

AutoIt: V3.3.8.1

When I launch the script ( chrome_example.au3 ) ==> Nothing happens or appears...

But When I use the AutoIt debugger tool, it works like a charm. 

Any thought would tremendously appreciated. 

Cheer

L

 

Mhmhmmh here is the deal:

The library use "@ProgramFilesDir" which return the directory for 64 bits. But Chrome is still 32 bits. 

So I used this code:

$ProgramFilesDir = EnvGet('ProgramFiles(x86)') ; for 64bit Win it will return a valid path.
if not $ProgramFilesDir then $ProgramFilesDir = @ProgramFilesDir ; for 32bit Win this will "repair" the broken return from above.
 
or
 
Func _ProgramFilesDir()
    Local $ProgramFileDir
    Switch @OSArch
        Case "X32"
            $ProgramFileDir = "Program Files"
        Case "X64"
            $ProgramFileDir = "Program Files (x86)"
    EndSwitch
    Return @HomeDrive & "" & $ProgramFileDir
EndFunc   ;==>_ProgramFilesDirh

 

Cheers

L

Share this post


Link to post
Share on other sites
chachew

When i look at the documentation inside the UDF the timeout periods state that the timeouts are for 'X' number of minutes, when you look at the code as well as the console output, the timeout is in 'seconds'

No big deal, just noticed it was documented wrong.

Share this post


Link to post
Share on other sites
seangriffin

V0.5 of the UDF is now released.

Python has now been replaced with AutoIT as the Native Messaging Host.  This brings significant performance improvements over the previous Python solution, and also allows easier maintenance in the future with a complete AutoIT solution.

If you already have a previous version of the UDF installated, then you must repeat Steps 1, 2 and 3 from the INSTALLATION section of the top post.

  • Like 1

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia

Share this post


Link to post
Share on other sites
levshkatov

Hi, everybody! 

Great topic, but I didn't find a function that allows me to click on a button with necessary text on it. 

Could you help me with this problem?

Edited by levshkatov

Share this post


Link to post
Share on other sites
NizonRox

Is there a way to find a surtend Word and then execute a command? that would be great :)

Share this post


Link to post
Share on other sites
jdelaney

I don't suppose there would be a way to use objects, since this is all read in from a text file...such as, having multiple windows/documents open, and differentiating between them.  Or looking for an element under an object?

Small fix, the _ChromeDocWaitForExistenceByTitle is not properly comparing the return string, so it always timesout.

Expected return string is like:

{"text":"HTML Form Example"}

if StringCompare($title_from_chrome, '{"text":"' & $title & '"}') = 0 Then

this fixes it ( inside _ChromeDocWaitForExistenceByTitle)

Func _ChromeDocWaitForExistenceByTitle($title, $timeout = 5)

    dim $error = 2, $response = "", $begin, $title_from_chrome

    $begin = TimerInit()

    While TimerDiff($begin) < ($timeout * 1000)

        $title_from_chrome = _ChromeDocGetTitle()
        if StringCompare($title_from_chrome, '{"text":"' & $title & '"}') = 0 Then
            $error = 0
            ExitLoop
        EndIf

        sleep(100)
    WEnd

    SetError($error)

    Return $response
EndFunc
Edited by jdelaney
  • Like 1

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
itotua

Would this work on a locked Windows like the ControlSend ControlClick commands?

Share this post


Link to post
Share on other sites
Azzurr0

Wow compliments! thank you for the work you are sharing with us!

I'm working on the function _IELinkClickByText 
someone has already done? I'm having trouble!

Share this post


Link to post
Share on other sites
nullschritt

Seems really nice, though I would recommend not using file to communicate between scripts, this would speed up the process considerably, as it takes much longer to read/write data to the hard disk than it does to transfer it in RAM. 

Share this post


Link to post
Share on other sites
Jordanoise

_IELinkClickByText chrome alternative ?

Too long for a response to this question. Interested in a simple click on the link in chrome. Who knows the answer?

Edited by Jordanoise

Share this post


Link to post
Share on other sites
McCookieM

I think I may have stumbled on the cause of the problem that some people are coming across where this UDF does not appear to work.

I too had issues with Chrome opening fine, shutting down fine, but no communication could be made with the messaging host.  Everything always timed out.

My software info:

Win 7 x64

Chome 33

AutoIt 3.3.6

Firstly I discovered that no registry entry had been made for me during installation. I did have a SoftwareGoogleChrome entry under HKEY_CURRENT_USER but no NativeMessagingHosts key.

As per a previous post, I decided to put the keys where specified so had to create a SoftwareGoogleChromeNativeMessagingHosts key tree under HKEY_LOCAL_MACHINE. Still having problems I put the same registry entries under HKEY_CURRENT_USER but still no go (after discovering the actual problem later I think either location should be fine)

After finding the great post detailing a full breakdown of the UDF and how it all works, I went though step by step and discovered that the first time Chrome is run, the autoit-chrome-native-messaging-host process was running.

Now, here comes the root problem (I think). If you run the command _ChromeShutdown() from AutoIt at the beginning of your script (which closes Chrome windows and kills the autoit-chrome-native-messaging-host process), then your next _ChromeStartup command will NOT re-open the messaging process. I think it's down to having multiple chrome processes still running (non-windowed like other plugins) so Chrome doesn't do a fresh startup and doesn't restart it's messaging hosts.

So, short answer just now is to close your chrome windows (and chrome processes) manually and only use _ChromeShutdown() at END of script.

Now the UDF works fine. Although you've still got to end all chrome processes manually before you run your script again.

Over to the developer. Not sure it's the best way, but you could end all chrome.exe processes in the _Shutdown function rather than closing any open Chrome windows. I'm sure you'll find a better way.

Hope this helps some of you.

  • Like 1

Share this post


Link to post
Share on other sites
ZiFFeL

Hello, first of all thankyou!!

I have try to use this on local files, but even in your second example is not working for me, online or works fine, but on local doesn´t change any value (inputs (textfield/checkboxes/radio...))

Any idea?

Regards.

Share this post


Link to post
Share on other sites
bootybay

I'm not directly using the chrome UDF but i took a lot of tricks from it that don't work anymore!

For example the basic "[REGEXPTITLE:.*- Google Chrome]" was glorious to get a quick window handle.

But for some reason there is no "- Google Chrome" at the end of tabs anymore (or only rarely instead of on everything)

Do you know how to reenable it?

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

    • ScriptJunky
      By ScriptJunky
      I noticed a lack of a constants file for _WinAPI_GetSystemMetrics() so I made this for anyone who wants to add it to their library. Enjoy!  (file attached below)
      #include-once ; #INDEX# ======================================================================================================================= ; Title .........: WinAPI GetSystemMetrics Constants ; AutoIt Version : 3.3.14.5 ; Language ......: English ; Description ...: Constants for _WinAPI_GetSystemMetrics(). ; Author(s) .....: ScriptJunky ; =============================================================================================================================== ; #CONSTANTS# =================================================================================================================== ; _WinAPI_GetSystemMetrics() Global Const $ARRANGE = 56 Global Const $CLEANBOOT = 67 Global Const $CMONITORS = 80 Global Const $CMOUSEBUTTONS = 43 Global Const $CONVERTIBLESLATEMODE = 0x2003 Global Const $CXBORDER = 5 Global Const $CXCURSOR = 13 Global Const $CXDLGFRAME = 7 Global Const $CXDOUBLECLK = 36 Global Const $CXDRAG = 68 Global Const $CXEDGE = 45 Global Const $CXFIXEDFRAME = 7 Global Const $CXFOCUSBORDER = 83 Global Const $CXFRAME = 32 Global Const $CXFULLSCREEN = 16 Global Const $CXHSCROLL = 21 Global Const $CXHTHUMB = 10 Global Const $CXICON = 11 Global Const $CXICONSPACING = 38 Global Const $CXMAXIMIZED = 61 Global Const $CXMAXTRACK = 59 Global Const $CXMENUCHECK = 71 Global Const $CXMENUSIZE = 54 Global Const $CXMIN = 28 Global Const $CXMINIMIZED = 57 Global Const $CXMINSPACING = 47 Global Const $CXMINTRACK = 34 Global Const $CXPADDEDBORDER = 92 Global Const $CXSCREEN = 0 Global Const $CXSIZE = 30 Global Const $CXSIZEFRAME = 32 Global Const $CXSMICON = 49 Global Const $CXSMSIZE = 52 Global Const $CXVIRTUALSCREEN = 78 Global Const $CXVSCROLL = 2 Global Const $CYBORDER = 6 Global Const $CYCAPTION = 4 Global Const $CYCURSOR = 14 Global Const $CYDLGFRAME = 8 Global Const $CYDOUBLECLK = 37 Global Const $CYDRAG = 69 Global Const $CYEDGE = 46 Global Const $CYFIXEDFRAME = 8 Global Const $CYFOCUSBORDER = 84 Global Const $CYFRAME = 33 Global Const $CYFULLSCREEN = 17 Global Const $CYHSCROLL = 3 Global Const $CYICON = 12 Global Const $CYICONSPACING = 39 Global Const $CYKANJIWINDOW = 18 Global Const $CYMAXIMIZED = 62 Global Const $CYMAXTRACK = 60 Global Const $CYMENU = 15 Global Const $CYMENUCHECK = 72 Global Const $CYMENUSIZE = 55 Global Const $CYMIN = 29 Global Const $CYMINIMIZED = 58 Global Const $CYMINSPACING = 48 Global Const $CYMINTRACK = 35 Global Const $CYSCREEN = 1 Global Const $CYSIZE = 31 Global Const $CYSIZEFRAME = 33 Global Const $CYSMCAPTION = 51 Global Const $CYSMICON = 50 Global Const $CYSMSIZE = 53 Global Const $CYVIRTUALSCREEN = 79 Global Const $CYVSCROLL = 20 Global Const $CYVTHUMB = 9 Global Const $DBCSENABLED = 42 Global Const $DEBUG = 22 Global Const $DIGITIZER = 94 Global Const $IMMENABLED = 82 Global Const $MAXIMUMTOUCHES = 95 Global Const $MEDIACENTER = 87 Global Const $MENUDROPALIGNMENT = 40 Global Const $MIDEASTENABLED = 74 Global Const $MOUSEPRESENT = 19 Global Const $MOUSEHORIZONTALWHEELPRESENT = 91 Global Const $MOUSEWHEELPRESENT = 75 Global Const $NETWORK = 63 Global Const $PENWINDOWS = 41 Global Const $REMOTECONTROL = 0x2001 Global Const $REMOTESESSION = 0x1000 Global Const $SAMEDISPLAYFORMAT = 81 Global Const $SECURE = 44 Global Const $SERVERR = 289 Global Const $SHOWSOUNDS = 70 Global Const $SHUTTINGDOWN = 0x2000 Global Const $SLOWMACHINE = 73 Global Const $STARTER = 88 Global Const $SWAPBUTTON = 23 Global Const $TABLETPC = 86 Global Const $XVIRTUALSCREEN = 76 Global Const $YVIRTUALSCREEN = 77  
      WinAPISystemMetricsConstants.au3
    • rcmaehl
      By rcmaehl
      A UDF with Extended Functions for Window Management
       
      Notes:
      Fixes WinGetClassList's barbaric returning of a @LF separated string instead of an array.
       
      Potential Uses:
      Automating applications that change their controls' handles/classes on each launch (e.g. half of Cisco's programs)
       
      Functions:
      _WinGetClassList
      _WinGetClassNNList
      _WindowGetHandleList
      _WindowGetHandleListFromPos
       
      Download: 
      WindowEx.zip  (v0.4)
       
      Changelog:
      10/04/2016 (v0.4): _WinGetClassNNList Fixed : Not Returning an Index when using $2D_ARRAY _WinGetClassNNList Fixed : Not Properly returning $aArray[x][1] on Classes with instances > 9 when using $2D_ARRAY 10/03/2016 (v0.3): _WinGetClassList Added : Exactly the same as WinGetClassList but returns a more civilized Array _WinGetClassNNList Added : Returns Classes and their instances in either a 1D or 2D array depending on Flags _WindowGetHandleList Renamed: _WinGetHandleList SCRIPT BREAKING! _WindowGetHandleListFromPos Renamed: _WinGetHandleListFromPos SCRIPT BREAKING! 10/01/2016 (v0.2): WindowsExConstants.au3 Added : Flags in _WindowGetHandleListFromPos _WindowGetHandleListFromPos Removed: ConsoleWrite left in during debug _WindowGetHandleListFromPos Added : Flag for if part of a Control is at $X, $Y return it as well. 10/01/2016 (v0.1): _WindowGetHandleList Added : Retrieves the handles of classes from a window. _WindowGetHandleListFromPos Added : Retrieves the handles of classes at a specific position from a window. Known and Reported Bugs:
      None reported To Do:
      To Be Decided. Opinions welcome! Upcoming Changes:
      To Be Decided.
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning everyone

      I was playing a little bit with "Screen Capture" UDF, and I was trying to make a "Window" capture, but, since I made a GUI which through I fire the event "Capture", my GUI is captured as well, and I don't want to
      This is the line of code that makes the capture:
       
      _ScreenCapture_CaptureWnd($strScreenCaptureFileName, $objActiveWindow, 0, 0, -1, -1, False) And these are the lines of code which select the "active" window:
       
      Local $objCurrentWindow = 9999 If _IsPressed("01") Then $objCurrentWindow = WinGetHandle("[ACTIVE]") If $objCurrentWindow <> $objMyGUI Then $objActiveWindow = $objCurrentWindow EndIf EndIf Sorry If I made stupid mistakes
      Thanks in advance.

      Francesco
    • 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.

×