Jump to content

Help file leaves a lot to be desired, so I'm asking you people..


grindy
 Share

Recommended Posts

I'm NOT a great programmer by any stretch of the imagination, I'm not even a good one - but I do try... A friend recommended AutoIt to me as a way to create a small .exe that I can call from another program, but I can't seem to get (what I think should be really trivial) it to work, and I think a good part of it is the way the help file for AutoIt is written.

Let me give you a simple example:

The description for the Send command shows:

Send ( "keys" [, flag] )

**Notice the spaces between the parenthesis and brackets and the value itself.**

However, throughout the Help file, I see examples such as:

Send("{DEL 4}")

**Again, notice the lack of spaces between the parenthesis and brackets and the value itself.**

I've done enough programming to think that these spaces DO matter, and need to know from you:

A - Do they matter?

B - If they do, then which Help file example is correct?

Oh, and if any of you would care to help me, here's what I want to do with AutoIt:

I want to compile a small .exe that will do the following:

I want the window of the program that will be the recipient of the F4 that I'm going to be sending to it, to have the focus (if it doesn't have it already), and I want to keep it active for the F4 key I'm sending to it. That's it! But so far, I'm failing miserably....

I know (well I think I know) that to do this I'll be using: WinActivate, SendKeepActive, and Send in order to achieve this. If there's anything else any of you think I might need to achieve what I mentioned, feel free to comment... And, if any of you wants to write (and share here) this little snippet of a code, by all means help yourself...

Thx for listening, and thx in advance for any help you can offer...

:bye:

Edited by grindy
Link to comment
Share on other sites

B - They do, sometimes, and both examples are correct. The first quoted example shows the correct syntax for the function, and the second shows the actual usage of that function. In this case, the space DOES matter, as DEL4 is different than DEL 4. If there were more than one flag, or parameter, passed to a function, a space before or after the comma separating the parameters is not needed, but could be used for aesthetic purposes (ie, the code would be sometimes easier to read).

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Only the spaces within a string matter.

Send("{Del 4}",1)
and
Send ( "{Del 4}" , 1 )
are equivalent.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

What do you mean by "receive a key"?

The window should act on a key pressed by the user?

When the window is active (has focus) the user input is received by the window. You would like to act on the specific user input even when the window is inactive?

Can you please elaborate on what you want to do?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators

I agree with JohnOne, you're not providing a lot of information for us to try to assist. What is the name of the application you're trying to manipulate, and what does the window look like? There may be a much easier way to accomplish what you're trying to do.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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