Sign in to follow this  
Followers 0
ToyBoi

winwait

7 posts in this topic

I know there's winwait for windows, say if u open notepad it would wait for it to be active

what about if i do Alt & f and I select from the menu

If someone has a slow computer the script would cause a lot of bugs, and I don't want to use sleep b/c it's always a guesstimate , is there a way for autoit to send a command and wait for it to be completed and then do the next code

so eg if i want to save a file i would do

send("!f")

wait till done

send("a")

...

..

Share this post


Link to post
Share on other sites



I know there's winwait for windows, say if u open notepad it would wait for it to be active

what about if i do Alt & f and I select from the menu

If someone has a slow computer the script would cause a lot of bugs, and I don't want to use sleep b/c it's always a guesstimate , is there a way for autoit to send a command and wait for it to be completed and then do the next code

so eg if i want to save a file i would do

send("!f")

wait till done

send("a")

Use WinMenuSelectItem (), _GuiCtrlMenu_*, or _GuiCtrlToolbar_* functions instead.

:P


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

Share this post


Link to post
Share on other sites

Use WinMenuSelectItem (), _GuiCtrlMenu_*, or _GuiCtrlToolbar_* functions instead.

:P

Thank you, i will try that out :P

Share this post


Link to post
Share on other sites

Thank you, i will try that out :P

Hi I tried the following and excel wasn't able to select the right menu, is there something wrong with it?

#include <GuiConstants.au3>

#include <IE.au3>

#include <File.au3>

#include <ExcelCOM_UDF.au3>

#include <Array.au3>

#include <GUIComboBox.au3>

#include <GuiConstantsEx.au3>

#include <Constants.au3>

$oExcel = _ExcelBookNew(1)
WinWaitActive($oExcel)
WinMenuSelectItem("Microsoft Excel-Book1 ", "", "&Tools", "&Macro","&Record New Macro..." )

Share this post


Link to post
Share on other sites

Hi I tried the following and excel wasn't able to select the right menu, is there something wrong with it?

#include <GuiConstants.au3>

#include <IE.au3>

#include <File.au3>

#include <ExcelCOM_UDF.au3>

#include <Array.au3>

#include <GUIComboBox.au3>

#include <GuiConstantsEx.au3>

#include <Constants.au3>

$oExcel = _ExcelBookNew(1)
WinWaitActive($oExcel)
WinMenuSelectItem("Microsoft Excel-Book1 ", "", "&Tools", "&Macro","&Record New Macro..." )
From the help file remarks under WinMenuSelectItem():

WinMenuSelectItem will only work on standard menus. Unfortunately, many menus in use today are actually custom written or toolbars "pretending" to be menus. This is true for most Microsoft applications.

In MS Excel, the menu is Class "MsoCommandBar". So I wouldn't be surprised if that didn't work.

:P


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

Share this post


Link to post
Share on other sites

From the help file remarks under WinMenuSelectItem():

In MS Excel, the menu is Class "MsoCommandBar". So I wouldn't be surprised if that didn't work.

;)

So in this situation is this doable?

Share this post


Link to post
Share on other sites

So in this situation is this doable?

Have you tried the _GuiCtrlToolbar_* functions on it yet?

;)


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

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
Sign in to follow this  
Followers 0