Jump to content

ALT+ASCII CHAR


 Share

Recommended Posts

Allright so I managed to PRESS the button with this simple test script but it does NOT FIRE IT UP. It's looks like pressed, that is all.

#Include <GuiToolBar.au3>
Opt("WinTitleMatchMode", 4)
Global $hTray = WinGetHandle("[CLASS:XLMAIN]")
Global $hToolbar = ControlGetHandle($hTray, "", "[CLASSNN:ToolbarWindow321]")
Global $idSave= ("40224")
$n=1
$iCmd = _GUICtrlToolbar_IndexToCommand($hToolbar, $n)
_GUICtrlToolbar_pressButton($hToolbar, $idSave)

The help mentions a _GUICtrlToolbar_CLICKButton that would fire it up but this function does not exist.

This is starting to get more and more complicated.

Any other way?

You had the right idea. _GuiCtrlToolbar_PressButton() is in the 3.2.10.0 help file and the comments make reference to _GuiCtrlToolbar_ClickButton(), but that function was left out of the production version (inadvertently, I believe). The function and its help file entry are restored in the 3.2.11.x Beta versions.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

After adding the _GUICtrlToolbar_ClickButton function folowing this thread : http://www.autoitscript.com/forum/index.ph...bar_ClickButton

At last, the desired button was clicked!

But it only works with winactivate -ed window.

But I'm glad anyway, and many thanks guys for your help and patience

this is the working code:

#Include <GuiToolBar.au3>
Opt("WinTitleMatchMode", 4)
Global $hTray = WinGetHandle("[CLASS:XLMAIN]")
Global $hToolbar = ControlGetHandle($hTray, "", "[CLASSNN:ToolbarWindow321]")
Global $idSave= ("40224")
winactivate("Microsoft Excel - probaimport")
_GUICtrlToolbar_clickButton($hToolbar, $idSave)
Edited by ohgod
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...